I received a crash log and am a bit puzzled about it.
0 libobjc.A.dylib 0x000000018e4c20a0 objc_msgSend + 32
1 UIKitCore 0x0000000192be86b8 -[UIView(AdditionalLayoutSupport) _nsis_center:bounds:inEngine:forLayoutGuide:] + 1328 (NSLayoutConstraint_UIKitAdditions.m:3674)
2 UIKitCore 0x0000000192ca003c -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 364 (UIView.m:0)
3 UIKitCore 0x0000000192ca04ac -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 136 (UIView.m:10182)
4 CoreFoundation 0x000000018e77195c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16 (NSArrayHelpers.m:9)
5 CoreFoundation 0x000000018e674fb0 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416 (NSArrayM_Common.h:390)
6 UIKitCore 0x0000000192c9f5e4 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156 (UIView.m:9953)
7 UIKitCore 0x0000000192be76fc -[UIView(AdditionalLayoutSupport) _is_layout] + 148 (NSLayoutConstraint_UIKitAdditions.m:3231)
8 UIKitCore 0x0000000192ca7090 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1032 (UIView.m:12082)
9 UIKitCore 0x0000000192cba17c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140 (UIView.m:17028)
10 QuartzCore 0x00000001952222c0 -[CALayer layoutSublayers] + 284 (CALayer.mm:9627)
11 QuartzCore 0x000000019522843c CA::Layer::layout_if_needed(CA::Transaction*) + 480 (CALayer.mm:9501)
12 QuartzCore 0x0000000195233140 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136 (CALayer.mm:2461)
13 QuartzCore 0x000000019517b884 CA::Context::commit_transaction(CA::Transaction*, double) + 304 (CAContextInternal.mm:1992)
14 QuartzCore 0x00000001951a5574 CA::Transaction::commit() + 676 (CATransactionInternal.mm:438)
15 QuartzCore 0x00000001951a5f68 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92 (CATransactionInternal.mm:888)
16 CoreFoundation 0x000000018e71be68 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1758)
17 CoreFoundation 0x000000018e716d54 __CFRunLoopDoObservers + 416 (CFRunLoop.c:1868)
18 CoreFoundation 0x000000018e717320 __CFRunLoopRun + 1308 (CFRunLoop.c:2910)
19 CoreFoundation 0x000000018e716adc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
20 GraphicsServices 0x00000001986b7328 GSEventRunModal + 104 (GSEvent.c:2246)
21 UIKitCore 0x000000019282463c UIApplicationMain + 1936 (UIApplication.m:4773)
22 MyAppName 0x0000000100b96974 main + 68 (Theme+Fonts.swift:14)
23 libdyld.dylib 0x000000018e5a0360 start + 4
The Theme+Fonts.swift file is a simple enum
enum ThemeFont: String {
case arialBold = "Arial-BoldMT",
arialRoundedBold = "Arial Rounded MT Bold", // This is line 14
…
}
How can I investigate further?
It happened on an iPhone 7. I don't have a device but I tested on the Simulator and got nothing.
This is probably not caused by the enum code but rather has something to do with the callback here
16 CoreFoundation 0x000000018e71be68 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1758)
Related
After upgrading to DJI iOS SDK v4.14, my pilot view crashes extremely frequently. Testing before iOS 14.4, this issue doesn't occur at all it seems. Anyone experience this? Here's the crash report:
Last Exception Backtrace:
0 CoreFoundation 0x189ee986c __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib 0x19ef04c50 objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation 0x189f59e1c _CFThrowFormattedException + 116 (CFObject.m:1994)
3 CoreFoundation 0x189de0ff0 -[NSArray subarrayWithRange:] + 496 (NSArray.m:667)
4 DJIUXSDK 0x102644cf0 -[DUXWidgetCollectionViewStacksLayout frameOfWidgetAtIndex:] + 324
5 DJIUXSDK 0x102644b04 -[DUXWidgetCollectionViewStacksLayout layoutAttributesForItemAtIndexPath:] + 244
6 DJIUXSDK 0x1025682b0 -[DUXWidgetCollectionViewLayout layoutAttributesForElementsInRect:] + 316
7 UIKitCore 0x18bfe76cc __45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 224 (UICollectionViewData.mm:438)
8 UIKitCore 0x18bfe6e54 -[UICollectionViewData validateLayoutInRect:] + 1072 (UICollectionViewData.mm:587)
9 UIKitCore 0x18bfb03c0 -[UICollectionView layoutSubviews] + 228 (UICollectionView.m:4367)
10 UIKitCore 0x18cdebec4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2504 (UIView.m:17526)
11 QuartzCore 0x18d306644 -[CALayer layoutSublayers] + 308 (CALayer.mm:10147)
12 QuartzCore 0x18d306b18 CA::Layer::layout_if_needed(CA::Transaction*) + 524 (CALayer.mm:10014)
13 QuartzCore 0x18d31b30c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2485)
14 QuartzCore 0x18d260640 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 416 (CAContextInternal.mm:2449)
15 QuartzCore 0x18d28bb08 CA::Transaction::commit() + 732 (CATransactionInternal.mm:449)
16 QuartzCore 0x18d28ce98 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 96 (CATransactionInternal.mm:932)
17 CoreFoundation 0x189e64358 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CFRunLoop.c:1799)
18 CoreFoundation 0x189e5e5c4 __CFRunLoopDoObservers + 576 (CFRunLoop.c:1912)
19 CoreFoundation 0x189e5eb74 __CFRunLoopRun + 1056 (CFRunLoop.c:2953)
20 CoreFoundation 0x189e5e21c CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
21 GraphicsServices 0x1a1a2a784 GSEventRunModal + 164 (GSEvent.c:2259)
22 UIKitCore 0x18c89eee8 -[UIApplication _run] + 1072 (UIApplication.m:3253)
23 UIKitCore 0x18c8a475c UIApplicationMain + 168 (UIApplication.m:4707)
24 SoDro 0x10026bdc4 main + 68 (AppDelegate.swift:15)
25 libdyld.dylib 0x189b1e6b0 start + 4
I seem to be getting this error after my new release and its only happening on iOS 13 with most cases of upto 83% of the crash happening on iOS 13.3.1. I am not sure how to fix this error and I have been going through the code and cannot seem to figure out the change in iOS 13 that causes scrollViewDidScroll delegate method to crash the app.
Any help is greatly appreciated. It is also important to note that I haven't been able to reproduce this error, it only happens to users in production.
Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x0000000104620bb0
Crashed: com.apple.main-thread
0 Motoz-AppStore 0x104620bb0 ProfileBrowserViewController.scrollViewDidScroll(_:) + 4299967408 (<compiler-generated>:4299967408)
1 Motoz-AppStore 0x104620d54 #objc ProfileBrowserViewController.scrollViewDidScroll(_:) + 4299967828 (<compiler-generated>:4299967828)
2 UIKitCore 0x1be3c6a24 -[UIScrollView _notifyDidScroll] + 76
3 UIKitCore 0x1be3b0c34 -[UIScrollView setContentOffset:] + 1016
4 UIKitCore 0x1bd8153d4 -[UICollectionView setContentOffset:] + 48
5 UIKitCore 0x1be3cdd28 -[UIScrollView _adjustContentOffsetIfNecessary] + 60
6 UIKitCore 0x1be3af1cc -[UIScrollView setFrame:] + 484
7 UIKitCore 0x1bd802e7c -[UICollectionView setFrame:] + 460
8 UIKitCore 0x1be41b878 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 576
9 UIKitCore 0x1be41c510 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 236
10 UIKitCore 0x1be355b84 -[UIScrollView(_UIOldConstraintBasedLayoutSupport) _resizeWithOldSuperviewSize:] + 52
11 CoreFoundation 0x1b9eed95c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
12 CoreFoundation 0x1b9df0fb0 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
13 UIKitCore 0x1be41b5e4 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
14 UIKitCore 0x1be419938 -[UIView(Geometry) setFrame:] + 700
15 UIKitCore 0x1bd8e519c -[UINavigationController _startCustomTransition:] + 1212
16 UIKitCore 0x1bd8f9168 -[UINavigationController _startDeferredTransitionIfNeeded:] + 680
17 UIKitCore 0x1bd8fa55c -[UINavigationController __viewWillLayoutSubviews] + 164
18 UIKitCore 0x1bd8dd9e0 -[UILayoutContainerView layoutSubviews] + 224
19 UIKitCore 0x1be43617c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140
20 QuartzCore 0x1c099e2c0 -[CALayer layoutSublayers] + 284
21 QuartzCore 0x1c09a443c CA::Layer::layout_if_needed(CA::Transaction*) + 480
22 QuartzCore 0x1c09af140 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
23 QuartzCore 0x1c08f7884 CA::Context::commit_transaction(CA::Transaction*, double) + 304
24 QuartzCore 0x1c0921574 CA::Transaction::commit() + 676
25 QuartzCore 0x1c0921f68 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
26 CoreFoundation 0x1b9e97e68 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
27 CoreFoundation 0x1b9e92d54 __CFRunLoopDoObservers + 416
28 CoreFoundation 0x1b9e93320 __CFRunLoopRun + 1308
29 CoreFoundation 0x1b9e92adc CFRunLoopRunSpecific + 464
30 GraphicsServices 0x1c3e33328 GSEventRunModal + 104
31 UIKitCore 0x1bdfa063c UIApplicationMain + 1936
32 Motoz-AppStore 0x1043fed70 main + 17 (TeraHeaderView.swift:17)
33 libdyld.dylib 0x1b9d1c360 start + 4
I can not say a concrete answer unless you show a piece of code but there is a possibility that error might occur because of delegation structure. Just in case check your delegation of scrollviews(tableviews, collection views, embedded web-views as well). Please check the link link for more info.
I have received some crashes via Crashlytics. It crashed 4 times in last month.
I use Masonry for autolayout and add constraint in layoutSubviews. You can see the crash trace below.
0 libsystem_platform.dylib _platform_memmove + 284
1 Foundation _NSBitSetResize.llvm.9545202549352731061 + 288
2 Foundation NSBitSetAddIndex + 52
3 Foundation NSISLinExpEnumerateVars + 88
4 Foundation _row_setHead + 156
5 Foundation -[NSISEngine tryAddingDirectly:] + 236
6 Foundation -[NSISEngine _tryToAddConstraintWithMarkerEngineVar:row:mutuallyExclusiveConstraints:] + 156
7 Foundation -[NSISEngine tryToAddConstraintWithMarker:expression:mutuallyExclusiveConstraints:] + 684
8 Foundation -[NSLayoutConstraint _addLoweredExpression:toEngine:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 252
9 Foundation -[NSLayoutConstraint _addToEngine:mutuallyExclusiveConstraints:] + 188
10 UIKitCore -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 548
11 UIKitCore -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutuallyExclusiveConstraints:] + 36
12 UIKitCore -[UIView(UIConstraintBasedLayout) nsli_addConstraint:] + 84
13 ChopeDashboard MASViewConstraint.m line 361 -[MASViewConstraint install] + 361
14 ChopeDashboard MASConstraintMaker.m line 46 -[MASConstraintMaker install] + 46
15 ChopeDashboard View+MASAdditions.m line 18 -[UIView(MASAdditions) mas_makeConstraints:] + 18
16 ChopeDashboard CDResListHeaderView.m line 128 -[CDResListHeaderView layoutSubviews] + 128
17 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140
18 QuartzCore -[CALayer layoutSublayers] + 284
19 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) + 480
20 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
21 QuartzCore CA::Context::commit_transaction(CA::Transaction*, double) + 304
22 QuartzCore CA::Transaction::commit() + 676
23 QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 888
24 IOKit IODispatchCalloutFromCFMessage + 488
25 CoreFoundation __CFMachPortPerform + 172
26 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
27 CoreFoundation __CFRunLoopDoSource1 + 444
28 CoreFoundation __CFRunLoopRun + 2168
29 CoreFoundation CFRunLoopRunSpecific + 464
30 GraphicsServices GSEventRunModal + 104
31 UIKitCore UIApplicationMain + 1936
32 ChopeDashboard main.m line 14 main + 14
33 libdyld.dylib start + 4
Has anyone faced the same issue?
I have a crash report from crashlytics about a crash happening several times, but I don't know from where to start with that one.
The only thing I am able to see form my app is the AppDelegate, and it looks like something is going wrong with an array but where should I look?
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x39720f46 objc_msgSend + 5
1 Foundation 0x2bcec8e7 -[NSMutableRLEArray replaceObjectsInRange:withObject:length:] + 370
2 Foundation 0x2bd06b6b -[NSConcreteMutableAttributedString addAttribute:value:range:] + 266
3 UIFoundation 0x36792d07 -[NSStringDrawingTextStorage addAttribute:value:range:] + 50
4 UIFoundation 0x3677ced7 -[NSMutableAttributedString(NSMutableAttributedStringKitAdditions) fixFontAttributeInRange:] + 1738
5 UIFoundation 0x3677c71b -[NSMutableAttributedString(NSMutableAttributedStringKitAdditions) fixAttributesInRange:] + 186
6 UIFoundation 0x36797c59 -[NSTextStorage invalidateAttributesInRange:] + 108
7 UIFoundation 0x36792b27 -[NSStringDrawingTextStorage processEditing] + 66
8 UIFoundation 0x36797995 -[NSTextStorage edited:range:changeInLength:] + 312
9 UIFoundation 0x367970fb -[NSConcreteNotifyingMutableAttributedString edited:range:changeInLength:] + 50
10 Foundation 0x2bcf2529 -[NSConcreteMutableAttributedString replaceCharactersInRange:withAttributedString:] + 328
11 UIFoundation 0x3679278d -[NSStringDrawingTextStorage textContainerForAttributedString:containerSize:lineFragmentPadding:] + 72
12 UIFoundation 0x3678ba7d __NSStringDrawingEngine + 7520
13 UIFoundation 0x367905bb -[NSAttributedString(NSExtendedStringDrawing) boundingRectWithSize:options:context:] + 914
14 UIKit 0x2ea2726b -[UILabel _updateScaledMetricsForRect:] + 618
15 UIKit 0x2e700b51 -[UILabel _drawTextInRect:baselineCalculationOnly:] + 448
16 UIKit 0x2e7684c9 -[UILabel drawTextInRect:] + 488
17 UIKit 0x2e7682d9 -[UILabel drawRect:] + 84
18 UIKit 0x2e76825d -[UIView(CALayerDelegate) drawLayer:inContext:] + 400
19 QuartzCore 0x2e12e33d -[CALayer drawInContext:] + 228
20 UIKit 0x2eb74689 -[_UILabelContentLayer drawInContext:] + 140
21 QuartzCore 0x2e11765b CABackingStoreUpdate_ + 2070
22 QuartzCore 0x2e1fccb9 ___ZN2CA5Layer8display_Ev_block_invoke + 52
23 QuartzCore 0x2e116e39 x_blame_allocations + 88
24 QuartzCore 0x2e116ad1 CA::Layer::display_() + 1160
25 QuartzCore 0x2e0fa729 CA::Layer::display_if_needed(CA::Transaction*) + 200
26 QuartzCore 0x2e0fa3ed CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24
27 QuartzCore 0x2e0f9d81 CA::Context::commit_transaction(CA::Transaction*) + 224
28 QuartzCore 0x2e0f9b6f CA::Transaction::commit() + 434
29 QuartzCore 0x2e14d6e1 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 524
30 IOMobileFramebuffer 0x33050c07 IOMobileFramebufferVsyncNotifyFunc + 90
31 IOKit 0x2bfea001 IODispatchCalloutFromCFMessage + 256
32 CoreFoundation 0x2b02624d __CFMachPortPerform + 132
33 CoreFoundation 0x2b0367cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
34 CoreFoundation 0x2b036767 __CFRunLoopDoSource1 + 346
35 CoreFoundation 0x2b034d69 __CFRunLoopRun + 1608
36 CoreFoundation 0x2af81201 CFRunLoopRunSpecific + 476
37 CoreFoundation 0x2af81013 CFRunLoopRunInMode + 106
38 GraphicsServices 0x32a52201 GSEventRunModal + 136
39 UIKit 0x2e74da09 UIApplicationMain + 1440
40 MyApp 0x00264ee4 main (AppDelegate.swift:16)
41 libdyld.dylib 0x39cc6aaf start + 2
Any idea how to go further with that one?
Thread 0: Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3a6285b0 objc_msgSend + 15
1 UIKit 0x348285f5 -[UINavigationController _startTransition:fromViewController:toViewController:] + 92
2 UIKit 0x348284c1 -[UINavigationController _startDeferredTransitionIfNeeded:] + 324
3 UIKit 0x347f94e9 -[UILayoutContainerView layoutSubviews] + 180
4 UIKit 0x347b8803 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 258
5 QuartzCore 0x34562d8b -[CALayer layoutSublayers] + 214
6 QuartzCore 0x34562929 CA::Layer::layout_if_needed(CA::Transaction*) + 460
7 QuartzCore 0x3456385d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
8 QuartzCore 0x34563243 CA::Context::commit_transaction(CA::Transaction*) + 238
9 QuartzCore 0x34563051 CA::Transaction::commit() + 316
10 UIKit 0x34988369 -[UIApplication _sendOrderedOutContextsAndInvalidate:] + 112
11 UIKit 0x3483863f orderOutContextObserverCallout + 34
12 CoreFoundation 0x329826cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
13 CoreFoundation 0x329809c1 __CFRunLoopDoObservers + 276
14 CoreFoundation 0x32980c91 __CFRunLoopRun + 608
15 CoreFoundation 0x328f3ebd CFRunLoopRunSpecific + 356
16 CoreFoundation 0x328f3d49 CFRunLoopRunInMode + 104
17 GraphicsServices 0x364a62eb GSEventRunModal + 74
18 UIKit 0x34809301 UIApplicationMain + 1120
19 test 0x000f610f main (main.m:16)
I get this error in my crashlytics but not able to reproduce this error. Can any one help me to solve this how can i get rid of this crash.