Bug 21981 - Bug in Image UriImageSource when loading the same image multiple times
Summary: Bug in Image UriImageSource when loading the same image multiple times
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-10 03:17 UTC by Martin Booth
Modified: 2016-11-14 12:10 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Martin Booth 2014-08-10 03:17:54 UTC
When loading the same image multiple times (by having multiple image controls pointing to the same url) then I receive the following crash:

System.IO.IOException: Sharing violation on path https%3A%2F%2Fwww.meecook.com%2Fapi%2Fimage%2F103%2Fprofilethumbnail


Unhandled Exception:
System.IO.IOException: Sharing violation on path https%3A%2F%2Fwww.meecook.com%2Fapi%2Fimage%2F103%2Fprofilethumbnail
  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 
mono-rt: Stacktrace:
Comment 1 Seth Rosetter 2014-08-12 15:18:24 UTC
Martin,
I have tried to reproduce this but was unable to. Would you be able to attach a piece or all of the failing code?
Comment 2 Jonathan Moosekian 2014-10-22 15:12:02 UTC
I have the same exact issue. I will post a small sample piece shortly.
Comment 3 Jonathan Moosekian 2014-10-23 10:18:39 UTC
Well, I've been trying to reproduce this in a small sample project, but have not been able to yet. 

However, while digging through the assembly browser, I noticed that in Xamarin.Forms.Platform.iOS.ImageRenderer, the call to SetImage inside OnElementChanged (as well as OnElementPropertyChanged), the code is not awaiting the call to SetImage.
Comment 4 Jonathan Moosekian 2014-10-23 11:08:30 UTC
For clarity, here is my stacktrace, as well:

2014-10-23 10:04:30.837 CompanyiOS[26947:2453177] Unhandled managed exception: Sharing violation on path https%3A%2F%2Fmobile.company.com%2F%2Favatar%2FShow%2F121304534%3Fs%3D100 (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.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 <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] 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 Xamarin.Forms.Platform.iOS.ImageRenderer+<SetImage>d__0.MoveNext () [0x00000] in <filename unknown>:0
Comment 5 Martin Booth 2014-10-24 21:12:51 UTC
I was able to create a repro for this, but it turned (in my case) that I was probably causing this issue by doing something a bit unusual.

In my case I was calling uiCell.SetNeedsLayout(); uiCell.LayoutIfNeeded(); from a custom renderer on a UITableViewCell.

I think the problem is with calling ImageLoaderSourceHandler.LoadImageAsync multiple times, simultaneously, where imagesource.Uri is the same for each call and the image has not been cached. This is not a threadsafe thing to do and causes this access violation error to occur when these multiple (simultaneous) calls try to save the image to the cache with the same filename.

To get around this problem, I created my own ImageLoaderSourceHandler (and registered it in my iOS project) which wrapped the original ImageLoaderSourceHandler, but prevents simultaneous calls for the same image from happening.

Its probably not the most elegant solution, but it may help

using Xamarin.Forms;

[assembly: ExportImageSourceHandler(typeof(UriImageSource), typeof(iOS.Renderers.ImageLoaderSourceHandler))]

namespace iOS.Renderers
{
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    using MonoTouch.UIKit;

    using Xamarin.Forms;
    using Xamarin.Forms.Platform.iOS;

    public sealed class ImageLoaderSourceHandler : IImageSourceHandler
    {
        private static readonly Dictionary<string, TaskCompletionSource<object>> CurrentCalls = new Dictionary<string, TaskCompletionSource<object>>();

        private static readonly object LockObj = new object();

        public async Task<UIImage> LoadImageAsync(ImageSource imagesource, CancellationToken cancelationToken = new CancellationToken(), float scale = 1)
        {
            var uriImageSource = imagesource as UriImageSource;

            if (uriImageSource != null && uriImageSource.Uri != null)
            {
                var key = uriImageSource.Uri.ToString();
                TaskCompletionSource<object> existingTask = null;

                lock (LockObj)
                {
                    if (CurrentCalls.ContainsKey(key))
                        existingTask = CurrentCalls[key];
                }

                if (existingTask != null)
                    await existingTask.Task;

                var task = new TaskCompletionSource<object>();

                lock (LockObj)
                    CurrentCalls.Add(key, task);

                var originalImageLoaderSourceHandler = new Xamarin.Forms.Platform.iOS.ImageLoaderSourceHandler();
                var uiImage = await originalImageLoaderSourceHandler.LoadImageAsync(imagesource, cancelationToken, scale);

                lock (LockObj)
                    CurrentCalls.Remove(key);

                task.SetResult(null);

                return uiImage;
            }

            return null;
        }
    }
}
Comment 6 Jason Smith [MSFT] 2016-03-16 12:16:13 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we no longer believe it affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
 
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team
Comment 7 argiris@fortefour.com 2016-11-14 12:10:03 UTC
We've got at least two occurrences of this with Xamarin Forms 2.3.2.127. The explanation makes perfect sense in our case (i.e. we are loading the same image multiple times). Stack trace captured from HockeyApp: 

