I know this is a general question, but I hope that someone who has had a similar experience may have an idea of ββwhat is probably happening.
I get an error message only on iOS 9 in our iPad app. It indicates an NSInternalInconsistencyException .
This happens both in portrait and landscape modes, as well as in many generations of the iPad (iPad 2, iPad Pro, iPad 4, ...).
I don't have auto-layout anywhere in the project , but this seems like an auto-layout problem.
Itβs very difficult to replicate, so I canβt debug it on Xcode, but I see reports in the Crashlytics Critical Analysis Service. Here's the stack trace from Crashlytics:
Auto layout internal error. Cannot find an outgoing row head for incoming head <unknown var (bug!) with engine as delegate[...] Thread : Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x23d4568b __exceptionPreprocess 1 libobjc.A.dylib 0x356c2e17 objc_exception_throw 2 CoreFoundation 0x23d455d1 -[NSException initWithCoder:] 3 Foundation 0x24a873b3 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] 4 Foundation 0x24a86e4d -[NSISEngine optimize] 5 Foundation 0x24a82a53 -[NSISEngine withBehaviors:performModifications:] 6 UIKit 0x27e040bb -[UIView(Hierarchy) _postMovedFromSuperview:] 7 UIKit 0x280fb227 __UIViewWasRemovedFromSuperview 8 UIKit 0x27e02ddb -[UIView(Hierarchy) removeFromSuperview] 9 UIKit 0x282e5fa9 -[UIKeyboardPredictionView setPredictionViewState:animate:notify:] 10 UIKit 0x281e3787 -[UIKeyboardImpl updatePredictionView] 11 UIKit 0x27f155e3 -[UIKeyboardImpl finishLayoutChangeWithArguments:] 12 UIKit 0x27e31437 -[UIKeyboardImpl updateLayout] 13 UIKit 0x27e36077 -[UIKeyboardImpl setDelegate:force:] 14 UIKit 0x27e2f6e1 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] 15 UIKit 0x27e2f20d -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] 16 UIKit 0x27e8d853 -[UIResponder becomeFirstResponder] 17 UIKit 0x27e8db6d -[UIView(Hierarchy) becomeFirstResponder] 18 UIKit 0x27f12289 -[UITextField becomeFirstResponder] 19 UIKit 0x27fbe69f -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] 20 UIKit 0x27fbdc75 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] 21 UIKit 0x28334e27 _UIGestureRecognizerSendTargetActions 22 UIKit 0x27fa2303 _UIGestureRecognizerSendActions 23 UIKit 0x27e3a7af -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] 24 UIKit 0x28335f2f ___UIGestureRecognizerUpdate_block_invoke809 25 UIKit 0x27dfc287 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks 26 UIKit 0x27df9e77 _UIGestureRecognizerUpdate 27 UIKit 0x27e386f9 -[UIWindow _sendGesturesForEvent:] 28 UIKit 0x27e37e43 -[UIWindow sendEvent:] 29 UIKit 0x27e097e5 -[UIApplication sendEvent:] 30 UIKit 0x27e07fdf _UIApplicationHandleEventQueue 31 CoreFoundation 0x23d08c3f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 32 CoreFoundation 0x23d0882d __CFRunLoopDoSources0 33 CoreFoundation 0x23d06b9b __CFRunLoopRun 34 CoreFoundation 0x23c5a249 CFRunLoopRunSpecific 35 CoreFoundation 0x23c5a035 CFRunLoopRunInMode 36 GraphicsServices 0x2cd24ad1 GSEventRunModal 37 UIKit 0x27e6f899 UIApplicationMain 38 Mr Appliance 0xcda7b main (main.m:16) 39 libdyld.dylib 0x35e0e873 start
The problem is that I do not know where in the code this happens. The stack trace does not show where the code crashed. It says only main.m line 16 , which return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); .
source share