Version Number of Plugin: 1.8.1
Device Tested On:21 Jun 2017
Simulator Tested On:NA
Version of VS: 2015 U3
Version of Xamarin: 2.3.3.175
Versions of other things you are using:
Steps to reproduce the Behavior
Scenario 1:
Mapped image from PCL image on Form load
Async method to update image resource from stream pulled from service
Scenario 2:
Async method to map image resource from stream pulled from service
Scenario 3:
Mapped image from PCL image on Form load
Async method to update image resource from byte array pulled from service and mapped using memory stream to isolate the stream lock.
Expected Behavior
Image should be updated to image source from Stream
Actual Behavior
Throws exception and crashes the app though written the code under Try Catch Block
Code snippet
private async Task UpdateImageSource()
{
var proPic = (CircleImage)ProfilePicLayout.Children[0];
try
{
var stream = await ViewModel.GetProfilePicSteam();
if (stream != null)
proPic.Source = ImageSource.FromStream(() => new MemoryStream(stream));
}
catch (Exception ex)
{
}
finally
{
}
}
Attached stack on gist - https://gist.github.com/pavalamf/43fea9e8b469d59df8a67ec467ae03ee#file-gistfile1-txt
Bug Information
Version Number of Plugin: 1.8.1 Device Tested On:21 Jun 2017 Simulator Tested On:NA Version of VS: 2015 U3 Version of Xamarin: 2.3.3.175 Versions of other things you are using:
Steps to reproduce the Behavior
Scenario 1:
Scenario 2: Async method to map image resource from stream pulled from service
Scenario 3:
Expected Behavior
Image should be updated to image source from Stream
Actual Behavior
Throws exception and crashes the app though written the code under Try Catch Block
Code snippet
private async Task UpdateImageSource() { var proPic = (CircleImage)ProfilePicLayout.Children[0]; try { var stream = await ViewModel.GetProfilePicSteam(); if (stream != null) proPic.Source = ImageSource.FromStream(() => new MemoryStream(stream)); } catch (Exception ex) { } finally { } }
Screenshotst
NA - App crashes