Hi Xamarin Team,
In a View Model, I declare a string-type with a long url of an image (imagine a source with a resource-token and some resizing query strings).
During runtime, the following exception occours and crashes the app instantly in iOS and maybe other platforms as well (too long path for FileStream).
I'm not sure about the internals - but it might be related to the caching of the image? or to a fallback to search the image on the local file storage instead?
Would be great if you're able to workaround the crash in a upcoming release even if such images would not be cached in a first step.
thanks in advance and best,
Adrian
Unhandled Exception:
System.IO.PathTooLongException: Path is too long. Path: http%3A%2F%2Fxxxxxxx.xxxxxxxxxxx.xx%2Fxxxxxx%2Fxxxxxxx%3A%3AMusic%3A%3AAlbum%3A%3AZWVsc3VzZWxlc3MgdHJpbmtldHMtYiBzaWRlcywgc291bmR0cmFja3MsIHJhcmlldGllcyBhbmQgdW5yZWxlYXNlZCAxOTk2LTIwMDY%3D%3Fwidth%3D64%26height%3D64%26sid%3D17813ff9-e60f-40e3-b5d0-fcd04b7ed4bf
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x0034b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:320
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.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 :0
at Xamarin.Forms.UriImageSource+d__1c.MoveNext () [0x00000] in :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+d__f.MoveNext () [0x00000] in :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.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.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter[MonoTouch.UIKit.UIImage].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs:62 at Xamarin.Forms.Platform.iOS.ImageCellRenderer+d__5.MoveNext () [0x00000] in :0