iOS autolayout crash - where do I start? - ios

The following crash occures. Xcode doesn't report any missing constraint (obiously) and the crash doesn't happen every time.
Clearly I have a bug somewhere - but where do I begin investigating?
Edit:
So after making an exception breakpoint - I'm seeing the crashing thread that is autolayout code.
A different thread has the following
Not shockingly this is a resize of a UILabel - what now?
The crash dump:
RemoveVariableFromSortedPriorityVectorList(NSISObjectiveLinearExpression *, NSISVariable *)(), /SourceCache/Foundation_Sim/Foundation-1047.25/Layout.subproj/IncrementalSimplex/NSISObjectiveLinearExpression.m:136
2014-11-03 00:28:14.899 Cookila copy[3470:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Missing variable UILabel:0x78885670.Width{id: 5777} in variablesSortedByPriorityVectors'
*** First throw call stack:
(
0 CoreFoundation 0x03ba91e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0386a8e5 objc_exception_throw + 44
2 CoreFoundation 0x03ba9048 +[NSException raise:format:arguments:] + 136
3 Foundation 0x03307b20 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 101
4 Foundation 0x03414df4 RemoveVariableFromSortedPriorityVectorList + 386
5 Foundation 0x0329af95 -[NSISObjectiveLinearExpression removeVariable:] + 30
6 Foundation 0x034152b9 -[NSISObjectiveLinearExpression replaceVariable:withExpression:processVariableNewToReceiver:processVariableDroppedFromReceiver:] + 76
7 Foundation 0x0329b3f7 -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 897
8 Foundation 0x0340b5cf -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 421
9 Foundation 0x0329a098 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 287
10 Foundation 0x0340db9d -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 300
11 Foundation 0x03298fc3 -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 780
12 Foundation 0x03417a77 -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 283
13 Foundation 0x03294596 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 252
14 UIKit 0x029ac30d -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 451
15 UIKit 0x029ada4b -[UIView(UIConstraintBasedLayout) _constraints_didChangeAutoresizingConstraintsArrayForContainedView:] + 233
16 UIKit 0x029ad60e -[UIView(UIConstraintBasedLayout) _setAutoresizingConstraints:] + 240
17 UIKit 0x029adea0 -[UIView(UIConstraintBasedLayout) _updateAutoresizingConstraints] + 117
18 UIKit 0x029b77bf -[UIView(AdditionalLayoutSupport) updateConstraints] + 110
19 UIKit 0x029b7058 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 239
20 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
21 UIKit 0x029b7157 __UIViewRecursionHelper + 40
22 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
23 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
24 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
25 UIKit 0x029b7157 __UIViewRecursionHelper + 40
26 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
27 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
28 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
29 UIKit 0x029b7157 __UIViewRecursionHelper + 40
30 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
31 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
32 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
33 UIKit 0x029b7157 __UIViewRecursionHelper + 40
34 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
35 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
36 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
37 UIKit 0x029b7157 __UIViewRecursionHelper + 40
38 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
39 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
40 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
41 UIKit 0x029b7157 __UIViewRecursionHelper + 40
42 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
43 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
44 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
45 UIKit 0x029b7157 __UIViewRecursionHelper + 40
46 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
47 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
48 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
49 UIKit 0x029b7157 __UIViewRecursionHelper + 40
50 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
51 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
52 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
53 UIKit 0x029b7157 __UIViewRecursionHelper + 40
54 CoreFoundation 0x03b4ac69 CFArrayApplyFunction + 57
55 UIKit 0x029b6ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
56 UIKit 0x029b71d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
57 UIKit 0x029ab878 __62-[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded]_block_invoke + 43
58 Foundation 0x0340e68c -[NSISEngine withBehaviors:performModifications:] + 107
59 Foundation 0x0329e3c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
60 UIKit 0x029ab590 -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 225
61 UIKit 0x029b7836 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtWindowLevelIfNeeded] + 85
62 UIKit 0x0237b324 -[UIView(Hierarchy) layoutSubviews] + 62
63 UIKit 0x02388964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
64 libobjc.A.dylib 0x0387c82b -[NSObject performSelector:withObject:] + 70
65 QuartzCore 0x021f045a -[CALayer layoutSublayers] + 148
66 QuartzCore 0x021e4244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
67 QuartzCore 0x021e40b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
68 QuartzCore 0x0214a7fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
69 QuartzCore 0x0214bb85 _ZN2CA11Transaction6commitEv + 393
70 QuartzCore 0x0214c258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
71 CoreFoundation 0x03b7136e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
72 CoreFoundation 0x03b712bf __CFRunLoopDoObservers + 399
73 CoreFoundation 0x03b4f254 __CFRunLoopRun + 1076
74 CoreFoundation 0x03b4e9d3 CFRunLoopRunSpecific + 467
75 CoreFoundation 0x03b4e7eb CFRunLoopRunInMode + 123
76 GraphicsServices 0x045815ee GSEventRunModal + 192
77 GraphicsServices 0x0458142b GSEventRun + 104
78 UIKit 0x02319f9b UIApplicationMain + 1225
79 Cookila copy 0x000e594d main + 141
80 libdyld.dylib 0x0415b701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Well if it is a resize of a UILabel you have constraints on I would try removing the constraints it has, resize it and then set up new constraints (even though they are the same as the previous ones). You can edit/override that method to recibe the label remove and re add constraints.
Code:
[label autoRemoveConstraintsAffectingView];
//Resize
//Add constraints
[self.view needsUpdateConstraints];
[self.view layoutIfNeeded];

Related

Crash when open three time 'NSInternalInconsistencyException', reason: 'Expression 0 + 0.0291667*0 + 0.00277778*369 unable to find variable UIWindow:

This crash happens in a UINavigationController for three times (present and dismiss consequently for 2 times after the first open).
I made a debug by using breakpoints and I figured that it happens in the presented ViewController after the viewWillAppear finish and before the viewWillLayoutSubviews.
However, it didn't stop between my lines of code so I can't detect the cause of the error.
Happens in IOS 12 ONLY (Works fine in IOS 13)
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expression 0 + 0.0291667*0 + 0.00277778*369 unable to find variable UIWindow:0x7fb745603f60.minX{id: 21963} in engine 0x0'
*** First throw call stack:
(
0 CoreFoundation 0x000000011709929b __exceptionPreprocess + 331
1 libobjc.A.dylib 0x0000000116635735 objc_exception_throw + 48
2 CoreFoundation 0x0000000117099022 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000112f5bc10 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 Foundation 0x000000011317221b -[NSISLinearExpression addVariable:coefficient:] + 341
5 UIKitCore 0x000000011ccb8166 -[UIView(AdditionalLayoutSupport) nsli_lowerAttribute:intoExpression:withCoefficient:forConstraint:onBehalfOfLayoutGuide:] + 3120
6 UIKitCore 0x000000011ccb7527 -[UIView(AdditionalLayoutSupport) nsli_lowerAttribute:intoExpression:withCoefficient:forConstraint:] + 289
7 Foundation 0x000000011317e0d3 -[NSLayoutConstraint _lowerIntoExpression:reportingConstantIsRounded:] + 96
8 Foundation 0x000000011317a3e8 -[NSLayoutConstraint _containerGeometryDidChange] + 117
9 UIKitCore 0x000000011cca33fa _UIViewEnumerateConstraints + 710
10 UIKitCore 0x000000011ccb10bc __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 315
11 Foundation 0x000000011316555a -[NSISEngine withBehaviors:performModifications:] + 110
12 UIKitCore 0x000000011ccb0f5a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 572
13 UIKitCore 0x000000011ccb0ce6 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 217
14 UIKitCore 0x000000011ccb1056 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 213
15 Foundation 0x000000011316555a -[NSISEngine withBehaviors:performModifications:] + 110
16 UIKitCore 0x000000011ccb0f5a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 572
17 UIKitCore 0x000000011ccb0ce6 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 217
18 UIKitCore 0x000000011ccb1056 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 213
19 Foundation 0x000000011316555a -[NSISEngine withBehaviors:performModifications:] + 110
20 UIKitCore 0x000000011ccb0f5a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 572
21 UIKitCore 0x000000011ccb0ce6 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 217
22 UIKitCore 0x000000011ccb1056 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 213
23 Foundation 0x000000011316555a -[NSISEngine withBehaviors:performModifications:] + 110
24 UIKitCore 0x000000011ccb0f5a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 572
25 UIKitCore 0x000000011ccb0ce6 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 217
26 UIKitCore 0x000000011ccb1056 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 213
27 Foundation 0x000000011316555a -[NSISEngine withBehaviors:performModifications:] + 110
28 UIKitCore 0x000000011ccb0f5a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 572
29 UIKitCore 0x000000011ccb0ce6 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 217
30 UIKitCore 0x000000011d1d6075 -[UIScrollView _switchToLayoutEngine:] + 106
31 UIKitCore 0x000000011ccb1056 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 213
32 Foundation 0x000000011316555a -[NSISEngine withBehaviors:performModifications:] + 110
33 UIKitCore 0x000000011ccb0f5a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 572
34 UIKitCore 0x000000011ccb0ce6 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 217
35 UIKitCore 0x000000011ccafd4d -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 209
36 UIKitCore 0x000000011cca1712 -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 130
37 UIKitCore 0x000000011d4da793 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 170
38 UIKitCore 0x000000011d4da9ab -[UIView(Internal) _didMoveFromWindow:toWindow:] + 706
39 UIKitCore 0x000000011d4cd091 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151
40 UIKitCore 0x000000011d4ccf70 -[UIView(Hierarchy) _postMovedFromSuperview:] + 804
41 UIKitCore 0x000000011d4dd9a5 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1951
42 UIKitCore 0x000000011d0d17f1 -[UINavigationTransitionView transition:fromView:toView:] + 627
43 UIKitCore 0x000000011d0b63a6 -[UINavigationController _startTransition:fromViewController:toViewController:] + 3189
44 UIKitCore 0x000000011d0b6857 -[UINavigationController _startDeferredTransitionIfNeeded:] + 896
45 UIKitCore 0x000000011d0b7bac -[UINavigationController __viewWillLayoutSubviews] + 150
46 UIKitCore 0x000000011d04363f -[UILayoutContainerView layoutSubviews] + 217
47 UIKitCore 0x000000011d4e4015 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1441
48 QuartzCore 0x0000000114fb6d3d -[CALayer layoutSublayers] + 175
49 QuartzCore 0x0000000114fbbbf7 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395
50 QuartzCore 0x0000000114f34aa6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 342
51 QuartzCore 0x0000000114f6bc2a _ZN2CA11Transaction6commitEv + 576
52 UIKitCore 0x000000011cdf48f5 _afterCACommitHandler + 268
53 CoreFoundation 0x0000000116ffc037 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
54 CoreFoundation 0x0000000116ff64ce __CFRunLoopDoObservers + 430
55 CoreFoundation 0x0000000116ff6b61 __CFRunLoopRun + 1537
56 CoreFoundation 0x0000000116ff6221 CFRunLoopRunSpecific + 625
57 GraphicsServices 0x000000011c65e1dd GSEventRunModal + 62
58 UIKitCore 0x000000011cdcb115 UIApplicationMain + 140
59 Almtaar 0x000000010d43a1ab main + 75
60 libdyld.dylib 0x0000000118e83551 start + 1
61 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

UIView(AdditionalLayoutSupport) _switchToLayoutEngine Xcode Crash

I'm dealing with a weird crash which I didn't find a solution yet for.
The title of the crash in Organizer is UIKit: __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 316 and the whole stacktrace is below.
I've checked the startController(_:) method from AppDelegate and everything seems to be fine. Is it a constraint issue maybe? What else could it be?
Last Exception Backtrace:
0 CoreFoundation 0x1d57bb38 __exceptionPreprocess + 124 (NSException.m:165)
1 libobjc.A.dylib 0x1c803062 objc_exception_throw + 34 (objc-exception.mm:521)
2 CoreFoundation 0x1d580fcc -[NSObject(NSObject) doesNotRecognizeSelector:] + 118 (NSObject.m:328)
3 CoreFoundation 0x1d57f0be ___forwarding___ + 692 (NSForwarding.m:3126)
4 CoreFoundation 0x1d4a7dc4 _CF_forwarding_prep_0 + 20
5 Foundation 0x1ded2b76 -[NSLayoutAnchor nsli_lowerIntoExpression:withCoefficient:forConstraint:] + 498 (NSLayoutAnchor.m:883)
6 Foundation 0x1de1b142 -[NSLayoutConstraint _lowerIntoExpression:reportingConstantIsRounded:] + 104 (NSLayoutConstraint.m:1723)
7 Foundation 0x1de1addc -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 120 (NSLayoutConstraint.m:1606)
8 Foundation 0x1de265b4 -[NSLayoutConstraint _addToEngine:] + 24 (NSLayoutConstraint.m:1621)
9 UIKit 0x228a88b2 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 316 (NSLayoutConstraint_UIKitAdditions.m:3596)
10 Foundation 0x1de1a97e -[NSISEngine withBehaviors:performModifications:] + 258 (NSISEngine.m:1973)
11 UIKit 0x228a873a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 502 (NSLayoutConstraint_UIKitAdditions.m:3585)
12 UIKit 0x227aa5e8 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 216 (NSLayoutConstraint_UIKitAdditions.m:3550)
13 UIKit 0x228e3654 -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 486 (NSLayoutConstraint_UIKitAdditions.m:3333)
14 UIKit 0x228afe20 -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 120 (NSLayoutConstraint_UIKitAdditions.m:563)
15 UIKit 0x227aa6e0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 208 (UIView.m:12461)
16 UIKit 0x227a9ee0 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 120 (UIView.m:9478)
17 UIKit 0x227a9d6c -[UIView(Hierarchy) _postMovedFromSuperview:] + 710 (UIView.m:361)
18 UIKit 0x227b527a -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1636 (UIView.m:13256)
19 UIKit 0x227b4bfe -[UIView(Hierarchy) addSubview:] + 726 (UIView.m:9004)
20 UIKit 0x227b420c -[UIWindow addRootViewControllerViewIfPossible] + 506 (UIWindow.m:1498)
21 UIKit 0x227b15b6 -[UIWindow _setHidden:forced:] + 282 (UIWindow.m:1572)
22 UIKit 0x22821154 -[UIWindow makeKeyAndVisible] + 38 (UIWindow.m:4934)
23 MyApp 0x1c3f28 AppDelegate.startController(_:) + 978 (AppDelegate.swift:207)
24 MyApp 0x1cad3c specialized AppDelegate.application(_:didFinishLaunchingWithOptions:) + 3082 (AppDelegate.swift:141)
25 MyApp 0x1c3a18 #objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 152 (<compiler-generated>:0)
26 UIKit 0x2281d5c0 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 372 (UIApplication.m:1797)
27 UIKit 0x22a1ea46 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3702 (UIApplication.m:2129)
28 UIKit 0x22a23c18 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1636 (UIApplication.m:3625)
29 UIKit 0x22a367c0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3149 + 36 (UIApplication.m:10365)
30 UIKit 0x22a21356 -[UIApplication workspaceDidEndTransaction:] + 138 (UIApplication.m:2989)
31 FrontBoardServices 0x1ee5cc0e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 14 (FBSSerialQueue.m:158)
32 FrontBoardServices 0x1ee5cac8 -[FBSSerialQueue _performNext] + 216 (FBSSerialQueue.m:177)
33 FrontBoardServices 0x1ee5cdb2 -[FBSSerialQueue _performNextFromRunLoopSource] + 40 (FBSSerialQueue.m:206)
34 CoreFoundation 0x1d537fd8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8 (CFRunLoop.c:1941)
35 CoreFoundation 0x1d537b00 __CFRunLoopDoSources0 + 420 (CFRunLoop.c:1989)
36 CoreFoundation 0x1d535f4c __CFRunLoopRun + 1156 (CFRunLoop.c:2821)
37 CoreFoundation 0x1d4891aa CFRunLoopRunSpecific + 466 (CFRunLoop.c:3113)
38 CoreFoundation 0x1d488fcc CFRunLoopRunInMode + 100 (CFRunLoop.c:3143)
39 UIKit 0x22816e28 -[UIApplication _run] + 656 (UIApplication.m:2658)
40 UIKit 0x22811a4e UIApplicationMain + 146 (UIApplication.m:4089)
41 MyApp 0x68564 main + 32 (HighlightsDetailViewController.swift:62)
42 libdyld.dylib 0x1cc764e6 _dyld_process_info_notify_release + 26 (dyld_process_info_notify.cpp:327)
Thanks in advance!
I finally solved the problem. Shortly, the crash appeared only on iOS 10.x devices, because some of my .xib files had had set a later version of iOS (11.0 i.e.) in "File Inspector -> Interface Builder Document -> Builds for" instead of the default Deployment Target set in the project settings, which was 10.x of course.

App is crashing on adding #IBAction in view controller

I was trying to add a tool bar at the bottom of UITableView which is> successfully added. But when i connect the bar button with IBAction,
on loading of that view controller app just crashes. Without linking
to IbAction app works fine.
I am using xCode 9.2
Here is my storyboard.
Here is the crash log.
2018-04-11 11:11:38.636121+0500 SafeBolt[9610:88848] *** Assertion failure in -[_UINavigationBarVisualProviderModernIOS _contentViewFittingHeight], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3698.33.6/_UINavigationBarVisualProviderModernIOS.m:569
2018-04-11 11:11:38.662356+0500 SafeBolt[9610:88848] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Sigh. Contentview size is zero.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001072b612b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001063fdf41 objc_exception_throw + 48
2 CoreFoundation 0x00000001072bb2f2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000105e9ed69 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 UIKit 0x00000001085d22f5 -[_UINavigationBarVisualProviderModernIOS _contentViewFittingHeight] + 265
5 UIKit 0x00000001083505e0 -[UINavigationItem _desiredHeightForBarMetrics:defaultHeightBlock:] + 90
6 UIKit 0x00000001085d4fa1 -[_UINavigationBarVisualProviderModernIOS heightRangeFittingWidth:] + 412
7 UIKit 0x0000000107ae40ed -[UINavigationBar _heightRangeForNavigationItem:fittingWidth:] + 210
8 UIKit 0x0000000107bc0a98 -[UINavigationController _intrinsicNavigationBarHeightRangeForViewController:] + 187
9 UIKit 0x0000000107bc09b6 -[UINavigationController _preferredHeightForHidingNavigationBarForViewController:] + 628
10 UIKit 0x0000000107bb088f -[UINavigationController _positionNavigationBarHidden:edge:initialOffset:] + 356
11 UIKit 0x0000000107bb0cf8 -[UINavigationController _positionNavigationBarHidden:edge:] + 388
12 UIKit 0x0000000107bb8555 -[UINavigationController loadView] + 243
13 UIKit 0x0000000107b7b05c -[UIViewController loadViewIfRequired] + 195
14 UIKit 0x0000000107b7b8b9 -[UIViewController view] + 27
15 iOS_Slide_Menu 0x00000001054bbe5a -[SlideNavigationController setEnableShadow:] + 74
16 iOS_Slide_Menu 0x00000001054b9804 -[SlideNavigationController setup] + 244
17 iOS_Slide_Menu 0x00000001054b9541 -[SlideNavigationController initWithCoder:] + 145
18 UIKit 0x0000000107e644c8 -[UIClassSwapper initWithCoder:] + 246
19 UIKit 0x00000001080b9109 UINibDecoderDecodeObjectForValue + 704
20 UIKit 0x00000001080b8e3e -[UINibDecoder decodeObjectForKey:] + 89
21 UIKit 0x0000000107ae075a -[UINavigationBar initWithCoder:] + 753
22 UIKit 0x00000001080b9109 UINibDecoderDecodeObjectForValue + 704
23 UIKit 0x00000001080b8e3e -[UINibDecoder decodeObjectForKey:] + 89
24 UIKit 0x000000010834b5f2 -[UINavigationItem initWithCoder:] + 1018
25 UIKit 0x00000001080b9109 UINibDecoderDecodeObjectForValue + 704
26 UIKit 0x00000001080b8e3e -[UINibDecoder decodeObjectForKey:] + 89
27 UIKit 0x0000000107b76053 -[UIViewController initWithCoder:] + 432
28 SafeBolt 0x000000010448dfa2 _T08SafeBolt18BaseViewControllerCACSgSo7NSCoderC5coder_tcfc + 66
29 SafeBolt 0x000000010446db83 _T08SafeBolt26EmailListingViewControllerCACSgSo7NSCoderC5coder_tcfc + 1315
30 SafeBolt 0x000000010446dc4f _T08SafeBolt26EmailListingViewControllerCACSgSo7NSCoderC5coder_tcfcTo + 47
31 UIKit 0x0000000107e644c8 -[UIClassSwapper initWithCoder:] + 246
32 UIKit 0x00000001080b9109 UINibDecoderDecodeObjectForValue + 704
33 UIKit 0x00000001080b8e3e -[UINibDecoder decodeObjectForKey:] + 89
34 UIKit 0x0000000107e64194 -[UIRuntimeConnection initWithCoder:] + 178
35 UIKit 0x0000000107e648d0 -[UIRuntimeEventConnection initWithCoder:] + 59
36 UIKit 0x00000001080b9109 UINibDecoderDecodeObjectForValue + 704
37 UIKit 0x00000001080b92a7 UINibDecoderDecodeObjectForValue + 1118
38 UIKit 0x00000001080b8e3e -[UINibDecoder decodeObjectForKey:] + 89
39 UIKit 0x0000000107e63391 -[UINib instantiateWithOwner:options:] + 1262
40 UIKit 0x00000001082f3fc2 -[UIStoryboard instantiateViewControllerWithIdentifier:] + 181
41 SafeBolt 0x000000010448eda2 _T08SafeBolt11AppDelegateC23setUpRootViewControlleryyF + 386
42 SafeBolt 0x000000010448f6b5 _T08SafeBolt11AppDelegateC11applicationSbSo13UIApplicationC_s10DictionaryVySC0F16LaunchOptionsKeyVypGSg022didFinishLaunchingWithI0tF + 101
43 SafeBolt 0x000000010448f79a _T08SafeBolt11AppDelegateC11applicationSbSo13UIApplicationC_s10DictionaryVySC0F16LaunchOptionsKeyVypGSg022didFinishLaunchingWithI0tFTo + 186
44 UIKit 0x00000001079cabca -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 299
45 UIKit 0x00000001079cc648 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4113
46 UIKit 0x00000001079d1aeb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1720
47 UIKit 0x0000000107d9b6f8 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 924
48 UIKit 0x00000001081714c8 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
49 UIKit 0x0000000107d9b2f1 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 249
50 UIKit 0x0000000107d9bb6b -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 696
51 UIKit 0x0000000108719a69 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 262
52 UIKit 0x0000000108719922 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 444
53 UIKit 0x00000001083f69c8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
54 UIKit 0x00000001085f5b06 _performActionsWithDelayForTransitionContext + 100
55 UIKit 0x00000001083f688b -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 231
56 UIKit 0x0000000108170b25 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
57 UIKit 0x00000001079d036a -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 523
58 UIKit 0x0000000107fab605 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 369
59 FrontBoardServices 0x000000010d340cc0 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 338
60 FrontBoardServices 0x000000010d3497b5 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 235
61 libdispatch.dylib 0x000000010af5933d _dispatch_client_callout + 8
62 libdispatch.dylib 0x000000010af5e9f3 _dispatch_block_invoke_direct + 592
63 FrontBoardServices 0x000000010d375498 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
64 FrontBoardServices 0x000000010d37514e -[FBSSerialQueue _performNext] + 464
65 FrontBoardServices 0x000000010d3756bd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
66 CoreFoundation 0x0000000107259101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
67 CoreFoundation 0x00000001072f8f71 __CFRunLoopDoSource0 + 81
68 CoreFoundation 0x000000010723da19 __CFRunLoopDoSources0 + 185
69 CoreFoundation 0x000000010723cfff __CFRunLoopRun + 1279
70 CoreFoundation 0x000000010723c889 CFRunLoopRunSpecific + 409
71 GraphicsServices 0x000000010dcb79c6 GSEventRunModal + 62
72 UIKit 0x00000001079d35d6 UIApplicationMain + 159
73 SafeBolt 0x0000000104490d27 main + 55
74 libdyld.dylib 0x000000010afd5d81 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Here is the code for IbAction.
#IBAction func testAction(_ sender: UIBarButtonItem) {
}
Any help would be appreciated.
Please try the following steps in order to solve this issue. Also let me know if it doesn't work for you.
Select the item in storyboard for which you are trying to add IBAction
Check in the connection inspector and see if there are still some extra connections other then the required one.
If there are other extra connections delete them and compile your code again. It should work.
This error usually happens when you create connections and deletes the code from your controller but your connection still exists.

Autolayout works great on iOS 8, crashes on iOS 7

I have an issue where a screen with autolayout that works great on iOS 8 - but crashes on iOS 7.
All subviews are configured in the XIB.
The error message is:
Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view.
Does the constraint reference something from outside the subtree of the view? That's illegal.
constraint:<NSLayoutConstraint:0x7ef80720 V:[UIImageView:0x7ef7fb40]-(0)-[UILabel:0x7ef802f0]> view:<UIView: 0x7ef7f1e0; frame = (0 0; 768 275); autoresize = RM+BM; layer = <CALayer: 0x7ef7f240>>'
Here's the stack trace:
(
0 CoreFoundation 0x0588a1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0563d8e5 objc_exception_throw + 44
2 CoreFoundation 0x05889fbb +[NSException raise:format:] + 139
3 Foundation 0x0284d55f -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 197
4 Foundation 0x028509ad -[NSLayoutConstraint _addToEngine:] + 56
5 UIKit 0x0460c974 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 515
6 Foundation 0x029c768c -[NSISEngine withBehaviors:performModifications:] + 107
7 Foundation 0x028573c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
8 UIKit 0x0460ce40 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 63
9 UIKit 0x0460c754 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 476
10 UIKit 0x0460ce48 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 71
11 UIKit 0x0460c54f -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 223
12 UIKit 0x0460c46b -[UIView(AdditionalLayoutSupport) _parentalLayoutEngineDidChangeTo:] + 55
13 UIKit 0x0460c850 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 223
14 Foundation 0x029c768c -[NSISEngine withBehaviors:performModifications:] + 107
15 Foundation 0x028573c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
16 UIKit 0x0460ce40 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 63
17 UIKit 0x0460c754 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 476
18 UIKit 0x0460ce48 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 71
19 UIKit 0x0460c54f -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 223
20 UIKit 0x0460c46b -[UIView(AdditionalLayoutSupport) _parentalLayoutEngineDidChangeTo:] + 55
21 UIKit 0x0460c850 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 223
22 Foundation 0x029c768c -[NSISEngine withBehaviors:performModifications:] + 107
23 Foundation 0x028573c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
24 UIKit 0x0460ce40 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 63
25 UIKit 0x0460c754 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 476
26 UIKit 0x0460ce48 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 71
27 UIKit 0x0460c54f -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 223
28 UIKit 0x0460c46b -[UIView(AdditionalLayoutSupport) _parentalLayoutEngineDidChangeTo:] + 55
29 UIKit 0x03fd0948 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 119
30 Foundation 0x029c768c -[NSISEngine withBehaviors:performModifications:] + 107
31 Foundation 0x028573c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
32 UIKit 0x03fd0830 -[UIView(Hierarchy) _postMovedFromSuperview:] + 313
33 UIKit 0x03fdbdd4 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1875
34 UIKit 0x03fcedba -[UIView(Hierarchy) addSubview:] + 56
35 UIKit 0x03f66645 -[_UIParallaxDimmingView didMoveToWindow] + 129
36 UIKit 0x03fd9478 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1642
37 UIKit 0x03fd9109 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 763
38 UIKit 0x03fd096f __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 158
39 Foundation 0x029c768c -[NSISEngine withBehaviors:performModifications:] + 107
40 Foundation 0x028573c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
41 UIKit 0x03fd0830 -[UIView(Hierarchy) _postMovedFromSuperview:] + 313
42 UIKit 0x03fdbdd4 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1875
43 UIKit 0x03fcedba -[UIView(Hierarchy) addSubview:] + 56
44 UIKit 0x03f630f2 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 2001
45 UIKit 0x03fd581f +[UIView(Animation) performWithoutAnimation:] + 82
46 UIKit 0x03f624f6 -[_UINavigationParallaxTransition animateTransition:] + 1155
47 UIKit 0x040a93ae -[UINavigationController _startCustomTransition:] + 3446
48 UIKit 0x040b58f7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688
49 UIKit 0x040b64e9 -[UINavigationController __viewWillLayoutSubviews] + 57
50 UIKit 0x041f70d1 -[UILayoutContainerView layoutSubviews] + 213
51 UIKit 0x03fde964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
52 libobjc.A.dylib 0x0564f82b -[NSObject performSelector:withObject:] + 70
53 QuartzCore 0x03dac45a -[CALayer layoutSublayers] + 148
54 QuartzCore 0x03da0244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
55 QuartzCore 0x03da00b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
56 QuartzCore 0x03d067fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
57 QuartzCore 0x03d07b85 _ZN2CA11Transaction6commitEv + 393
58 QuartzCore 0x03dc55b0 +[CATransaction flush] + 52
59 UIKit 0x03f6d9bb _UIApplicationHandleEventQueue + 13095
60 CoreFoundation 0x0581377f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
61 CoreFoundation 0x0581310b __CFRunLoopDoSources0 + 235
62 CoreFoundation 0x058301ae __CFRunLoopRun + 910
63 CoreFoundation 0x0582f9d3 CFRunLoopRunSpecific + 467
64 CoreFoundation 0x0582f7eb CFRunLoopRunInMode + 123
65 GraphicsServices 0x06b4f5ee GSEventRunModal + 192
66 GraphicsServices 0x06b4f42b GSEventRun + 104
67 UIKit 0x03f6ff9b UIApplicationMain + 1225
68 Pageonce 0x000db639 main + 73
69 libdyld.dylib 0x064fe6d9 start + 1
)
What is the issue?
Turns out these two lines caused the crash:
self.ninjaStarImage.layer.removeFromSuperlayer()
self.view.layer.addSublayer(self.ninjaStarImage.layer)
Moving them to viewDidLayoutSubviews solved the problem

App crashes when number of rows changes after reloading table

In my iOS app there is a view with a tableview inside. The table cells are loaded from a PHP file on a remote server. I have also put a NSTimer on the view controller that should reload the data.
The cells contain information that may change on a time interval. That is working fine only if the number of cells doesn't change on a time interval. If a cell is added on a time interval, then the app crashes.
This is the code for the NSTimer:
self.timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:#selector(refrescar) userInfo:nil repeats:YES];
And this is the code for the method refrescar:
- (void)refrescar {
total_actual =0;
total =0;
[self viewDidLoad];
}
I have also tried with this one:
- (void)refrescar {
total_actual =0;
total =0;
[self.tableView reloadData];
}
But the app crashes as with the other code with [self viewDidLoad];
Any help is welcome.
Error log:
2014-11-13 23:52:23.299 RestAppXXI[1552:607] -[NSNull length]: unrecognized selector sent to instance 0xcb6068
2014-11-13 23:52:23.429 RestAppXXI[1552:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0xcb6068'
*** First throw call stack:
(
0 CoreFoundation 0x00b6a1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x031588e5 objc_exception_throw + 44
2 CoreFoundation 0x00c07243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x00b5a50b ___forwarding___ + 1019
4 CoreFoundation 0x00b5a0ee _CF_forwarding_prep_0 + 14
5 UIKit 0x01fd2cc7 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 57
6 UIKit 0x01fd2b13 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 85
7 UIKit 0x01fd662e -[UILabel _intrinsicSizeWithinSize:] + 173
8 UIKit 0x01fd6751 -[UILabel intrinsicContentSize] + 91
9 UIKit 0x024b07ef -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 36
10 UIKit 0x024b0480 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 511
11 UIKit 0x024b67bf -[UIView(AdditionalLayoutSupport) updateConstraints] + 110
12 UIKit 0x01fd6579 -[UILabel updateConstraints] + 189
13 UIKit 0x024b6058 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 239
14 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
15 UIKit 0x024b6157 __UIViewRecursionHelper + 40
16 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
17 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
18 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
19 UIKit 0x024b6157 __UIViewRecursionHelper + 40
20 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
21 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
22 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
23 UIKit 0x024b6157 __UIViewRecursionHelper + 40
24 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
25 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
26 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
27 UIKit 0x024b6157 __UIViewRecursionHelper + 40
28 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
29 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
30 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
31 UIKit 0x024b6157 __UIViewRecursionHelper + 40
32 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
33 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
34 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
35 UIKit 0x024b6157 __UIViewRecursionHelper + 40
36 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
37 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
38 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
39 UIKit 0x024b6157 __UIViewRecursionHelper + 40
40 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
41 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
42 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
43 UIKit 0x024b6157 __UIViewRecursionHelper + 40
44 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
45 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
46 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
47 UIKit 0x024b6157 __UIViewRecursionHelper + 40
48 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
49 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
50 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
51 UIKit 0x024b6157 __UIViewRecursionHelper + 40
52 CoreFoundation 0x00b0bc69 CFArrayApplyFunction + 57
53 UIKit 0x024b5ffc -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 147
54 UIKit 0x024b61d6 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPass:] + 122
55 UIKit 0x024aa878 __62-[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded]_block_invoke + 43
56 Foundation 0x02f0b68c -[NSISEngine withBehaviors:performModifications:] + 107
57 Foundation 0x02d9b3c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
58 UIKit 0x024aa590 -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 225
59 UIKit 0x024aa467 -[UIWindow(UIConstraintBasedLayout) layoutSublayersOfLayer:] + 90
60 libobjc.A.dylib 0x0316a82b -[NSObject performSelector:withObject:] + 70
61 QuartzCore 0x0171a45a -[CALayer layoutSublayers] + 148
62 QuartzCore 0x0170e244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
63 QuartzCore 0x0170e0b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
64 QuartzCore 0x016747fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
65 QuartzCore 0x01675b85 _ZN2CA11Transaction6commitEv + 393
66 QuartzCore 0x01676258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
67 CoreFoundation 0x00b3236e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
68 CoreFoundation 0x00b322bf __CFRunLoopDoObservers + 399
69 CoreFoundation 0x00b10254 __CFRunLoopRun + 1076
70 CoreFoundation 0x00b0f9d3 CFRunLoopRunSpecific + 467
71 CoreFoundation 0x00b0f7eb CFRunLoopRunInMode + 123
72 GraphicsServices 0x041945ee GSEventRunModal + 192
73 GraphicsServices 0x0419442b GSEventRun + 104
74 UIKit 0x01e18f9b UIApplicationMain + 1225
75 RestAppXXI 0x000305ed main + 141
76 libdyld.dylib 0x049eb6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
That is not relevant to your UITableView. That is most probably from a string you are trying to access, but it's nil.
User exception break point to debug, you are calling length method on NSNull object
And why to use NSTimer, you can reload table after getting response from server

Resources