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.
Related
Over the last week, I've noticed a lot of -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1256 crashes on iPhone 14 Pro devices running iOS 16.1.1.
The tableView where this problem originates has a constant number of rows and sections, so the datasource is never modified.
The crashes are also being reported to Crashlytics and Sentry, but never make it into the Apple Organizer.
Any idea what's going on? How can I resolve this issue?
Crashed: com.apple.main-thread
0 App 0x90e74 SettingsViewController.tableView(_:cellForRowAt:) + 4374285940 (SettingsViewController.swift:4374285940)
1 App 0x91210 #objc SettingsViewController.tableView(_:cellForRowAt:) + 4374286864 (<compiler-generated>:4374286864)
2 UIKitCore 0x14beec -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1256
3 UIKitCore 0x11f844 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 596
4 UIKitCore 0x59350 -[UITableView _updateVisibleCellsNow:] + 1088
5 UIKitCore 0x58e44 -[UITableView layoutSubviews] + 148
6 UIKitCore 0x5020 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980
7 QuartzCore 0x99ec CA::Layer::layout_if_needed(CA::Transaction*) + 500
8 UIKitCore 0xd21dc -[UIView(Hierarchy) layoutBelowIfNeeded] + 292
9 UIKitCore 0x3dc0c -[UINavigationController _layoutViewController:] + 816
10 UIKitCore 0x3d8d8 -[UINavigationController _layoutTopViewControllerLookForNested:] + 436
11 UIKitCore 0x1506dc -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 892
12 UIKitCore 0x150324 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 296
13 UIKitCore 0x14f8e4 -[UINavigationTransitionView _cleanupTransition] + 536
14 UIKitCore 0x14f634 +[UIView(UIViewAnimationWithBlocks) conditionallyAnimate:withAnimation:layout:completion:] + 136
15 UIKitCore 0x1a8c0c -[UINavigationTransitionView transition:fromView:toView:] + 1612
16 UIKitCore 0x1a8270 -[UINavigationController _startTransition:fromViewController:toViewController:] + 2104
17 UIKitCore 0x1a6fb4 -[UINavigationController _startDeferredTransitionIfNeeded:] + 608
18 UIKitCore 0x1a6604 -[UINavigationController __viewWillLayoutSubviews] + 96
19 UIKitCore 0x1a6568 -[UILayoutContainerView layoutSubviews] + 172
20 UIKitCore 0x5020 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980
21 QuartzCore 0x99ec CA::Layer::layout_if_needed(CA::Transaction*) + 500
22 QuartzCore 0x1d0a0 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148
23 QuartzCore 0x2e5b0 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 456
24 QuartzCore 0x635ec CA::Transaction::commit() + 652
25 QuartzCore 0x4c8cc CA::Transaction::flush_as_runloop_observer(bool) + 88
26 UIKitCore 0x504b44 _UIApplicationFlushCATransaction + 52
27 UIKitCore 0x652740 _UIUpdateSequenceRun + 84
28 UIKitCore 0xc99fd0 schedulerStepScheduledMainSection + 172
29 UIKitCore 0xc9919c runloopSourceCallback + 92
30 CoreFoundation 0xd5f54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
31 CoreFoundation 0xe232c __CFRunLoopDoSource0 + 176
32 CoreFoundation 0x66210 __CFRunLoopDoSources0 + 244
33 CoreFoundation 0x7bba8 __CFRunLoopRun + 836
34 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612
35 GraphicsServices 0x1368 GSEventRunModal + 164
36 UIKitCore 0x3a23d0 -[UIApplication _run] + 888
37 UIKitCore 0x3a2034 UIApplicationMain + 340
38 App 0x8020 main + 41 (AppDelegate.swift:41)
39 ??? 0x1aa7e0960 (Missing)
I discovered that there was a forced unwrapping deep inside my codebase. I would encourage you to search for any forced unwrapping.
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 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)
I have my app in alpha test, and using fabric to capture the crash logs. I had encountered a crash, and I have the below trace but have no idea what is going on. I tried to reproduce it with Xcode, but hardly can reproduce.
Could any one help on this? or share some ideas?
Thread : Crashed: com.apple.main-thread
0 libsystem_platform.dylib 0x0000000197c7d8d4 OSAtomicCompareAndSwap32Barrier + 12
1 libobjc.A.dylib 0x0000000197468120 realizeClass(objc_class*) + 100
2 libobjc.A.dylib 0x000000019746c930 lookUpImpOrForward + 224
3 libobjc.A.dylib 0x0000000197477db8 _objc_msgSend_uncached_impcache + 56
4 UIKit 0x000000018b66bef4 -[UINavigationController _startCustomTransition:] + 972
5 UIKit 0x000000018b57d630 -[UINavigationController _startDeferredTransitionIfNeeded:] + 468
6 UIKit 0x000000018b57d3fc -[UINavigationController __viewWillLayoutSubviews] + 56
7 UIKit 0x000000018b57d37c -[UILayoutContainerView layoutSubviews] + 200
8 UIKit 0x000000018b4c5d2c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 572
9 QuartzCore 0x000000018ae1d994 -[CALayer layoutSublayers] + 168
10 QuartzCore 0x000000018ae18564 CA::Layer::layout_if_needed(CA::Transaction*) + 320
11 QuartzCore 0x000000018ae18408 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
12 QuartzCore 0x000000018ae17c08 CA::Context::commit_transaction(CA::Transaction*) + 276
13 QuartzCore 0x000000018ae1798c CA::Transaction::commit() + 436
14 UIKit 0x000000018b4c7c48 _UIApplicationHandleEventQueue + 1700
15 CoreFoundation 0x0000000186cd29ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
16 CoreFoundation 0x0000000186cd1c90 __CFRunLoopDoSources0 + 264
17 CoreFoundation 0x0000000186ccfd40 __CFRunLoopRun + 712
18 CoreFoundation 0x0000000186bfd0a4 CFRunLoopRunSpecific + 396
19 GraphicsServices 0x000000018fd975a4 GSEventRunModal + 168
20 UIKit 0x000000018b52eaa4 UIApplicationMain + 1488
21 MCompass 0x00000001001631c8 main (main.m:16)
22 libdyld.dylib 0x0000000197ad2a08 start + 4
It is hard to tell without seeing some more details, but maybe this can help: http://aplus.rs/2013/beware-a-crashing-bug-lurks-with-uinavigationcontroller-transitions/
I have been getting a rare crash in my app. I am able to track it via hockey app tool integrated with the app. But, unfortunately i am not able to find out any clue about it so as to resolve it.
The crash is happening in the main method of my application in thread 0. I would like to post the stack trace for better analysis. Here it is.
Thread 0 Crashed:
0 libobjc.A.dylib 0x34ed7f46 _objc_msgSend + 6
1 UIKit 0x2ac884cf -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 472
2 UIKit 0x2ac88593 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 52
3 UIKit 0x2ac7dd21 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2266
4 UIKit 0x2aa962df -[UITableView layoutSubviews] + 184
5 UIKit 0x2a9c0677 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 512
6 QuartzCore 0x2a3e8ccd -[CALayer layoutSublayers] + 134
7 QuartzCore 0x2a3e46b5 CA::Layer::layout_if_needed(CA::Transaction*) + 358
8 QuartzCore 0x2a3e453d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 14
9 QuartzCore 0x2a3e3f21 CA::Context::commit_transaction(CA::Transaction*) + 222
10 QuartzCore 0x2a3e3d25 CA::Transaction::commit() + 322
11 UIKit 0x2ac0bc43 _UIWindowUpdateVisibleContextOrder + 208
12 UIKit 0x2ac0bad5 +[UIWindow _prepareWindowsPassingTestForAppResume:] + 14
13 UIKit 0x2ac2c8f3 -[UIApplication _updateSnapshotAndStateRestorationArchiveForBackgroundEvent:saveState:exitIfCouldNotRestoreState:] + 200
14 UIKit 0x2ac2bda3 __80-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:]_block_invoke_2 + 112
15 libdispatch.dylib 0x3542b8cb _dispatch_call_block_and_release + 8
16 libdispatch.dylib 0x3542b8b7 _dispatch_client_callout + 20
17 libdispatch.dylib 0x3542f0bf __dispatch_main_queue_callback_4CF + 723
18 CoreFoundation 0x274eabe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 6
19 CoreFoundation 0x274e92e9 __CFRunLoopRun + 1510
20 CoreFoundation 0x27437621 _CFRunLoopRunSpecific + 477
21 CoreFoundation 0x27437433 _CFRunLoopRunInMode + 107
22 GraphicsServices 0x2e7bd0a9 _GSEventRunModal + 137
23 UIKit 0x2aa22359 _UIApplicationMain + 1441
The crash being in the main thread, i don't get any clue of where and how to start tracing this crash.
Any help would be highly appreciated.