NSInternalInconsistencyException - 需要Containerview

时间:2013-11-18 20:38:47

标签: ios objective-c

我对objective-c仍然相当新,我正在寻找一些帮助来解决我的应用程序崩溃。

在我的故事板中,我基本上有一个containerview,它使用embed segue来显示UITableView。基本上一切都运行良好数月,但现在每当访问AddPOIViewController时我都会遇到此崩溃(视图没有出现)。没有警告或错误的构建。任何帮助将不胜感激。

*断言失败 - [UIStoryboardEmbedSegue perform],/ SourceCache / UIKit_Sim / UIKit-2903.23 / UIStoryboardEmbedSegue.m:18 * thread#1:tid = 0xd9c7c2,0x0202988a libobjc.A.dylib objc_exception_throw, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1 frame #0: 0x0202988a libobjc.A.dylib objc_exception_throw     帧#1:0x02afe448 CoreFoundation +[NSException raise:format:arguments:] + 136 frame #2: 0x019fcfee Foundation - [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116     帧#3:0x01225438 UIKit -[UIStoryboardEmbedSegue perform] + 154 frame #4: 0x010bf07e UIKit - [UIStoryboardSegueTemplate _perform:] + 174     帧#5:0x010bf0f9 UIKit -[UIStoryboardSegueTemplate perform:] + 115 frame #6: 0x00c9e2bd UIKit - [UIViewController loadViewIfRequired] + 605     帧#7:0x00c9e5b4 UIKit -[UIViewController view] + 35 frame #8: 0x00cadab9 UIKit - [UIViewController shouldAutorotate] + 36     帧#9:0x00cade01 UIKit -[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 297 frame #10: 0x00f325e5 UIKit - [UIWindowController转换:fromViewController:toViewController:target:didEndSelector:animation:] + 2330     帧#11:0x00caa0fc UIKit -[UIViewController presentViewController:withTransition:completion:] + 6433 frame #12: 0x00caa61f UIKit - [UIViewController presentViewController:animated:completion:] + 130     帧#13:0x00caa65f UIKit -[UIViewController presentModalViewController:animated:] + 56 frame #14: 0x010cee16 UIKit - [UIStoryboardModalSegue执行] + 271     帧#15:0x010bf07e UIKit -[UIStoryboardSegueTemplate _perform:] + 174 frame #16: 0x010bf0f9 UIKit - [UIStoryboardSegueTemplate执行:] + 115     帧#17:0x0203b874 libobjc.A.dylib -[NSObject performSelector:withObject:withObject:] + 77 frame #18: 0x00b8c0c2 UIKit - [UIApplication sendAction:to:from:forEvent:] + 108     帧#19:0x00e60c9b UIKit -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139 frame #20: 0x0203b874 libobjc.A.dylib - [NSObject performSelector:withObject:withObject:] + 77     帧#21:0x00b8c0c2 UIKit -[UIApplication sendAction:to:from:forEvent:] + 108 frame #22: 0x00b8c04e UIKit - [UIApplication sendAction:toTarget:fromSender:forEvent:] + 61     帧#23:0x00c840c1 UIKit -[UIControl sendAction:to:forEvent:] + 66 frame #24: 0x00c84484 UIKit - [UIControl _sendActionsForEvents:withEvent:] + 577     帧#25:0x00c83733 UIKit -[UIControl touchesEnded:withEvent:] + 641 frame #26: 0x00bc951d UIKit - [UIWindow sendTouchesForEvent:] + 852     帧#27:0x00bca184 UIKit -[UIWindow sendEvent:] + 1232 frame #28: 0x00b9de86 UIKit - [UIApplication sendEvent:] + 242     帧#29:0x00b8818f UIKit _UIApplicationHandleEventQueue + 11421 frame #30: 0x02a8783f CoreFoundation _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15     帧#31:0x02a871cb CoreFoundation __CFRunLoopDoSources0 + 235 frame #32: 0x02aa429e CoreFoundation __ CFRunLoopRun + 910     帧#33:0x02aa3ac3 CoreFoundation CFRunLoopRunSpecific + 467 frame #34: 0x02aa38db CoreFoundation CFRunLoopRunInMode + 123     帧#35:0x03a759e2 GraphicsServices GSEventRunModal + 192 frame #36: 0x03a75809 GraphicsServices GSEventRun + 104     帧#37:0x00b8ad3b UIKit UIApplicationMain + 1225 frame #38: 0x0000206d Pawclub.ca main(argc = 1,argv = 0xbfffeed4)+ 141 at main.m:16 2013-11-18 12:56:41.093 Pawclub.ca [70486:70b] 由于未捕获的异常终止应用程序' NSInternalInconsistencyException',原因:& #39;容器视图是必需的。' * *第一次抛出调用堆栈: (     0 CoreFoundation 0x02afe5e4 exceptionPreprocess + 180     1 libobjc.A.dylib 0x020298b6 objc_exception_throw + 44     2 CoreFoundation 0x02afe448 + [NSException raise:format:arguments:] + 136     3基础0x019fcfee - [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116     4 UIKit 0x01225438 - [UIStoryboardEmbedSegue执行] + 154     5 UIKit 0x010bf07e - [UIStoryboardSegueTemplate _perform:] + 174     6 UIKit 0x010bf0f9 - [UIStoryboardSegueTemplate执行:] + 115     7 UIKit 0x00c9e2bd - [UIViewController loadViewIfRequired] + 605     8 UIKit 0x00c9e5b4 - [UIViewController视图] + 35     9 UIKit 0x00cadab9 - [UIViewController shouldAutorotate] + 36     10 UIKit 0x00cade01 - [UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 297     11 UIKit 0x00f325e5 - [UIWindowController转换:fromViewController:toViewController:target:didEndSelector:animation:] + 2330     12 UIKit 0x00caa0fc - [UIViewController presentViewController:withTransition:completion:] + 6433     13 UIKit 0x00caa61f - [UIViewController presentViewController:animated:completion:] + 130     14 UIKit 0x00caa65f - [UIViewController presentModalViewController:animated:] + 56     15 UIKit 0x010cee16 - [UIStoryboardModalSegue执行] + 271     16 UIKit 0x010bf07e - [UIStoryboardSegueTemplate _perform:] + 174     17 UIKit 0x010bf0f9 - [UIStoryboardSegueTemplate执行:] + 115     18 libobjc.A.dylib 0x0203b874 - [NSObject performSelector:withObject:withObject:] + 77     19 UIKit 0x00b8c0c2 - [UIApplication sendAction:to:from:forEvent:] + 108     20 UIKit 0x00e60c9b - [UIBarButtonItem(UIInternal)_sendAction:withEvent:] + 139     21 libobjc.A.dylib 0x0203b874 - [NSObject performSelector:withObject:withObject:] + 77     22 UIKit 0x00b8c0c2 - [UIApplication sendAction:to:from:forEvent:] + 108     23 UIKit 0x00b8c04e - [UIApplication sendAction:toTarget:fromSender:forEvent:] + 61     24 UIKit 0x00c840c1 - [UIControl sendAction:to:forEvent:] + 66     25 UIKit 0x00c84484 - [UIControl _sendActionsForEvents:withEvent:] + 577     26 UIKit 0x00c83733 - [UIControl touchesEnded:withEvent:] + 641     27 UIKit 0x00bc951d - [UIWindow _sendTouchesForEvent:] + 852     28 UIKit 0x00bca184 - [UIWindow sendEvent:] + 1232     29 UIKit 0x00b9de86 - [UIApplication sendEvent:] + 242     30 UIKit 0x00b8818f _UIApplicationHandleEventQueue + 11421     31 CoreFoundation 0x02a8783f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 15     32 CoreFoundation 0x02a871cb __CFRunLoopDoSources0 + 235     33 CoreFoundation 0x02aa429e __CFRunLoopRun + 910     34 CoreFoundation 0x02aa3ac3 CFRunLoopRunSpecific + 467     35 CoreFoundation 0x02aa38db CFRunLoopRunInMode + 123     36 GraphicsServices 0x03a759e2 GSEventRunModal + 192     37 GraphicsServices 0x03a75809 GSEventRun + 104     38 UIKit 0x00b8ad3b UIApplicationMain + 1225     39 Pawclub.ca 0x0000206d main + 141     40 libdyld.dylib 0x0251070d start + 1 ) libc ++ abi.dylib:以NSException类型的未捕获异常终止 程序以退出代码结束:0

2 个答案:

答案 0 :(得分:0)

尝试设置断点并找到崩溃的确切行?

答案 1 :(得分:0)

听起来segue正在运行多次。你的调用执行segue或其他一些动作试图在它激活时再次调用它。有一个内部断言被击中。

不要那样做;)