at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) <0x1005f6d10 + 0x00634> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) <0x1005f6c60 + 0x0008f> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) <0x1005f47d0 + 0x00057> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile isf) <0x1005f4890 + 0x0006f> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.IO.IsolatedStorage.IsolatedStorageFile.OpenFile (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) <0x1005f45d0 + 0x0003f> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.Forms+IOSPlatformServices+_IsolatedStorageFile.OpenFileAsync (System.String path, Xamarin.Forms.FileMode mode, Xamarin.Forms.FileAccess access) <0x100ec32b0 + 0x00037> in <e872089d69ed4df996b548b08d908138#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.UriImageSource+<GetStreamAsyncUnchecked>d__22.MoveNext () <0x100d80b20 + 0x00ad3> in <b0fc14d4e5b04749b7241d1235a68329#492c17a4b8163227faa2c8ac32f5d397>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x100535990 + 0x00028> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100534dd0 + 0x000d3> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x100534d20 + 0x0008b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x100534cc0 + 0x00047> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x100535050 + 0x0001b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.UriImageSource+<GetStreamFromCacheAsync>d__23.MoveNext () <0x100d81d30 + 0x00543> in <b0fc14d4e5b04749b7241d1235a68329#492c17a4b8163227faa2c8ac32f5d397>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x100535990 + 0x00028> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100534dd0 + 0x000d3> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x100534d20 + 0x0008b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x100534cc0 + 0x00047> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1005354d0 + 0x0001b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.UriImageSource+<GetStreamAsync>d__21.MoveNext () <0x100d805e0 + 0x0044b> in <b0fc14d4e5b04749b7241d1235a68329#492c17a4b8163227faa2c8ac32f5d397>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x100535990 + 0x00028> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100534dd0 + 0x000d3> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x100534d20 + 0x0008b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x100534cc0 + 0x00047> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x100535050 + 0x0001b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.UriImageSource+<GetStreamAsync>d__17.MoveNext () <0x100d7f7e0 + 0x0027b> in <b0fc14d4e5b04749b7241d1235a68329#492c17a4b8163227faa2c8ac32f5d397>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x100535990 + 0x00028> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100534dd0 + 0x000d3> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x100534d20 + 0x0008b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x100534cc0 + 0x00047> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1005354d0 + 0x0001b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.Platform.iOS.ImageLoaderSourceHandler+<LoadImageAsync>d__0.MoveNext () <0x100eb9e80 + 0x00223> in <e872089d69ed4df996b548b08d908138#492c17a4b8163227faa2c8ac32f5d397>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x100535990 + 0x00028> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x100534dd0 + 0x000d3> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x100534d20 + 0x0008b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x100534cc0 + 0x00047> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x100535050 + 0x0001b> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Xamarin.Forms.Platform.iOS.ImageRenderer+<SetImage>d__7.MoveNext () <0x100eb9500 + 0x00393> in <e872089d69ed4df996b548b08d908138#492c17a4b8163227faa2c8ac32f5d397>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x100535990 + 0x00028> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) <0x100534390 + 0x0004f> in <a11ea1906afa4ff781670d3ba1c4a833#492c17a4b8163227faa2c8ac32f5d397>:0 
  at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () <0x100f28730 + 0x00027> in <13e4559f04eb48a4ab97ea30be8edc32#492c17a4b8163227faa2c8ac32f5d397>:0 
  at Foundation.NSAsyncActionDispatcher.Apply () <0x100f63430 + 0x00023> in <13e4559f04eb48a4ab97ea30be8edc32#492c17a4b8163227faa2c8ac32f5d397>:0 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) <0x100f3c7b0 + 0x0002b> in <13e4559f04eb48a4ab97ea30be8edc32#492c17a4b8163227faa2c8ac32f5d397>:0 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x100f3c6f0 + 0x000ab> in <13e4559f04eb48a4ab97ea30be8edc32#492c17a4b8163227faa2c8ac32f5d397>:0 
  at CoachLogicMobile.iOS.Application.Main (System.String[] args) <0x1004503d0 + 0x00027> in <cd71e839a6e640bbb2676305d9abd349#492c17a4b8163227faa2c8ac32f5d397>:0