Page with ListView throws ArgumentException (on WinPhone only)

A page with a ListView/ ObservableCollection is throwing an ArugumentException, only on Windows Phone and only when navigating back up the stack to the page.

The exception originates as

A first chance exception of type 'System.ArgumentException' occurred in System.Windows.ni.dll

then is thrown as an unhandled exception in App.Application_UnhandledException.

It looks like this is only a problem when populating the ObservableCollection asyncronously using async/ await in OnAppearing, although the result is dispatched to the UI thread using Device.BeginInvokeOnMainThread().

Any ideas?

Answers

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @BruceWilkins:
    I have similar problems with a ListView (but with List as Items-Source) on a PopUp (only in WP).
    The app crashes by the second call...
    I have mentioned that and hope, that It will be solved in the next release...

  • BruceWilkinsBruceWilkins USMember

    Been investigating some work arounds but its looking to be a show stopper for us, unfortunately.

    I've tested with the latest pre release versions but it looks like the same issue is there.

    Can someone from Xamarin.Forms comment? Is this a known issue?

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @BruceWilkins:

    I (hopefully) have good news...
    I had commented an already filled bug in Bugzilla.
    Today the state was changed to "Confirmed" and "In progress".
    Link:
    https://bugzilla.xamarin.com/show_bug.cgi?id=29229

    So let's hope that this is "our Bug", that it will be solved and that the next update will be released in not time :wink:

  • BruceWilkinsBruceWilkins USMember

    Great, I'll add our exception info incase it helps in resolving the issue.

    Thanks for the heads up!

  • BruceWilkinsBruceWilkins USMember

    May be a separate issue, yours is System.NullReferenceException, ours is System.ArgumentException.

    I've added a new issue in Bugzilla:

    Bug 30397 - Page with ListView on WinPhone throws ArgumentException when navigating back

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @BruceWilkins:
    FYI:
    I have received a mail from Bugzilla, that the bug is solved (and the solve is released in the next version):
    https://bugzilla.xamarin.com/show_bug.cgi?id=29229

    that - according Miguel - should be released in the next 2-3 weeks.

    See his comment here: forums.xamarin.com/discussion/41588/how-to-make-forms-stable#latest

  • BruceWilkinsBruceWilkins USMember

    Looks like ours is a separate issue:

    Bug 30397 - Page with ListView on WinPhone throws ArgumentException when navigating back

  • BruceWilkinsBruceWilkins USMember

    Incase anyone else runs into this issue- it appears to be related to clearing the lists observable collection in OnDisappearing()

Sign In or Register to comment.