Bug 37604 - [WinPhone] Error when back navigating after changing MainPage and adding 2 on stack
Summary: [WinPhone] Error when back navigating after changing MainPage and adding 2 on...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-01-12 08:09 UTC by Adam
Modified: 2016-02-04 17:33 UTC (History)
4 users (show)

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

Repro (371.70 KB, application/x-zip-compressed)
2016-01-12 08:09 UTC, Adam

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 Adam 2016-01-12 08:09:34 UTC
Created attachment 14549 [details]

This one is an interesting one.

Open up the App on a new Page in a NavigationPage.

From that page change the MainPage to a new NavigationPage with a default ContentPage then immediately navigate to another page.

Then from this TabbedPage navigate to a new page, then go back and it will crash.

Attached is a repro. Start it up.

Press Move (it will go to the TabbedPage)
Press Move Again (it will go to a ContentPage)
Then press Back * It will now crash with Element already a child of another element.
Comment 1 Adam 2016-01-12 08:11:30 UTC
If you navigate to each page by letting each page load first and pressing a button on the page to move to the next one it all works ok.

To me it seems like because the OnAppearing() is not running or something is not running on page because it is just quickly added to the stack but never visible.
Comment 2 E.Z. Hart [MSFT] 2016-02-04 17:33:57 UTC
Fixed as of