We are getting the crash "NSString quotedStringRepresentation" very often is the production build. I saw the answers that were given in the previous post, but they did not help me. Can someone please help? Here's the log:
# Platform: ios
# Application:
# Version: N/A
# Date: 2017-03-23T06:48:38Z
# OS Version: 10.2.1 (14D27)
# Device: iPad Pro (12.9 inch)
# RAM Free: 20.3%
# Disk Free: 80.4%
#0. Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x18d1c7014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18d28f450 pthread_kill + 112
2 libsystem_c.dylib 0x18d13b400 abort + 140
3 libsystem_malloc.dylib 0x18d20ba5c _nano_vet_and_size_of_live + 330
4 libsystem_malloc.dylib 0x18d20cf18 nano_realloc + 376
5 libsystem_malloc.dylib 0x18d1ff240 malloc_zone_realloc + 180
6 Foundation 0x18ec4a628 -[NSString quotedStringRepresentation] + 732
7 Foundation 0x18ec2a44c -[NSString _stringRepresentation] + 376
8 CoreFoundation 0x18e121f3c -[NSArray descriptionWithLocale:indent:] + 404
9 Foundation 0x18ec04af4 _NSDescriptionWithLocaleFunc + 76
10 CoreFoundation 0x18e1ba23c __CFStringAppendFormatCore + 7996
11 CoreFoundation 0x18e1b82c8 _CFStringCreateWithFormatAndArgumentsAux2 + 244
12 Foundation 0x18ec04968 +[NSString stringWithFormat:] + 68
13 UIKit 0x1949fc090 UIViewAlertForUnsatisfiableConstraints + 664
14 Foundation 0x18ec794cc -[NSISEngine handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 464
15 Foundation 0x18ec59df8 -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 384
16 Foundation 0x18ec559c4 -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 688
17 Foundation 0x18ec555cc -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 284
18 Foundation 0x18ec531e0 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 272
19 UIKit 0x1941a7400 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 396
20 Foundation 0x18ec52d10 -[NSISEngine withBehaviors:performModifications:] + 168
21 UIKit 0x1941a720c __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 564
22 UIKit 0x1940a3b14 -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 224
23 UIKit 0x1941e4cf0 -[UIView(AdditionalLayoutSupport) _initializeHostedLayoutEngine] + 460
24 UIKit 0x1941aed34 -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange] + 132
25 UIKit 0x1940a3c10 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 200
26 UIKit 0x1940a3e18 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 720
27 UIKit 0x1940a32c4 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 156
28 Foundation 0x18ec52d10 -[NSISEngine withBehaviors:performModifications:] + 168
29 UIKit 0x1940a3138 -[UIView(Hierarchy) _postMovedFromSuperview:] + 820
30 UIKit 0x1940af018 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1788
31 UIKit 0x1940ae904 -[UIView(Hierarchy) addSubview:] + 828
32 UIKit 0x19416abc8 -[UINavigationTransitionView transition:fromView:toView:] + 624
33 UIKit 0x194160e5c -[UINavigationController _startTransition:fromViewController:toViewController:] + 2572
34 UIKit 0x19415ff28 -[UINavigationController _startDeferredTransitionIfNeeded:] + 856
35 UIKit 0x19415fadc -[UINavigationController __viewWillLayoutSubviews] + 64
36 UIKit 0x19415fa40 -[UILayoutContainerView layoutSubviews] + 188
37 UIKit 0x1940a4a80 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196
38 QuartzCore 0x1915529d8 -[CALayer layoutSublayers] + 148
39 QuartzCore 0x1915474cc CA::Layer::layout_if_needed(CA::Transaction*) + 292
40 QuartzCore 0x19154738c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
41 QuartzCore 0x1914c43e0 CA::Context::commit_transaction(CA::Transaction*) + 252
42 QuartzCore 0x1914eba68 CA::Transaction::commit() + 512
43 UIKit 0x19432a864 _UIApplicationFlushRunLoopCATransactionIfTooLate + 208
44 UIKit 0x19488bfa4 __handleEventQueue + 4484
45 CoreFoundation 0x18e1a6b5c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
46 CoreFoundation 0x18e1a64a4 __CFRunLoopDoSources0 + 524
47 CoreFoundation 0x18e1a40a4 __CFRunLoopRun + 804
48 CoreFoundation 0x18e0d22b8 CFRunLoopRunSpecific + 444
49 GraphicsServices 0x18fb86198 GSEventRunModal + 180
50 UIKit 0x1941127fc -[UIApplication _run] + 684
51 UIKit 0x19410d534 UIApplicationMain + 208
52 DiabetesMD 0x100015f20 main (AppDelegate.swift:15)
53 libdispatch.dylib 0x18d0b55b8 (Missing)
Related
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.
My app has many random crashes recently. Fabric shows the crash rate is about 1%. The crash session number and the crash user number is very close, which means it's very random.
The crash shows several different callstacks on Fabric, here are three of them.
==========1===============
#0. Crashed: com.apple.main-thread
0 QuartzCore 0x188715730 CALayerGetSuperlayer + 20
1 UIKit 0x188dd6fa0 -[UIView(Hierarchy) superview] + 44
2 UIKit 0x188dd7a88 -[UIView nextResponder] + 108
3 UIKit 0x188e9d99c -[UIResponder _containsResponder:] + 56
4 UIKit 0x188ecfc80 -[UITransitionView transition:fromView:toView:removeFromView:] + 576
5 UIKit 0x188f13238 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1536
6 UIKit 0x188f12aec -[UITabBarController _setSelectedViewController:] + 360
7 UIKit 0x188fda30c -[UITabBarController _tabBarItemClicked:] + 336
8 UIKit 0x188e11398 -[UIApplication sendAction:to:from:forEvent:] + 96
9 UIKit 0x188fda160 -[UITabBar _sendAction:withEvent:] + 468
10 UIKit 0x188e11398 -[UIApplication sendAction:to:from:forEvent:] + 96
11 UIKit 0x188dfa474 -[UIControl _sendActionsForEvents:withEvent:] + 612
12 UIKit 0x188fd9d98 -[UITabBar(Static) _buttonUp:] + 128
13 UIKit 0x188e11398 -[UIApplication sendAction:to:from:forEvent:] + 96
14 UIKit 0x188dfa474 -[UIControl _sendActionsForEvents:withEvent:] + 612
15 UIKit 0x188e10d34 -[UIControl touchesEnded:withEvent:] + 592
16 UIKit 0x188dcff54 _UIGestureRecognizerUpdate + 8536
17 CoreFoundation 0x18431c2a4 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
18 CoreFoundation 0x184319230 __CFRunLoopDoObservers + 360
19 CoreFoundation 0x184319610 __CFRunLoopRun + 836
20 CoreFoundation 0x1842452d4 CFRunLoopRunSpecific + 396
21 GraphicsServices 0x18dc9b6fc GSEventRunModal + 168
22 UIKit 0x188e42f40 UIApplicationMain + 1488
======================2=======================
#0. Crashed: com.apple.main-thread
0 QuartzCore 0x18e7ca1d0 CALayerGetSuperlayer + 20
1 UIKit 0x191e4e9d4 -[UIView(UIKitManual) superview] + 128
2 UIKit 0x1915d3a5c -[UIView nextResponder] + 120
3 UIKit 0x19197d620 -[UIResponder _canChangeFirstResponder:toResponder:] + 64
4 UIKit 0x19165c01c -[UIResponder becomeFirstResponder] + 224
5 UIKit 0x19169b118 -[UINavigationController navigationTransitionView:didStartTransition:] + 760
6 UIKit 0x1917758ac -[UINavigationController _startCustomTransition:] + 3852
7 UIKit 0x19168f7bc -[UINavigationController _startDeferredTransitionIfNeeded:] + 676
8 UIKit 0x19168f424 -[UINavigationController __viewWillLayoutSubviews] + 64
9 UIKit 0x19168f388 -[UILayoutContainerView layoutSubviews] + 188
10 UIKit 0x1915d5cc0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1200
11 QuartzCore 0x18e7c6274 -[CALayer layoutSublayers] + 148
12 QuartzCore 0x18e7bade8 CA::Layer::layout_if_needed(CA::Transaction*) + 292
13 QuartzCore 0x18e7baca8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
14 QuartzCore 0x18e73634c CA::Context::commit_transaction(CA::Transaction*) + 252
15 QuartzCore 0x18e75d3ac CA::Transaction::commit() + 504
16 QuartzCore 0x18e75de78 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120
17 CoreFoundation 0x18b4549a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
18 CoreFoundation 0x18b452630 __CFRunLoopDoObservers + 372
19 CoreFoundation 0x18b452a7c __CFRunLoopRun + 956
20 CoreFoundation 0x18b382da4 CFRunLoopRunSpecific + 424
21 GraphicsServices 0x18cded074 GSEventRunModal + 100
22 UIKit 0x19163dc9c UIApplicationMain + 208
=========3========
#0. Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x18fe4c1a0 objc_retain + 16
1 UIKit 0x1974fba5c -[UIView nextResponder] + 120
2 UIKit 0x1978a45ec -[UIResponder _resignIfContainsFirstResponder] + 156
3 UIKit 0x1974fb76c -[UIView(Hierarchy) _willMoveToWindow:] + 568
4 UIKit 0x197507d88 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 424
5 UIKit 0x197773000 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2 + 1556
6 UIKit 0x19750e964 +[UIView(Animation) performWithoutAnimation:] + 104
7 UIKit 0x1976e0950 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 260
8 UIKit 0x1977fd388 +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:] + 220
9 UIKit 0x1976e0450 -[_UINavigationParallaxTransition animateTransition:] + 1060
10 UIKit 0x19769d818 -[UINavigationController _startCustomTransition:] + 3704
11 UIKit 0x1975b77bc -[UINavigationController _startDeferredTransitionIfNeeded:] + 676
12 UIKit 0x1975b7424 -[UINavigationController __viewWillLayoutSubviews] + 64
13 UIKit 0x1975b7388 -[UILayoutContainerView layoutSubviews] + 188
14 UIKit 0x1974fdcc0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1200
15 QuartzCore 0x1946ee274 -[CALayer layoutSublayers] + 148
16 QuartzCore 0x1946e2de8 CA::Layer::layout_if_needed(CA::Transaction*) + 292
17 QuartzCore 0x1946e2ca8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
18 QuartzCore 0x19465e34c CA::Context::commit_transaction(CA::Transaction*) + 252
19 QuartzCore 0x1946853ac CA::Transaction::commit() + 504
20 UIKit 0x1974f3308 _afterCACommitHandler + 256
21 CoreFoundation 0x19137c9a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
22 CoreFoundation 0x19137a630 __CFRunLoopDoObservers + 372
23 CoreFoundation 0x19137aa7c __CFRunLoopRun + 956
24 CoreFoundation 0x1912aada4 CFRunLoopRunSpecific + 424
25 GraphicsServices 0x192d15074 GSEventRunModal + 100
26 UIKit 0x197565c9c UIApplicationMain + 208
I have no idea which page or what action caused this crash, and I can't reproduce this either.
Also tried Xcode analytics, zombie, memory instrument, with no luck.
Please let me know if you have any comments.
We are having a crash in Foundation, but we are unable to detect what could be the problem. We think that maybe an animation could trigger this problem.
Has anybody encounter this kind of crash? Here is the trace of the problem.
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1dfc44e6 objc_msgSend + 5
1 Foundation 0x1f7b0e77 -[_NSConcreteObservation dealloc] + 96
2 libobjc.A.dylib 0x1dfd1195 objc_object::sidetable_release(bool) + 238
3 Foundation 0x1f679e9d empty + 32
4 Foundation 0x1f5d4787 -[NSConcreteMapTable removeAllItems] + 76
5 UIKit 0x246e5259 -[UIView(AdditionalLayoutSupport) _clearLayoutVariableObservationsOnlyToSupportTAMICChange:] + 56
6 UIKit 0x23efaa0b __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 380
7 Foundation 0x1f5f7b03 -[NSISEngine withBehaviors:performModifications:] + 262
8 UIKit 0x23df6e8b -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 220
9 UIKit 0x23efab91 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 170
10 UIKit 0x23efaaa7 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 536
11 Foundation 0x1f5f7b03 -[NSISEngine withBehaviors:performModifications:] + 262
12 UIKit 0x23df6e8b -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 220
13 UIKit 0x23efab91 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 170
14 UIKit 0x23efaaa7 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 536
15 Foundation 0x1f5f7b03 -[NSISEngine withBehaviors:performModifications:] + 262
16 UIKit 0x23df6e8b -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 220
17 UIKit 0x23df6737 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 92
18 Foundation 0x1f5f7b03 -[NSISEngine withBehaviors:performModifications:] + 262
19 UIKit 0x23df6607 -[UIView(Hierarchy) _postMovedFromSuperview:] + 754
20 UIKit 0x240e8949 __UIViewWasRemovedFromSuperview + 154
21 UIKit 0x23df57a5 -[UIView(Hierarchy) removeFromSuperview] + 1188
22 UIKit 0x24768167 __46-[UIInputWindowController invalidateInputView]_block_invoke + 120
23 UIKit 0x241872b9 -[UIResponder _preserveResponderOverridesWhilePerforming:] + 108
24 UIKit 0x247680eb -[UIInputWindowController invalidateInputView] + 108
25 UIKit 0x24768a17 -[UIInputWindowController changeToInputViewSet:] + 240
26 UIKit 0x24769d91 __43-[UIInputWindowController setInputViewSet:]_block_invoke.1331 + 26
27 UIKit 0x2476382d __77-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke.932 + 404
28 UIKit 0x23e3363b -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 440
29 UIKit 0x23e33109 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 214
30 UIKit 0x23e32f91 -[UIViewAnimationState animationDidStop:finished:] + 128
31 QuartzCore 0x21c06ee7 CA::Layer::run_animation_callbacks(void*) + 252
32 libdispatch.dylib 0x1e3fa083 _dispatch_client_callout + 22
33 libdispatch.dylib 0x1e3fe5fd _dispatch_main_queue_callback_4CF + 890
34 CoreFoundation 0x1ed104a7 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
35 CoreFoundation 0x1ed0e78f __CFRunLoopRun + 1422
36 CoreFoundation 0x1ec5d533 CFRunLoopRunSpecific + 486
37 CoreFoundation 0x1ec5d341 CFRunLoopRunInMode + 104
38 GraphicsServices 0x20434bfd GSEventRunModal + 156
39 UIKit 0x23e65e67 -[UIApplication _run] + 574
40 UIKit 0x23e60591 UIApplicationMain + 150
41 App 0xb3c158 main (AppDelegate.swift:22)
42 libdispatch.dylib 0x1e42750b (Missing)
my app crash only iOS 9.2.1
The rest of devices okay. Crash in arbitrary places. Please help me =) I use crittercism. I am new to programming, tell me the right way please. Name SIGSEGV Reason SEGV_MAPERR
0 libobjc.A.dylib 0x0000000180d09bdc objc_msgSend + 24
1 UIKit 0x000000018696a654 -[UINibStringIDTable lookupKey:identifier:] + 128
2 UIKit 0x000000018696614c -[UINibDecoder containsValueForKey:] + 44
3 UIKit 0x0000000186698a8c -[UIScrollView initWithCoder:] + 1396
4 UIKit 0x0000000186b99b00 -[UICollectionView initWithCoder:] + 72
5 UIKit 0x000000018696667c UINibDecoderDecodeObjectForValue + 668
6 UIKit 0x00000001869663c4 -[UINibDecoder decodeObjectForKey:] + 332
7 UIKit 0x000000018684615c -[UIRuntimeConnection initWithCoder:] + 184
8 UIKit 0x000000018696667c UINibDecoderDecodeObjectForValue + 668
9 UIKit 0x00000001869667f4 UINibDecoderDecodeObjectForValue + 1044
10 UIKit 0x00000001869663c4 -[UINibDecoder decodeObjectForKey:] + 332
11 UIKit 0x0000000186845490 -[UINib instantiateWithOwner:options:] + 1216
12 UIKit 0x00000001866ef33c -[UIViewController _loadViewFromNibNamed:bundle:] + 372
13 UIKit 0x00000001864b8250 -[UIViewController loadView] + 172
14 UIKit 0x000000018637bd6c -[UIViewController loadViewIfRequired] + 140
15 UIKit 0x000000018643bda8 -[UINavigationController _layoutViewController:] + 68
16 UIKit 0x000000018643bc80 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 412
17 UIKit 0x000000018643aec8 -[UINavigationController _startTransition:fromViewController:toViewController:] + 140
18 UIKit 0x000000018643aa6c -[UINavigationController _startDeferredTransitionIfNeeded:] + 864
19 UIKit 0x000000018643a694 -[UINavigationController __viewWillLayoutSubviews] + 56
20 UIKit 0x000000018643a5fc -[UILayoutContainerView layoutSubviews] + 204
21 UIKit 0x0000000186377778 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 652
22 QuartzCore 0x0000000183d86b2c -[CALayer layoutSublayers] + 144
23 QuartzCore 0x0000000183d81738 CA::Layer::layout_if_needed() + 288
24 QuartzCore 0x0000000183d815f8 CA::Layer::layout_and_display_if_needed() + 28
25 QuartzCore 0x0000000183d80c94 CA::Context::commit_transaction() + 248
26 QuartzCore 0x0000000183d809dc CA::Transaction::commit() + 508
27 QuartzCore 0x0000000183d7a0cc CA::Transaction::observer_callback() + 76
28 CoreFoundation 0x0000000181640588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
29 CoreFoundation 0x000000018163e32c __CFRunLoopDoObservers + 368
30 CoreFoundation 0x000000018163e75c __CFRunLoopRun + 924
31 CoreFoundation 0x000000018156d680 CFRunLoopRunSpecific + 380
32 GraphicsServices 0x0000000182a7c088 GSEventRunModal + 176
33 UIKit 0x00000001863e4d90 UIApplicationMain + 200
! 34 keep-app 0x0000000100060350 main (main.m:14)
35 libdyld.dylib 0x000000018110e8b8 start + 0
Name SIGSEGV Reason SEGV_MAPERR
0 libobjc.A.dylib 0x0000000180d09bdc objc_msgSend + 24
1 libcache.dylib 0x0000000181062b5c _entry_get_optionally_checking_collisions + 48
2 libcache.dylib 0x0000000181060dd0 _entry_table_resize + 304
3 libcache.dylib 0x0000000181061a9c cache_set_and_retain + 848
4 CoreFoundation 0x00000001815bb470 -[NSCache setObject:forKey:cost:] + 264
5 CoreUI 0x00000001861a2854 -[CUIStructuredThemeStore _canGetRenditionWithKey:isFPO:lookForSubstitutions:] + 856
6 CoreUI 0x00000001861c4d5c -[CUICatalog _resolvedRenditionKeyFromThemeRef:withBaseKey:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:memoryClass:graphicsClass:graphicsFallBackOrder:] + 920
7 CoreUI 0x00000001861c40fc -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:] + 144
8 UIKit 0x0000000186bd9994 __98-[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 420
9 UIKit 0x0000000186bd9734 -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 208
10 UIKit 0x0000000186bd9f18 -[_UIAssetManager imageNamed:withTrait:] + 524
11 UIKit 0x0000000186773c5c _UIImageWithNameAndTraitCollection + 92
12 UIKit 0x0000000186396220 _UIImageWithName + 44
13 UIKit 0x00000001865d7650 -[UISlider createThumbViewNeue] + 160
14 UIKit 0x00000001865d6dec -[UISlider _initSubviews] + 68
15 UIKit 0x00000001865d69c8 -[UISlider layoutSubviews] + 136
16 UIKit 0x0000000186377778 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 652
17 QuartzCore 0x0000000183d86b2c -[CALayer layoutSublayers] + 144
18 QuartzCore 0x0000000183d81738 CA::Layer::layout_if_needed() + 288
19 UIKit 0x000000018638e454 -[UIView(Hierarchy) layoutBelowIfNeeded] + 920
20 UIKit 0x000000018643c20c -[UINavigationController _layoutViewController:] + 1192
21 UIKit 0x0000000186439be4 -[UINavigationController _layoutTopViewController] + 224
22 UIKit 0x00000001864527dc -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 724
23 UIKit 0x00000001864524c8 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 412
24 UIKit 0x00000001864521d0 -[UINavigationTransitionView _cleanupTransition] + 740
25 UIKit 0x00000001863b6e90 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 308
26 UIKit 0x00000001863b510c +[UIViewAnimationState popAnimationState] + 320
27 UIKit 0x0000000186445cec -[UINavigationTransitionView transition:fromView:toView:] + 1788
28 UIKit 0x000000018643b8c0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 2692
29 UIKit 0x000000018643aa6c -[UINavigationController _startDeferredTransitionIfNeeded:] + 864
30 UIKit 0x000000018643a694 -[UINavigationController __viewWillLayoutSubviews] + 56
31 UIKit 0x000000018643a5fc -[UILayoutContainerView layoutSubviews] + 204
32 UIKit 0x0000000186377778 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 652
33 QuartzCore 0x0000000183d86b2c -[CALayer layoutSublayers] + 144
34 QuartzCore 0x0000000183d81738 CA::Layer::layout_if_needed() + 288
35 QuartzCore 0x0000000183d815f8 CA::Layer::layout_and_display_if_needed() + 28
36 QuartzCore 0x0000000183d80c94 CA::Context::commit_transaction() + 248
37 QuartzCore 0x0000000183d809dc CA::Transaction::commit() + 508
38 QuartzCore 0x0000000183d7a0cc CA::Transaction::observer_callback() + 76
39 CoreFoundation 0x0000000181640588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
40 CoreFoundation 0x000000018163e32c __CFRunLoopDoObservers + 368
41 CoreFoundation 0x000000018163e75c __CFRunLoopRun + 924
42 CoreFoundation 0x000000018156d680 CFRunLoopRunSpecific + 380
43 GraphicsServices 0x0000000182a7c088 GSEventRunModal + 176
44 UIKit 0x00000001863e4d90 UIApplicationMain + 200
! 45 keep-app 0x00000001000b4350 main (main.m:14)
46 libdyld.dylib 0x000000018110e8b8 start + 0
Name SIGSEGV Reason SEGV_MAPERR
0 libsystem_malloc.dylib 0x0000000181257be8 szone_free + 2940
1 CoreFoundation 0x00000001815699a4 CFRelease + 1084
2 CoreUI 0x00000001861a240c -[CUIStructuredThemeStore renditionWithKey:usingKeySignature:] + 1596
3 CoreUI 0x00000001861c435c -[CUICatalog _storageRefForRendition:representsODRContent:] + 100
4 CoreUI 0x00000001861c4124 -[CUICatalog namedLookupWithName:scaleFactor:deviceIdiom:deviceSubtype:sizeClassHorizontal:sizeClassVertical:] + 184
5 UIKit 0x0000000186bd9994 __98-[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:]_block_invoke + 420
6 UIKit 0x0000000186bd9734 -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:sizeClassPair:attachCatalogImage:] + 208
7 UIKit 0x0000000186cec584 -[UIImageAsset imageWithTraitCollection:] + 400
8 UIKit 0x000000018672b058 -[UIImageView _resolveImageForTrait:] + 456
9 UIKit 0x000000018672a928 -[UIImageView _didMoveFromWindow:toWindow:] + 208
10 UIKit 0x0000000186376d7c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 756
11 UIKit 0x0000000186376310 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 148
12 Foundation 0x0000000181fa9500 -[NSISEngine withBehaviors:performModifications:] + 164
13 UIKit 0x0000000186376194 -[UIView(Hierarchy) _postMovedFromSuperview:] + 528
14 UIKit 0x0000000186383b80 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1780
15 UIKit 0x0000000186575600 -[_UIParallaxDimmingView didMoveToWindow] + 176
16 UIKit 0x000000018637705c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1492
17 UIKit 0x0000000186376d7c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 756
18 UIKit 0x0000000186376310 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 148
19 Foundation 0x0000000181fa9500 -[NSISEngine withBehaviors:performModifications:] + 164
20 UIKit 0x0000000186376194 -[UIView(Hierarchy) _postMovedFromSuperview:] + 528
21 UIKit 0x0000000186383b80 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1780
22 UIKit 0x0000000186615db4 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2 + 1652
23 UIKit 0x000000018638a964 +[UIView(Animation) performWithoutAnimation:] + 76
24 UIKit 0x0000000186575118 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 256
25 UIKit 0x0000000186690840 +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:] + 216
26 UIKit 0x0000000186574c90 -[_UINavigationParallaxTransition animateTransition:] + 1056
27 UIKit 0x000000018652e6a0 -[UINavigationController _startCustomTransition:] + 3540
28 UIKit 0x000000018643a9b8 -[UINavigationController _startDeferredTransitionIfNeeded:] + 684
29 UIKit 0x000000018643a694 -[UINavigationController __viewWillLayoutSubviews] + 56
30 UIKit 0x000000018643a5fc -[UILayoutContainerView layoutSubviews] + 204
31 UIKit 0x0000000186377778 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 652
32 QuartzCore 0x0000000183d86b2c -[CALayer layoutSublayers] + 144
33 QuartzCore 0x0000000183d81738 CA::Layer::layout_if_needed() + 288
34 QuartzCore 0x0000000183d815f8 CA::Layer::layout_and_display_if_needed() + 28
35 QuartzCore 0x0000000183d80c94 CA::Context::commit_transaction() + 248
36 QuartzCore 0x0000000183d809dc CA::Transaction::commit() + 508
37 QuartzCore 0x0000000183d7a0cc CA::Transaction::observer_callback() + 76
38 CoreFoundation 0x0000000181640588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
39 CoreFoundation 0x000000018163e32c __CFRunLoopDoObservers + 368
40 CoreFoundation 0x000000018163e75c __CFRunLoopRun + 924
41 CoreFoundation 0x000000018156d680 CFRunLoopRunSpecific + 380
42 GraphicsServices 0x0000000182a7c088 GSEventRunModal + 176
43 UIKit 0x00000001863e4d90 UIApplicationMain + 200
! 44 keep-app 0x00000001000c0350 main (main.m:14)
45 libdyld.dylib 0x000000018110e8b8 start + 0
Unfortunately I do not have access to this device iOS 9.2.1. in the simulator and my device is working fine iOS 10.2
A SIGSEGV is an error / signal caused by an invalid memory reference or a segmentation fault. Seems like the app is trying to access an array element out of bounds or trying to use too much memory.
The way to fix this issue is to find out what the exception may be by making it happen on another device (or simulator), or getting the full console logs from that device. An easy way to do this might be to set exception breakpoints to see where the original exception that triggered the SIGSEGV is located.
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