2

The app runs fine when run on in the iphone simulator, but running it in the ipad retina simulator, I see this crash:

2015-04-15 18:39:13.814 [17308:2881892] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle .app> (loaded)' with name '7bK-jq-Zjz-view-r7i-6Z-zg0''

Not sure what is going on. I do not have nib/xib files with this weird name: '7bK-jq-Zjz-view-r7i-6Z-zg0'

It has been some time since I tried running the ipad simulator. I the meantime some big changes took place (which I am not sure if it resulted in this issue): 1. Renamed the project 2. Upgraded to Swift 1.2 . It does not help reverting the project to before this change, since Sift is already on 1.2.

How would I go about troubleshooting it?

UPDATE

I looked in the storyboard source (as per Kamal's suggestion) and found that '7bK-jq-Zjz' was the ID of a table view controller (this controller is the first tab of a tab bar controller, which in turn is the master view of a split view controller).

The second part of the weird code, 'r7i-6Z-zg0', turned out to be the ID of the table view inside the mentioned table view controller.

I tried two things:

  1. Recreated the split view controller and tab bar controller. Same crash seen with the ipad simulator (still iphone simulator running fine).
  2. Recreated the troublesome table view controller. Still see the same crash, now with a different code/signature since the ID's are now new (for newly created table and table view controller).

Here is the new crash:

2015-04-17 22:10:01.427 [33373:6444860] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle .app> (loaded)' with name '3hh-RB-vwq-view-1d1-Kq-Vzm''

As mentioned iPhone simulators run fine - iPads not. But the iPhone 6 plus sometimes crashes when orientating to landscape mode (i.e. when the split view is not collapsed).

-- end update

*** First throw call stack:
(
    0   CoreFoundation                      0x0031f746 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x01f33a97 objc_exception_throw + 44
    2   CoreFoundation                      0x0031f66d +[NSException raise:format:] + 141
    3   UIKit                               0x0109fe2f -[UINib instantiateWithOwner:options:] + 1003
    4   UIKit                               0x00eba124 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
    5   UIKit                               0x00eba8bb -[UIViewController loadView] + 295
    6   UIKit                               0x010c069e -[UITableViewController loadView] + 77
    7   UIKit                               0x00ebaaef -[UIViewController loadViewIfRequired] + 78
    8   UIKit                               0x00ebb095 -[UIViewController view] + 35
    9   UIKit                               0x00f0ad2f -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 426
    10  UIKit                               0x00f0a36f -[UITabBarController transitionFromViewController:toViewController:] + 64
    11  UIKit                               0x00f0652b -[UITabBarController _setSelectedViewController:] + 339
    12  UIKit                               0x00f062e5 -[UITabBarController setSelectedIndex:] + 115
    13  UIKit                               0x00f05e91 __51-[UITabBarController _setViewControllers:animated:]_block_invoke394 + 43
    14  UIKit                               0x00ddfd4f +[UIView(Animation) performWithoutAnimation:] + 82
    15  UIKit                               0x00f05d3d -[UITabBarController _setViewControllers:animated:] + 3627
    16  UIKit                               0x00f04403 -[UITabBarController _updateLayoutForTraitCollection:] + 302
    17  UIKit                               0x00f03e73 __80-[UITabBarController willTransitionToTraitCollection:withTransitionCoordinator:]_block_invoke + 69
    18  UIKit                               0x0125f107 -[_UIViewControllerNullAnimationTransitionCoordinator _applyBlocks:releaseBlocks:] + 198
    19  UIKit                               0x0125ed9a -[_UIViewControllerNullAnimationTransitionCoordinator _runAlongsideAnimations] + 148
    20  UIKit                               0x00ed8063 -[UIViewController(UIContainerViewControllerProtectedMethods) setOverrideTraitCollection:forChildViewController:] + 399
    21  UIKit                               0x01248a10 -[UISplitViewController _setMasterOverrideTraitCollectionActive:] + 127
    22  UIKit                               0x0124435a -[UISplitViewController initWithCoder:] + 112
    23  UIKit                               0x0122392e UINibDecoderDecodeObjectForValue + 739
    24  UIKit                               0x01223643 -[UINibDecoder decodeObjectForKey:] + 371
    25  UIKit                               0x010a0c1a -[UIRuntimeConnection initWithCoder:] + 189
    26  UIKit                               0x0122392e UINibDecoderDecodeObjectForValue + 739
    27  UIKit                               0x01223b30 UINibDecoderDecodeObjectForValue + 1253
    28  UIKit                               0x01223643 -[UINibDecoder decodeObjectForKey:] + 371
    29  UIKit                               0x0109fed0 -[UINib instantiateWithOwner:options:] + 1164
    30  UIKit                               0x0135d185 -[UIStoryboard instantiateViewControllerWithIdentifier:] + 220
    31  UIKit                               0x0135d301 -[UIStoryboard instantiateInitialViewController] + 74
    32  UIKit                               0x00d556fc -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 79
    33  UIKit                               0x00d55984 -[UIApplication _loadMainInterfaceFile] + 245
    34  UIKit                               0x00d542f4 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1337
    35  UIKit                               0x00d6d93e __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
    36  UIKit                               0x00d5304a -[UIApplication workspaceDidEndTransaction:] + 155
    37  FrontBoardServices                  0x0451ec9e __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
    38  FrontBoardServices                  0x0451e72f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
    39  FrontBoardServices                  0x04530d7c __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 30
    40  CoreFoundation                      0x00241050 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
    41  CoreFoundation                      0x00236963 __CFRunLoopDoBlocks + 195
    42  CoreFoundation                      0x002367bb __CFRunLoopRun + 2715
    43  CoreFoundation                      0x00235a5b CFRunLoopRunSpecific + 443
    44  CoreFoundation                      0x0023588b CFRunLoopRunInMode + 123
    45  UIKit                               0x00d52a02 -[UIApplication _run] + 571
    46  UIKit                               0x00d56106 UIApplicationMain + 1526
    47  IDZZZ                               0x000a3ad4 main + 180
    48  libdyld.dylib                       0x02644ac9 start + 1
Elardus Erasmus
  • 125
  • 1
  • 11
  • Any 3rd party libraries you link with that might have that nib? – onnoweb Apr 13 '15 at 21:17
  • Is that the full error message? Wondering about "...". If not please add it to the question. – zaph Apr 13 '15 at 22:21
  • I updated the question with the full error code. No 3rd party libraries in use. – Elardus Erasmus Apr 15 '15 at 17:27
  • I didn't find one of these with an accepted answer but this one has a lot of upvotes: http://stackoverflow.com/questions/8689235/could-not-load-nib-in-bundle-nsbundle-when-using-storyboarding?rq=1 – BSMP Apr 15 '15 at 19:42
  • Hey man try one thing, right click on your storyboard and open with source code. There you will see xib and coding. There you search this weird looking text(nib name). let me know if you found something there. – Kamal Bhardwaj Apr 17 '15 at 11:53
  • Kamal, I did this and updated my question.Thanks. – Elardus Erasmus Apr 17 '15 at 20:27
  • Thank you. I had the same exact error right down to the same hex identifier. It was hopeless to figure out, even scanning the XML file. My surprise that this only does this on an 8.3 ipad where it worked on all the simulators and other people's ipads I tried. Hopefully it will work on iOS9 as well and iPhones. Probably will blow iOS7 out of the water. – Dr. Polar Humenn Dec 09 '15 at 03:51

3 Answers3

3

I had this issue starting with iOS 8.3 and finally solved it yesterday. I had hoped the issue would be fixed in iOS 8.4 but it isn't so I'm assuming it isn't considered a bug.

I have a UISplitViewController with 2 UINavigationControllers as the master/detail views. The master view UINavigationController has a UITabBarController. When this was failing, there were 3 UITableViewControllers as the child views for the UITabBarController. The error was exactly what you have: iOS 8.3+ throws an error trying to load the first child view of the tab bar even though the "nib" is definitely there in the storyboard and works fine on iPhone.

The fix for me was to insert a UINavigationController between the UITabBarController and each of the UITableViewController child views. So instead of UITabBarController with "view controller" relationships to 3 UITableViewControllers, the UITabBarController now has "view controllers" relationships to 3 UINavigationControllers and each of those UINavigationControllers have "root view controller" relationships to one of the UITableViewControllers.

This may be too late but I hope it helps someone.

sirshannon
  • 186
  • 1
  • 4
2

Are you using UISplitController? In this case I solved my issue removing the storyboard segue for master and detail and adding them programmatically

Davide Gianessi
  • 263
  • 3
  • 4
  • Yes I am using a split view controller. Will need to learn how to add these segues programmatically though. Will revert once I have done that. Thanks for the suggestion. – Elardus Erasmus Apr 17 '15 at 20:26
  • Yup, this does indeed work around the bug. However it is indeed a bug as you should not have to do this. Is there a bug in radar. – lostintranslation Apr 21 '15 at 21:31
  • lostintranslation, can you maybe give a few pointers as to how to do this? – Elardus Erasmus Apr 22 '15 at 16:28
  • In the storyboard set the storyboard ids for your detail view and your master view. To get your detail and master views from the storyboard check here: http://stackoverflow.com/questions/8186375/storyboard-refer-to-viewcontroller-in-appdelegate. After that just set your split view controllers views, svc.viewControllers = @[masterVC, detailVC]; – lostintranslation Apr 23 '15 at 00:11
0

Are you sure you included everything? Make sure to select all the storyboards and add to membership, in side bar, first tab.

Schemetrical
  • 5,246
  • 2
  • 22
  • 42
  • There is only one storyboard in the project. It is listed in "copy bundle resource" (with "Target membership" being ticked for the build). Is there some other place where it should be "included"? The other thing listed in the resources is the "Images.xcassets" file. Do I need more/others? – Elardus Erasmus Apr 15 '15 at 17:30