Bug 6051 - Overriding UINavigationController.PopToRootViewController causes runtime crash on device
Summary: Overriding UINavigationController.PopToRootViewController causes runtime cras...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-09 16:42 UTC by t9mike
Modified: 2012-07-18 09:07 UTC (History)
3 users (show)

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


Attachments
Version Info + Sample Source Code (14.98 KB, application/zip)
2012-07-09 16:42 UTC, t9mike
Details


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:
Status:
RESOLVED FIXED

Description t9mike 2012-07-09 16:42:47 UTC
Created attachment 2180 [details]
Version Info + Sample Source Code

In alpha channel MT 5.3.4, if you add this to UINavigationController sub-class:


   public override UIViewController[] PopToRootViewController (bool animated)
   {
      return base.PopToRootViewController(animated);
   }

And run on device, you get a crash when you click the first tab when the navigation controller is already popped to the root. So in this sample, 1st tab press is OK and second causes crash.

Sample attached.
Comment 1 t9mike 2012-07-12 21:47:51 UTC
Changing component to class libraries in hopes this gets picked up by someone.
Comment 2 Sebastien Pouliot 2012-07-16 17:19:21 UTC
It's a registration bug. Adding --noregistrar to the build results in a working app (no crash).
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-07-18 09:07:05 UTC
I can't reproduce this with master, but I can with 5.3.4, so it's been fixed inbetween.