Bug 8235 - UINavigationController gets unrecognized selector exception, NSConcreteHashtable, on iOS4.2 using MT6.0.4
Summary: UINavigationController gets unrecognized selector exception, NSConcreteHashta...
Status: RESOLVED DUPLICATE of bug 7742
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-11-05 20:30 UTC by BillF
Modified: 2012-11-05 22:14 UTC (History)
2 users (show)

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

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 DUPLICATE of bug 7742

Description BillF 2012-11-05 20:30:04 UTC
This could well be a duplicate of 7742, but in case ...

My app, built on MT 6.0.4, crashes on an iOS4.2 device as follows:

MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: -[NSConcreteHashTable objectAtIndex:]: unrecognized selector sent to instance 0x16c9880
  at MonoTouch.Foundation.NSArray.ArrayFromHandle[UIViewController] (IntPtr handle) [0x00000] in <filename unknown>:0
  at MonoTouch.UIKit.UIViewController.get_ChildViewControllers () [0x0002b] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:1746
  at MonoTouch.UIKit.UINavigationController.get_ViewControllers () [0x0004a] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UINavigationController.g.cs:325
  at MonoTouch.UIKit.UINavigationController.SetViewControllers (MonoTouch.UIKit.UIViewController[] controllers, Boolean animated) [0x00061] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UINavigationController.g.cs:253
  at StarTrack.TrackingNavigationController.ViewDidLoad () [0x00023] in /Users/bfulton/Projects/iTrack/StarTrack/UI_iPhone/Tracking/TrackingNavigationController.cs:22
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at StarTrack.Application.Main (System.String[] args) [0x00000] in /Users/bfulton/Projects/iTrack/StarTrack/Main.cs:48

The code is:

public class TrackingNavigationController : UINavigationController
	{
		private static TrackingEnquiryViewController enquiryController;
		private static UIViewController[] viewControllers;
		
		public override void ViewDidLoad()
		{
			base.ViewDidLoad ();			
			enquiryController = new TrackingEnquiryViewController();
			viewControllers = new UIViewController[] {enquiryController};
			SetViewControllers(viewControllers, false);   <---- crashes here

This worked on iOS4.* with earlier versions of MT, and works on iOS6.
Comment 1 Sebastien Pouliot 2012-11-05 22:14:33 UTC
it's fixed in 6.0.5+ (beta)
MonoTouch 6.0.6 should be released (as stable) "real soon now"(tm)

*** This bug has been marked as a duplicate of bug 7742 ***