Bug 4102 - Master-Detail template is broken
Summary: Master-Detail template is broken
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-26 18:38 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2012-04-13 15:18 UTC (History)
3 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 FIXED

Description Rolf Bjarne Kvinge [MSFT] 2012-03-26 18:38:25 UTC
Repro:
1) Create a new project from the Master-Detail template (iPhone/iPad/Universal doesn't matter).
2) Run.
3) Watch NRE pop up:

System.NullReferenceException: Object reference not set to an instance of an object
  at mdtest.DetailViewController.WillHideViewController (MonoTouch.UIKit.UISplitViewController svc, MonoTouch.UIKit.UIViewController vc, MonoTouch.UIKit.UIBarButtonItem barButtonItem, MonoTouch.UIKit.UIPopoverController pc) [0x00018] in /Users/rolf/Projects/md-test/DetailViewController.cs:80
  at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
  at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /mono/ios/monotouch/src/UIKit/UIWindow.g.cs:115
  at mdtest.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00069] in /Users/rolf/Projects/md-test/AppDelegate.cs:46
  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /mono/ios/monotouch/src/UIKit/UIApplication.cs:38
  at mdtest.Application.Main (System.String[] args) [0x00000] in /Users/rolf/Projects/md-test/Main.cs:17

Note: this is with MD/md-addins master. I haven't tested any released versions.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-03-26 18:39:12 UTC
Looks like 36f94a478b9e2d0e246f101edf622605807feef5 broke it.
Comment 2 Jeffrey Stedfast 2012-03-27 20:19:54 UTC
great catch! fixed in git master (shouldn't be an issue in 2.8.8.x)
Comment 3 Alan McGovern 2012-04-05 05:53:32 UTC
The fix has broken 4/6 of the master-detail templates so that you cannot create a project from the template anymore. Working on this now.
Comment 4 Alan McGovern 2012-04-05 07:21:34 UTC
I fixed the issue where the templates couldn't be used to create new projects but came across another issue where the we had removed a required outlet from the .designer.cs files which was causing the templates to be uncompilable.

I've instantiated and executed each of the master-detail templates now but it'd be great if someone else could run through them aswell to make sure everything really is working as expected.
Comment 5 Jeffrey Stedfast 2012-04-13 15:18:17 UTC
try now