NSInternalInconsistencyException - Containerview is required

-1

I am still fairly new to objective-c and I am looking for some help figuring a crash on my App.

In my storyboard I basically have a containerview which is using an embed segue to display a UITableView. Basically everything has been working fine for months, but now I am getting this crash whenever the AddPOIViewController is accessed (view does not appear). The builds without warnings or errors. Any help would be greatly appreciated.

* Assertion failure in -[UIStoryboardEmbedSegue perform], /SourceCache/UIKit_Sim/UIKit-2903.23/UIStoryboardEmbedSegue.m:18 * thread #1: tid = 0xd9c7c2, 0x0202988a libobjc.A.dylibobjc_exception_throw, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1 frame #0: 0x0202988a libobjc.A.dylibobjc_exception_throw frame #1: 0x02afe448 CoreFoundation+[NSException raise:format:arguments:] + 136 frame #2: 0x019fcfee Foundation-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 frame #3: 0x01225438 UIKit-[UIStoryboardEmbedSegue perform] + 154 frame #4: 0x010bf07e UIKit-[UIStoryboardSegueTemplate _perform:] + 174 frame #5: 0x010bf0f9 UIKit-[UIStoryboardSegueTemplate perform:] + 115 frame #6: 0x00c9e2bd UIKit-[UIViewController loadViewIfRequired] + 605 frame #7: 0x00c9e5b4 UIKit-[UIViewController view] + 35 frame #8: 0x00cadab9 UIKit-[UIViewController shouldAutorotate] + 36 frame #9: 0x00cade01 UIKit-[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 297 frame #10: 0x00f325e5 UIKit-[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 2330 frame #11: 0x00caa0fc UIKit-[UIViewController presentViewController:withTransition:completion:] + 6433 frame #12: 0x00caa61f UIKit-[UIViewController presentViewController:animated:completion:] + 130 frame #13: 0x00caa65f UIKit-[UIViewController presentModalViewController:animated:] + 56 frame #14: 0x010cee16 UIKit-[UIStoryboardModalSegue perform] + 271 frame #15: 0x010bf07e UIKit-[UIStoryboardSegueTemplate _perform:] + 174 frame #16: 0x010bf0f9 UIKit-[UIStoryboardSegueTemplate perform:] + 115 frame #17: 0x0203b874 libobjc.A.dylib-[NSObject performSelector:withObject:withObject:] + 77 frame #18: 0x00b8c0c2 UIKit-[UIApplication sendAction:to:from:forEvent:] + 108 frame #19: 0x00e60c9b UIKit-[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139 frame #20: 0x0203b874 libobjc.A.dylib-[NSObject performSelector:withObject:withObject:] + 77 frame #21: 0x00b8c0c2 UIKit-[UIApplication sendAction:to:from:forEvent:] + 108 frame #22: 0x00b8c04e UIKit-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61 frame #23: 0x00c840c1 UIKit-[UIControl sendAction:to:forEvent:] + 66 frame #24: 0x00c84484 UIKit-[UIControl _sendActionsForEvents:withEvent:] + 577 frame #25: 0x00c83733 UIKit-[UIControl touchesEnded:withEvent:] + 641 frame #26: 0x00bc951d UIKit-[UIWindow sendTouchesForEvent:] + 852 frame #27: 0x00bca184 UIKit-[UIWindow sendEvent:] + 1232 frame #28: 0x00b9de86 UIKit-[UIApplication sendEvent:] + 242 frame #29: 0x00b8818f UIKit_UIApplicationHandleEventQueue + 11421 frame #30: 0x02a8783f CoreFoundation_CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 frame #31: 0x02a871cb CoreFoundation__CFRunLoopDoSources0 + 235 frame #32: 0x02aa429e CoreFoundation__CFRunLoopRun + 910 frame #33: 0x02aa3ac3 CoreFoundationCFRunLoopRunSpecific + 467 frame #34: 0x02aa38db CoreFoundationCFRunLoopRunInMode + 123 frame #35: 0x03a759e2 GraphicsServicesGSEventRunModal + 192 frame #36: 0x03a75809 GraphicsServicesGSEventRun + 104 frame #37: 0x00b8ad3b UIKitUIApplicationMain + 1225 frame #38: 0x0000206d Pawclub.camain(argc=1, argv=0xbfffeed4) + 141 at main.m:16 2013-11-18 12:56:41.093 Pawclub.ca[70486:70b] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'containerView is required.' ** First throw call stack: ( 0 CoreFoundation 0x02afe5e4 exceptionPreprocess + 180 1 libobjc.A.dylib 0x020298b6 objc_exception_throw + 44 2 CoreFoundation 0x02afe448 +[NSException raise:format:arguments:] + 136 3 Foundation 0x019fcfee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 4 UIKit 0x01225438 -[UIStoryboardEmbedSegue perform] + 154 5 UIKit 0x010bf07e -[UIStoryboardSegueTemplate _perform:] + 174 6 UIKit 0x010bf0f9 -[UIStoryboardSegueTemplate perform:] + 115 7 UIKit 0x00c9e2bd -[UIViewController loadViewIfRequired] + 605 8 UIKit 0x00c9e5b4 -[UIViewController view] + 35 9 UIKit 0x00cadab9 -[UIViewController shouldAutorotate] + 36 10 UIKit 0x00cade01 -[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 297 11 UIKit 0x00f325e5 -[UIWindowController transition: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 perform] + 271 16 UIKit 0x010bf07e -[UIStoryboardSegueTemplate _perform:] + 174 17 UIKit 0x010bf0f9 -[UIStoryboardSegueTemplate perform:] + 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: terminating with uncaught exception of type NSException Program ended with exit code: 0

ios
objective-c
asked on Stack Overflow Nov 18, 2013 by colossalhead

2 Answers

0

Try to set breakpoints and find the exact line that crashes?

answered on Stack Overflow Nov 18, 2013 by pfrank
0

Sounds like the segue is being run more than once. Either your calling perform segue or some other actions is trying to call it again while it's active. There's an internal assertion being hit.

Just don't do that ;)

answered on Stack Overflow Jan 16, 2014 by user1190654

User contributions licensed under CC BY-SA 3.0