Bug 38304 - NSInternalInconsistencyException Reason: Could not load NIB in bundle
Summary: NSInternalInconsistencyException Reason: Could not load NIB in bundle
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.4 (iOS 9.2)
Hardware: Macintosh Mac OS
: --- major
Target Milestone: (C7)
Assignee: Bugzilla
Depends on:
Reported: 2016-02-02 14:56 UTC by Nate Cook
Modified: 2016-02-02 17:54 UTC (History)
3 users (show)

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

screenshot of exception (447.18 KB, image/png)
2016-02-02 14:56 UTC, Nate Cook

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:

Description Nate Cook 2016-02-02 14:56:24 UTC
Per Brendan's comment "If anyone finds an additional scenario where resources are missing after the update from Xamarin.iOS 9.4.0 to 9.4.1, please file a new quick bug report" here https://bugzilla.xamarin.com/show_bug.cgi?id=38206

# Steps to reproduce
1. Install the stable build prior to C6SR1.
2. Manually upgrade Mono to by installing "MonoFramework-MDK-" (I did this so I could debug using the ASP.NET 5 Xamarin Studio add-in.)
3. Using Xamarin Studio, upgrade all components included with C6SR1 EXCEPT for Mono, such that your Mono version continues to be
4. Run an iOS app with UIMainNibFile in the Info.plist pointing to a nib file not in the root. Our setting is set to
Note that the actual path is Controllers/Login/AppUI.xib

# Expected behavior
App should launch as it used to before the upgrade.

# Actual behavior
Exception on launch: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle </Users/ncook/Library/Developer/CoreSimulator/Devices/6CC03FC8-9403-4A4F-A303-7C30B824C589/data/Containers/Bundle/Application/986A42DB-4EF3-416F-B721-8C3E5B587873C2/OurAppName.app> (loaded)' with name 'AppUI' Native stack trace...

WORKAROUND: I used Xamarin Studio's Check for Updates again and installed the version of Mono that was bundled with C6SR1. After that the app launched again, as before.

# Supplemental info (logs, images, videos)
Will attach screenshot

# Test environment (full version information)
As described above
Comment 1 Nate Cook 2016-02-02 14:56:52 UTC
Created attachment 14848 [details]
screenshot of exception
Comment 2 Sebastien Pouliot 2016-02-02 16:18:37 UTC
The system's mono version should not have any direct impact on what gets inside the .app. However the original issue with SR1, before, was a build cache state corruption. That makes it tricky to track down as many thing can influence it.

Unless you're able to duplicate this (e.g. by downgrading mono to your previous version) it really sounds like that (part of) the application was rebuilt (i.e. the cache got invalidated). That can happen when some project dependencies changes (and updating the system mono, i.e. the C# compiler, could trigger this).

If you can duplicate this can you attach all version informations [1] and the build logs so we can see if and when the cache was used.

[1] The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
Comment 3 Nate Cook 2016-02-02 16:30:20 UTC
Thanks. What you say makes sense. Since this is not affecting me at the moment please just close this ticket and I will update with more information if I run into it again (which seems unlikely, unless I were downgrade and then re-upgrade, which is something I just don't have time to do right now).
Comment 4 Sebastien Pouliot 2016-02-02 17:54:53 UTC
No problem, please let us know if you ever hit something like this again!