Bug 30397 - Page with ListView on WinPhone throws ArgumentException when navigating back
Summary: Page with ListView on WinPhone throws ArgumentException when navigating back
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 1.4.2
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Eric Maupin
Depends on:
Reported: 2015-05-25 05:14 UTC by bruce.wilkins
Modified: 2016-04-08 19:57 UTC (History)
3 users (show)

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

Call Stack (50.53 KB, image/png)
2015-05-25 05:14 UTC, bruce.wilkins

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 bruce.wilkins 2015-05-25 05:14:41 UTC
Created attachment 11312 [details]
Call Stack

Page with ListView on WinPhone throws ArgumentException when navigating back.

System.ArgumentException occurred
Message: A first chance exception of type 'System.ArgumentException' occurred in System.Windows.ni.dll
Additional information: Value does not fall within the expected range.

Please see attached call stack for more information.

This is only an issue on WinPhone, Android and iOS perform as expected.

This is a show stopper for a high profile product launch. Please advise if this will be fixed or if more information is required.

Also tested on Xamarin.Forms and the issue is the same.
Comment 1 Eric Maupin 2015-05-26 14:03:03 UTC
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. We monitor recently touched NEEDS INFO bugs so we’ll notice you attached the reproduction we’ll take it from there. 

Warm regards,
Xamarin Forms Team
Comment 2 bruce.wilkins 2015-05-28 07:36:18 UTC
It appears to be related to clearing the ObservableCollection in OnDisappearing. Android and iOS behave as expected, WinPhone throws ArgumentException.
Comment 3 Eric Maupin 2015-05-28 14:59:27 UTC
Repro sent privately, setting back to new.
Comment 4 Jason Smith [MSFT] 2016-04-08 19:57:25 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team