Hi,
i seem to have a bug related to List/ObservableCollection as ItemsSource of a ListView.
I have a universal app deployed on W8.0 and W8.1 and WP8.1 (Cover)
My app basically displays lists of stuff (with a thumbnail acquired asynchronously for each item), then when i click an item i navigate on another page.
In the list screens, i used to use ObservableCollection as ItemsSource for the ListView, but didn't need it because the list never evolves while the user is on it. So i decided to replace that by List, hoping to increase performance. This works very well on W8.1 and WP8.1, however it makes the W8.0 app very unstable. In fact, it makes it crash (the infamous "unhandled HRESULT E_FAIL in a COM Component" stuff) when something in the app (even if not related to the list) tries to do some awaitable stuff. But not always, it seems just random. Maybe it has to do with the disposing of the list because it mostly happens when navigating on other pages.
For instance, I browse through list screens, my thumbnails display fine, then i click on an item, it navigates to another page where it tries to load the first page of the comic book. And the first awaitable call in this page will throw an error (here it's just some code to get the thumbnail during the loading. If i comment it out, it will be the next awaitable call (opening the comic book file to parse it) that will fail.
Sometimes, it's also just browsing through several list pages that will make the app crash. The error is always the same, but it can happen on any await call.
This only occurs on W8.0. Not on 8.1 or WP8.1 !
When replacing back the List by ObservableCollection, it works on all platforms.
Maybe i've missed something regarding List/ObservableCollection, but it seems like a bug to me. I hope the description is accurate enough, let me know if it's not.
Thanks
No comments:
Post a Comment