Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
When scrolling listview, or selecting item, the app is constantly crashing without any debug info.
Tested on wp 8.1, xf 184.108.40.20684
Note: with Xf 1.5, listview interaction was much more stable.
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue we would very much appreciate it.
Xamarin Forms Team
Hi Rui, I found some more details about this issue. To summarize: the primary issue here is that the app crashed when the items are bound to URI (online) images in Xaml.
When you bind an Image to each row, the app crashes when scrolling down (I have 50 items with one image per item).
I looked at the image binding and tried to bind it to a specific Uri instance (ImageSource = new Uri("[url]")). But this way the app crashes immediately with a stream exception (this is also a bug I think?).
Ultimately, I bypassed it all this way:
- Derive a CustomImage class from Image and use this in Xaml. Bind it to the uri string
- Create a CustomImageRenderer class derived from ImageRenderer
- In here, check if the source is bound to a URI type source, if so, reference the source to a specific BitmapImage instance, like this:
Control.Source = new BitmapImage((Element.Source as UriImageSource).Uri);
This way all my Images load fine and I can scroll the list without crashing.
So I found a workaround but the whole ListView/Image binding stuff still needs a big fix on WP.
Hi @Jorrit i found out a problem with UriImageSource and the way it get's the image "stream" for the internet. I have a fix but i m now trying to understand why it stopped working.
So the crashes you referral seem not really related with the listview but more with image from a uri.
That's great Rui! Your UriImageSource fix will tackle a very common and hard-to-debug issue with the ListView (and probably other controls as well).
By the way, the app crashes with the infamous "nullreference exception", so this tells exactly nothing. We now know this is probably caused by the image stream (not being created/opened etcetera). So while this is probably a UriImageSource error as you stated, maybe the ListView should handle an error in the Image loading better so it won't crash but throw something with more explicit information. I haven't tested this, but I am wondering what happens with the ListView if the URI resource is not available, times out, raises a 500, etc etc.
So I vote for the image fix ánd a ListView improvement ;).
Thanks for following up on this!
Should be fixed in the latest XF Service release XF 220.127.116.1187