Bug 1263 - Can not build ad hoc builds of app that work for other people - throws exception Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle (loaded)' with name XYZ
Summary: Can not build ad hoc builds of app that work for other people - throws except...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-10-05 14:04 UTC by dj_technohead
Modified: 2011-10-10 16:05 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 NOT_REPRODUCIBLE

Description dj_technohead 2011-10-05 14:04:20 UTC
I reinstalled OS X, Xcode 3.2.6 +
4.1, and MonoTouch (4.2.2) on my laptop and am now no longer able to build
ad hoc builds of the app that work on other people's iPhones. I am able to
deploy to my iPhone and it works, but for everybody else the app crashes
with a bunch of errors that looks like the following:


Objective-C exception thrown. Name: NSInternalInconsistencyException Reason:
Could not load NIB in bundle: 'NSBundle (loaded)' with name
'UIViewScrollerContainer'
at MonoTouch.UIKit.UIViewController.get_View () [0x00000] in :0 at
Coolfindz.iPhoneRateViewController.ViewDidLoad () [0x000e2] in
/Users/technohead/Projects/Coolfindz/Coolfindz/iPhone/iPhoneRateViewController.xib.cs:76
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x00000] in :0 at
MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in :0 at
Coolfindz.Application.Main (System.String[] args) [0x00016] in
/Users/technohead/Projects/Coolfindz/Coolfindz/Main.cs:21

Building the app from my other OS X machine with the exact same source code,
and it works fine for everybody.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-10-06 07:46:18 UTC
How do other people install your app?
Comment 2 dj_technohead 2011-10-06 14:45:53 UTC
Through iTunes by dragging the app to the Library section and syncing. I also tried doing a direct deploy from the laptop and it would experience the same problem. However, I could build it using the desktop and it would work fine. Tthis may be an anomaly of the installation of OS/X or Monotouch. The re-install of OS X and Monotouch was being done because I was experiencing issues with MonoDevelop 2.6, it would result in breaking svn for me (which I have also reported as a possible bug). I had tried reinstalling just MT and MD, but when that failed to fix the problem, I went with reinstalling OS X, but not a clean install, an install on top of the existing OS X installation.
Comment 3 dj_technohead 2011-10-06 16:06:09 UTC
I may have spoken too soon. I have logged some errors from the most recent build made from the desktop that look like the same errors:

Id: 1123 - 10/6/2011 10:22:54 AM
Message:
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle (loaded)' with name 'UIViewScrollerContainer'
Stack Trace:
at MonoTouch.UIKit.UIViewController.get_View () [0x00000] in :0 at Coolfindz.iPhoneRateViewController.ViewDidLoad () [0x000e2] in /Users/technohead/Projects/Coolfindz/Coolfindz/iPhone/iPhoneRateViewController.xib.cs:76 at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in :0 at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in :0 at Coolfindz.Application.Main (System.String[] args) [0x00016] in /Users/technohead/Projects/Coolfindz/Coolfindz/Main.cs:21
Notes:
Application version: 0.2.32
IOS version: 4.35


Id: 1122 - 10/5/2011 7:58:22 PM
Message:
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle (loaded)' with name 'MainWindowIPad'
Stack Trace:
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) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29 at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:34 at Coolfindz.Application.Main (System.String[] args) [0x00016] in /Users/dj_technohead/Projects/Coolfindz/Coolfindz/Main.cs:21
Notes:
Application version: 0.2.32
IOS version: 4.32


What's weird is that I have removed all reference to MainWindowIPad from the solution since we're not going to be targeting ipad. Not all the testers have reported this problem though.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2011-10-06 16:50:59 UTC
Does it happen with any project you create, or just this one?

And can you send me the binary to see if I can reproduce it on my device?
Comment 6 dj_technohead 2011-10-06 17:32:41 UTC
Attached a version of the app made from the laptop. Unfortunately, I did not try any other project to see if the same problem occurred.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2011-10-07 07:54:19 UTC
I can reproduce the crash, I get this printed in the console when clicking on the log button:

Oct  7 13:51:26 unknown UIKitApplication:com.coolfindz.dinnerclub[0x5a17][5706] <Notice>: 07/10/2011 13:51:26::Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/AC5080FF-AC78-4771-A8FF-D8D91921CE36/Coolfindz.app> (loaded)' with name 'LogViewController' - ::  at MonoTouch.UIKit.UINavigationController.PushViewController (MonoTouch.UIKit.UIViewController viewController, Boolean animated) [0x00000] in <filename unknown>:0 

Oct  7 13:51:26 unknown UIKitApplication:com.coolfindz.dinnerclub[0x5a17][5706] <Notice>:   at Coolfindz.iPhoneLoginViewController.handleBtnViewLogTouchUpInside (System.Object sender, System.EventArgs e) [0x00006] in /Users/technohead/Projects/Coolfindz/Coolfindz/iPhone/iPhoneLoginViewController.xib.cs:85 

it's complaining that it can't find the nib LogViewController - but there is no LogViewController.nib in your project. Can you attach your project file (only the csproj file) to see if there is something wrong there?
Comment 8 dj_technohead 2011-10-10 12:26:02 UTC
Hi Rolf,
   I don't believe it is the project file, as I have built it successfully using a different computer. I can no longer reproduce the problem, as I completely wiped my laptop and rebuilt the software stack as I needed a working laptop environment in a hurry due to need to submit to Apple whilst on the road. Now that the laptop has been rebuilt, the same solution builds fine. 

   Perhaps close this report for now, and reopen again should someone else report something similar.

Dennis
Comment 9 Rolf Bjarne Kvinge [MSFT] 2011-10-10 16:05:06 UTC
OK, I'll close the bug report for now, please reopen if you run into it again.