Bug 60554 - NotSupportedException when popping non-modal navigation stack while modal dialog is showing
Summary: NotSupportedException when popping non-modal navigation stack while modal dia...
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.5.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-11-07 16:39 UTC by Matt Schirle
Modified: 2017-11-14 00:03 UTC (History)
4 users (show)

Tags: modal, naviagation, ac
Is this bug a regression?: ---
Last known good build:

A small VS2017 solution that demonstrates the problem (3.92 MB, application/x-zip-compressed)
2017-11-07 16:39 UTC, Matt Schirle

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 for Bug 60554 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Matt Schirle 2017-11-07 16:39:05 UTC
Created attachment 25587 [details]
A small VS2017 solution that demonstrates the problem

When I try to pop pages off the non-modal navigation stack while a modal page is displayed, I get the following error on iOS:

System.NotSupportedException: Popped page does not appear on top of current navigation stack, please file a bug.
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<OnPopViewAsync>d__43.MoveNext () [0x0005e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:296

Steps to reproduce:
1) Create a Xamarin forms iOS app with a Navigation page
2) Push a few pages onto the navigation stack
3) Push a page onto the modal navigation stack
4) While the modal page is displaying, pop at least two pages off the non-modal navigation stack
5) Dismiss the modal page
Actual result: App crashes with not supported exception
Expected result: Modal page is dismissed and the correct non-modal page is displayed
Comment 1 adrianknight89 2017-11-12 04:50:50 UTC
Same error message as #59172.