Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Bug in UriImageSource when loading the same image at the same time

$
0
0

If you have several images on a page, all with their source set to the same url then I get the following crash:

Unhandled Exception:
System.IO.IOException: Sharing violation on path http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00275] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:289 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:190 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:129 
  at System.IO.IsolatedStorage.IsolatedStorageFileStr
eam..ctor (System.String path, FileMode mode, FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:139 
  at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, FileMode mode, FileAccess access) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs:948 
  at Xamarin.Forms.Forms+IOSPlatformServices+_IsolatedStorageFile.OpenFile (System.String path, FileMode mode, FileAccess access) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.UriImageSource+<GetStreamAsyncUnchecked>d__1c.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at 
System.Runtime.CompilerServices.TaskAwaiter`1[System.IO.Stream].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xamarin.Forms.UriImageSource+<GetStreamAsync>d__14.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.IO.Stream].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xamarin.Forms.UriImageSource+<GetStreamAsync>d__f.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] i
n /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.IO.Stream].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs:62 
  at Xamarin.Forms.Platform.iOS.ImageLoaderSourceHandler+<LoadImageAsync>d__0.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[MonoTouch.UIKit.UIImage].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xamarin.Forms.Platform.iOS.ImageRenderer+<SetImage>d__0.Move
Next () [0x00000] in <filename unknown>:0 
2014-08-10 17:02:25.555 FormsTemplateiOS[1149:80b] Unhandled managed exception: Sharing violation on path https%3A%2F%2Fwww.meecook.com%2Fapi%2Fimage%2F103%2Fprofilethumbnail (System.IO.IOException)
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00275] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:289 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:190 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.I
solatedStorage/IsolatedStorageFileStream.cs:129 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, FileMode mode, FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:139 
  at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, FileMode mode, FileAccess access) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs:948 
  at Xamarin.Forms.Forms+IOSPlatformServices+_IsolatedStorageFile.OpenFile (System.String path, FileMode mode, FileAccess access) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.UriImageSource+<GetStreamAsyncUnchecked>d__1c.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/Mono
Touch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.IO.Stream].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xamarin.Forms.UriImageSource+<GetStreamAsync>d__14.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.IO.Stream].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xamarin.Forms.UriImageSource+<GetStreamAsync>d__f.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exc
eption was thrown ---
  at System.Runtime.E
xceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.IO.Stream].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs:62 
  at Xamarin.Forms.Platform.iOS.ImageLoaderSourceHandler+<LoadImageAsync>d__0.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[MonoTouch.UIKit.UIImage].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at X
amarin.Forms.Platform.iOS.ImageRenderer+<SetImage>d__0.MoveNext () [0x00000] in <filename unknown>:0 

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>