Bug 37625 - App crashes when quickly adding/removing Image views (Windows UWP)
Summary: App crashes when quickly adding/removing Image views (Windows UWP)
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Samantha Houts [MSFT]
Depends on:
Reported: 2016-01-12 18:10 UTC by Dominik Weber
Modified: 2016-04-14 18:04 UTC (History)
8 users (show)

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

test project (71.87 KB, application/x-zip-compressed)
2016-01-12 18:10 UTC, Dominik Weber

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:

Description Dominik Weber 2016-01-12 18:10:35 UTC
Created attachment 14558 [details]
test project

Our app currently crashes when I quickly add/remove Image views. I have a search function implemented which shows search results with images, however when the user quickly changes the search query and presses the search button again (thus reloading the results and their images) the app crashes with a NullReferenceException:

   at Xamarin.Forms.Platform.UWP.ImageRenderer.<UpdateSource>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()

I have attached a test project which replaces a single Image view every 50ms to force the crash.
Comment 1 S_CC 2016-02-04 11:29:35 UTC
I am also facing the exact same issue when when changing the images.
Comment 2 Night Owl 2016-02-24 05:31:22 UTC
Me too, exactly same call stack, any known workaround for this?
Comment 3 Rui Marinho 2016-03-03 00:53:52 UTC
Should be fixed in 2.2.0-pre1
Comment 4 Samih 2016-03-04 16:50:28 UTC
I'm facing the same issue not only when I quickly change images but also when I get for the 1st time on the view where the image should be displayed.

Is there a way to catch this exception ? Or any workaround ?
I have to deliver an app soon and it's a problem.

Comment 5 Harikrishnan 2016-04-12 03:57:19 UTC
I'm facing the same issue in both UWP and WindowsPhone 8.1. It majorly happens in Windows Phone 8.1 project. Is this fixed for WindowsPhone 8.1 as well?
Comment 6 Parmendra Kumar 2016-04-14 18:04:45 UTC
I have checked this issue with Xamarin.Forms and observed that its working fine.

Screencast: http://www.screencast.com/t/IhurqhJuKX

Hence closing this issue.

@Samih, @Harikrishnan,  If you getting other issue please filed a separate bug for the same.