【问题标题】:was unable to load a nib named无法加载名为
【发布时间】:2010-12-06 01:32:59
【问题描述】:

我刚刚发布了我的新应用 iBeat,在发布之前它对我和我的朋友都很好。

现在似乎很多客户都会遇到同样的崩溃,而且总是在相似的阶段发生。

这是一个(符号化的)示例崩溃报告:

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x30d7c2d4
Crashed Thread:  0

Application Specific Information:
*** Terminating app due to uncaught exception \'NSInternalInconsistencyException\', reason: \'Could not load NIB in bundle: \'NSBundle </var/mobile/Applications/5BBE8B5E-ECF5-4CA8-97A6-1F5BF8AC7792/iBeat.app> (loaded)\' with name \'SettingsVC_iPad\'\'

Thread 0 Crashed:
0   libSystem.B.dylib                   0x000792d4 __kill + 8
1   libSystem.B.dylib                   0x000792bd raise + 17
2   iBeat                               0x0003f301 uncaught_exception_handler (PLCrashReporter.m:137)
3   CoreFoundation                      0x000a0adf __handleUncaughtException + 239
4   libobjc.A.dylib                     0x00006593 _objc_terminate + 103
5   libstdc++.6.dylib                   0x00042df9 __cxxabiv1::__terminate(void (*)()) + 53
6   libstdc++.6.dylib                   0x00042e4d std::terminate() + 17
7   libstdc++.6.dylib                   0x00042f1d __cxa_throw + 85
8   libobjc.A.dylib                     0x000054cb objc_exception_throw + 71
9   CoreFoundation                      0x000a07c9 +[NSException raise:format:arguments:] + 69
10  CoreFoundation                      0x000a0803 +[NSException raise:format:] + 35
11  UIKit                               0x001e9783 -[UINib instantiateWithOwner:options:] + 1111
12  UIKit                               0x001eab39 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 93
13  UIKit                               0x0013e8e5 -[UIViewController _loadViewFromNibNamed:bundle:] + 37
14  UIKit                               0x0013dcb9 -[UIViewController loadView] + 81
15  UIKit                               0x0003e227 -[UIViewController view] + 31
16  UIKit                               0x0004ad0b -[UIViewController contentScrollView] + 23
17  UIKit                               0x0004ab7b -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 31
18  UIKit                               0x0004aa79 -[UINavigationController _layoutViewController:] + 25
19  UIKit                               0x0004a551 -[UINavigationController _startTransition:fromViewController:toViewController:] + 381
20  UIKit                               0x0004a35f -[UINavigationController _startDeferredTransitionIfNeeded] + 183
21  UIKit                               0x0004a2a3 -[UINavigationController viewWillLayoutSubviews] + 15
22  UIKit                               0x0004a23f -[UILayoutContainerView layoutSubviews] + 139
23  UIKit                               0x000130cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 27
24  CoreFoundation                      0x0003ebbf -[NSObject(NSObject) performSelector:withObject:] + 23
25  QuartzCore                          0x0000f685 -[CALayer layoutSublayers] + 121
26  QuartzCore                          0x0000f43d CALayerLayoutIfNeeded + 185
27  QuartzCore                          0x0000f377 -[CALayer layoutIfNeeded] + 79
28  UIKit                               0x0008c48f -[UIView(Hierarchy) layoutIfNeeded] + 23
29  UIKit                               0x000d0ec1 -[UIViewController window:willAnimateRotationToInterfaceOrientation:duration:] + 357
30  UIKit                               0x00110e49 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 3101
31  UIKit                               0x000cf6db -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 679
32  UIKit                               0x000cefc7 -[UIViewController presentModalViewController:withTransition:] + 2139
33  UIKit                               0x000ce6a3 -[UIViewController presentModalViewController:animated:] + 59
34  iBeat                               0x000044f3 -[MetronomeVC settingsTapped] (MetronomeVC.m:956)

此崩溃发生在所有支持的 iOS 版本中,具有不同的 nib 文件,即 SettingsVC_iPad、InfoVC_iPhone 或 Settings_VC_iPhone。

问题是,我无法在我的 iPod 和 iPad 上重现此错误。

有什么建议吗? (这个崩溃似乎很常见,我已经收到了 200 个崩溃报告)

编辑:澄清一下,我确实对从 App Store 下载的版本进行了试验,因此我尝试使用发生错误的确切版本重新创建它。

【问题讨论】:

  • 如果您从应用商店下载该应用,您能否重现错误?这可能是 iOS 版本的问题。
  • 会不会是内存不足崩溃?尝试打开一堆东西,然后打开您的应用,看看是否可以重现崩溃。
  • 你的 nib 文件叫什么名字?
  • nib 文件的名称是“InfoVC_iPhone.xib”,它有德语和英语版本,但我测试将我的 iPad 切换为德语和英语,仍然无法重现错误.

标签: iphone objective-c cocoa-touch crash-reports


【解决方案1】:

我不确定它是否解决了你的问题..但我强烈怀疑这是错误...

我认为当你打包你的应用程序时,你没有将你的 nib 文件复制到你的项目中,并且那里只有一个参考..

您没有收到此错误,因为您可能正在从您的开发 mac 中获取您的应用程序,并且 nib 文件的引用存在于那里..

从你的 iphone 中删除应用程序并尝试从应用商店下载应用程序然后查看..

【讨论】:

  • 不幸的是我就是这么做的,因为这也是我的第一个猜测。我从我的 iPad 和 iTunes 中删除了该应用程序,从商店下载并与 iTunes 同步。之后我无法重新创建错误并被卡住了。这就是为什么我不得不在这里问。
【解决方案2】:

很抱歉给您带来不便,但这完全是我的错。

在开发的早期,我打算做一个法语版本,所以我有一个我从未删除过的 fr.lproj 文件夹。显然,当以法语启动时,该应用仍在那里寻找我的 IB 文件的法语版本。

“On n'a jamais fini d'apprendre。”

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-08
    • 2017-05-03
    • 2014-12-24
    • 1970-01-01
    • 1970-01-01
    • 2011-01-24
    • 2014-11-07
    相关资源
    最近更新 更多