【发布时间】:2015-06-19 07:59:20
【问题描述】:
该应用在 iphone 模拟器中运行时运行良好,但在 ipad 视网膜模拟器中运行时,我看到此崩溃:
2015-04-15 18:39:13.814 [17308:2881892] *** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“无法在包中加载 NIB:“NSBundle .app>(已加载)”名称为 '7bK-jq-Zjz-view-r7i-6Z-zg0''
不知道发生了什么。我没有这个奇怪名称的 nib/xib 文件:'7bK-jq-Zjz-view-r7i-6Z-zg0'
我已经有一段时间没有尝试运行 ipad 模拟器了。我同时发生了一些大的变化(我不确定这是否导致了这个问题): 1.重命名项目 2. 升级到 Swift 1.2 。将项目恢复到此更改之前无济于事,因为 Sift 已经在 1.2 上。
我将如何解决它?
更新
我查看了情节提要源代码(根据 Kamal 的建议),发现“7bK-jq-Zjz”是表格视图控制器的 ID(此控制器是选项卡栏控制器的第一个选项卡,它依次是拆分视图控制器的主视图)。
奇怪代码的第二部分,“r7i-6Z-zg0”,原来是上述表格视图控制器中表格视图的 ID。
我尝试了两件事:
- 重新创建了拆分视图控制器和标签栏控制器。与 ipad 模拟器相同的崩溃(仍然 iphone 模拟器运行良好)。
- 重新创建了麻烦的表视图控制器。仍然看到相同的崩溃,现在使用不同的代码/签名,因为 ID 现在是新的(对于新创建的表和表视图控制器)。
这是新的崩溃:
2015-04-17 22:10:01.427 [33373:6444860] *** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“无法在包中加载 NIB:“NSBundle .app>(已加载)”名称为“3hh-RB-vwq-view-1d1-Kq-Vzm”
如前所述,iPhone 模拟器运行良好 - iPad 不行。但 iPhone 6 plus 有时会在定向到横向模式时崩溃(即当拆分视图未折叠时)。
--结束更新
*** 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
【问题讨论】:
-
您链接的任何第三方库都可能具有该笔尖?
-
这是完整的错误信息吗?想知道“……”。如果不是,请将其添加到问题中。
-
我用完整的错误代码更新了问题。没有使用第三方库。
-
我没有找到一个可以接受的答案,但这个有很多赞成票:stackoverflow.com/questions/8689235/…
-
嘿伙计尝试一件事,右键单击您的情节提要并使用源代码打开。在那里你会看到 xib 和编码。在那里你搜索这个看起来很奇怪的文本(笔尖名称)。如果你在那里发现了什么,请告诉我。