-[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1256 - ios

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.

Related

Crash when contentOffset is being updated

let bottomOffset = bottomView.contentOffset.y
let currentOffset = overlayScrollView?.contentOffset.y ?? CGFloat(0)
let totalOffset = (bottomOffset + currentOffset) > 0 ? (bottomOffset + currentOffset) : 0
bottomView.contentOffset.y = 0
overlayScrollView?.contentOffset.y = totalOffset
I am facing several crashes of type EXC_BAD_ACCESS KERN_PROTECTION_FAILURE in app on this line
overlayScrollView?.contentOffset.y = totalOffset
Initially, I thought this is happening because KVO is not being handled properly, that might be message is being sent to deallocated object and observer is not removed.
Moved to new KVO keyPathBased APIs which removed overhead of removing observer. But still this issue is happening. This issue is not reproducible at all on my end.
0 QuartzCore 0x1a42bb938 CA::Layer::writable_state(CA::Transaction*) + 490
1 QuartzCore 0x1a42bba74 CA::Layer::end_change(CA::Transaction*, unsigned int, objc_object*, objc_object*) + 32
2 QuartzCore 0x1a42c4a04 CA::Layer::set_position(CA::Vec2<double> const&, bool) + 312
3 QuartzCore 0x1a42b2dbc -[CALayer setPosition:] + 48
4 QuartzCore 0x1a42b3450 -[CALayer setFrame:] + 424
5 UIKitCore 0x1a3e28df0 -[UIView(Geometry) setFrame:] + 472
6 UIKitCore 0x1a3dcf4b4 -[UIScrollView _layoutHorizontalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:verticalIndicatorFrame:] + 1320
7 UIKitCore 0x1a3dce89c -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] + 1288
8 UIKitCore 0x1a3dbabfc -[UIScrollView setContentOffset:] + 1208
9 UIKitCore 0x1a3b46ed4 -[UITableView setContentOffset:] + 284
10 Foundation 0x1a236dbd8 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 560
11 Foundation 0x1a22b2600 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68
12 Foundation 0x1a2369614 _NSSetPointValueAndNotify + 300
13 App 0x10488393c partial apply for closure #2 in PageBaseViewController.updatePanView(view:index:) + 540 (PageBaseViewController.swift:540)
14 App 0x1048822d8 partial apply for thunk for #escaping #callee_guaranteed (#guaranteed ZScrollView, #in_guaranteed NSKeyValueObservedChange<CGPoint>) -> () + 4369375960 (<compiler-generated>:4369375960)
15 libswiftFoundation.dylib 0x1a48d6a50 closure #1 in _KeyValueCodingAndObserving.observe<A>(_:options:changeHandler:) + 320
16 libswiftFoundation.dylib 0x1a48d9cc4 specialized NSKeyValueObservation.Helper._swizzle_me_observeValue(forKeyPath:of:change:context:) + 1268
17 libswiftFoundation.dylib 0x1a48d6494 #objc NSKeyValueObservation.Helper._swizzle_me_observeValue(forKeyPath:of:change:context:) + 192
18 Foundation 0x1a236bd70 NSKeyValueNotifyObserver + 288
19 Foundation 0x1a236e188 NSKeyValueDidChange + 324
20 Foundation 0x1a236dc14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 620
21 Foundation 0x1a22b2600 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68
22 Foundation 0x1a2369614 _NSSetPointValueAndNotify + 300
23 UIKitCore 0x1a3b386b0 -[UITableView _restoreOrAdjustContentOffsetWithRowCount:initialContentInsetTop:] + 352
24 UIKitCore 0x1a3b27a50 -[UITableView _updateVisibleCellsNow:] + 3552
25 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
26 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
27 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
28 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
29 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
30 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
31 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
32 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
33 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
34 UIKitCore 0x1a3b27a78 -[UITableView _updateVisibleCellsNow:] + 3592
35 UIKitCore 0x1a3b44938 -[UITableView layoutSubviews] + 356
36 UIKitCore 0x1a3e44910 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2544
37 QuartzCore 0x1a42b96dc -[CALayer layoutSublayers] + 288
38 QuartzCore 0x1a42bfe64 CA::Layer::layout_if_needed(CA::Transaction*) + 544
39 QuartzCore 0x1a42cb424 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 140
40 QuartzCore 0x1a4213c20 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 500
41 QuartzCore 0x1a423e970 CA::Transaction::commit() + 668
42 UIKitCore 0x1a39752c0 _afterCACommitHandler + 140
43 CoreFoundation 0x1a102d418 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
44 CoreFoundation 0x1a1027a48 __CFRunLoopDoObservers + 588
45 CoreFoundation 0x1a1027fe4 __CFRunLoopRun + 1012
46 CoreFoundation 0x1a10276a8 CFRunLoopRunSpecific + 572
47 GraphicsServices 0x1b76d7570 GSEventRunModal + 160
48 UIKitCore 0x1a3945370 -[UIApplication _run] + 1052
49 UIKitCore 0x1a394a8ec UIApplicationMain + 164
50 App 0x10460b944 main + 15 (main.m:15)
51 libdyld.dylib 0x1a0d06140 start + 4

'NSInvalidArgumentException', reason: 'index out of bounds for arranged subview: ...' with UIButtonBar involved

I hope someone is able to help me out here. For a weeks I am seeing this exception in my app:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'index out of bounds for arranged subview: index = 5 expected to be less than or equal to 4'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cd4c +[NSException raise:format:] + 188
3 UIKitCore 0x00007fff49095fa8 -[UIStackView insertArrangedSubview:atIndex:] + 161
4 UIKitCore 0x00007fff48282ac1 -[_UIButtonBar _layoutBar] + 3461
5 UIKitCore 0x00007fff4828637e -[_UIButtonBarStackView updateConstraints] + 48
6 UIKitCore 0x00007fff490b0afa -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 489
7 UIKitCore 0x00007fff490b10c8 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 1187
8 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
9 Foundation 0x00007fff25aa5778 -[NSISEngine withBehaviors:performModifications:] + 84
10 UIKitCore 0x00007fff490b12de -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 112
11 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
12 Foundation 0x00007fff25aa5778 -[NSISEngine withBehaviors:performModifications:] + 84
13 UIKitCore 0x00007fff490b12de -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 112
14 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
15 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
16 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
17 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
18 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
19 Foundation 0x00007fff25aa5778 -[NSISEngine withBehaviors:performModifications:] + 84
20 UIKitCore 0x00007fff490b12de -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 112
21 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
22 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
23 UIKitCore 0x00007fff490b0f62 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 829
24 Foundation 0x00007fff25aa5778 -[NSISEngine withBehaviors:performModifications:] + 84
25 UIKitCore 0x00007fff490b186a __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 85
26 UIKitCore 0x00007fff490b0077 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 104
27 UIKitCore 0x00007fff490b13c5 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 154
28 UIKitCore 0x00007fff490a1390 -[UIWindow(UIConstraintBasedLayout) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 92
29 UIKitCore 0x00007fff490b22e4 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 393
30 UIKitCore 0x00007fff4917f21b -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 272
31 UIKitCore 0x00007fff49193678 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2478
32 QuartzCore 0x00007fff2b4c6398 -[CALayer layoutSublayers] + 255
33 QuartzCore 0x00007fff2b4cc523 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 523
34 QuartzCore 0x00007fff2b4d7bba _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 80
35 QuartzCore 0x00007fff2b420c04 _ZN2CA7Context18commit_transactionEPNS_11TransactionEd + 324
36 QuartzCore 0x00007fff2b4545ef _ZN2CA11Transaction6commitEv + 649
37 QuartzCore 0x00007fff2b454f81 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 79
38 CoreFoundation 0x00007fff23da0127 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
39 CoreFoundation 0x00007fff23d9abde __CFRunLoopDoObservers + 430
40 CoreFoundation 0x00007fff23d9b12a __CFRunLoopRun + 1226
41 CoreFoundation 0x00007fff23d9a944 CFRunLoopRunSpecific + 404
42 GraphicsServices 0x00007fff38ba6c1a GSEventRunModal + 139
43 UIKitCore 0x00007fff48c8b9ec UIApplicationMain + 1605
44 MyApp 0x00000001012dd63b main + 75
45 libdyld.dylib 0x00007fff51a231fd start + 1
46 ??? 0x0000000000000001 0x0 + 1
)
I can not find out what the root cause it. Because _UIButtonBarStackView is mentioned I assume that it has something to do with a UINavigationBar UIBarButtons. It seems to happen when I dismiss a modally presented UINavigationController, but I am not sure.
It also looks like it started to happen with iOS 13.4.1, because I can't find any crash report with any older version.
Anyone might know what's going on here?
Found out the cause: I was adding the same UIBarButtonItem again to navigationItem.rightBarButtonItems. Apple seems to raise exceptions about that since iOS 13.4.1(-ish).

ScrollViewDidScroll EXC_BREAKPOINT crash only on iOS 13

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.

app crash as soon as it starts on Xcode 11

In Xcode 11, My app runs fine for the first time but once it is killed or crashed, it can not be opened, it keep crashing with below error log
crash log
1 libobjc.A.dylib 0x1866b80a4 objc_exception_throw + 55
2 CoreFoundation 0x186884ac8 +[NSException raise:format:] + 107
3 UIFoundation 0x189f1eed0 UINibDecoderDecodeObjectForValue + 407
4 UIFoundation 0x189ebb6b8 -[UINibDecoder decodeObjectForKey:] + 315
5 Foundation 0x186cb7630 -[NSLayoutConstraint initWithCoder:] + 227
6 UIFoundation 0x189f1f010 UINibDecoderDecodeObjectForValue + 727
7 UIFoundation 0x189ebb6b8 -[UINibDecoder decodeObjectForKey:] + 315
8 UIKitCore 0x18a626568 -[UIRuntimeConnection initWithCoder:] + 171
9 UIFoundation 0x189f1f010 UINibDecoderDecodeObjectForValue + 727
10 UIFoundation 0x189f1f244 UINibDecoderDecodeObjectForValue + 1291
11 UIFoundation 0x189ebb6b8 -[UINibDecoder decodeObjectForKey:] + 315
12 UIKitCore 0x18a6215b4 -[NSCoder+ 6874548 (UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 487
13 UIKitCore 0x18a6241a4 -[UINib instantiateWithOwner:options:] + 1111
14 UIKitCore 0x18a36e8b0 -[UIViewController _loadViewFromNibNamed:bundle:] + 363
15 UIKitCore 0x18a36f2ec -[UIViewController loadView] + 175
16 UIKitCore 0x18a36f5a4 -[UIViewController loadViewIfRequired] + 171
17 UIKitCore 0x18a2e1f70 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 167
18 UIKitCore 0x18a2e227c -[UINavigationController _startTransition:fromViewController:toViewController:] + 175
19 UIKitCore 0x18a2e30b0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 1135
20 UIKitCore 0x18a2e43f4 -[UINavigationController __viewWillLayoutSubviews] + 163
21 UIKitCore 0x18a2c81c8 -[UILayoutContainerView layoutSubviews] + 223
22 UIKitCore 0x18adf6d3c -[UIView+ 15088956 (CALayerDelegate) layoutSublayersOfLayer:] + 2139
23 QuartzCore 0x18d2f012c -[CALayer layoutSublayers] + 283
24 QuartzCore 0x18d2f495c CA::Layer::layout_if_needed+ 1399132 (CA::Transaction*) + 479
25 QuartzCore 0x18d300350 CA::Layer::layout_and_display_if_needed+ 1446736 (CA::Transaction*) + 135
26 QuartzCore 0x18d248edc CA::Context::commit_transaction+ 696028 (CA::Transaction*, double) + 295
27 QuartzCore 0x18d272e44 CA::Transaction::commit+ 867908 () + 675
28 UIKitCore 0x18a988f98 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 79
29 CoreFoundation 0x18690cec4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 19
30 CoreFoundation 0x18690c664 __CFRunLoopDoBlocks + 263
31 CoreFoundation 0x1869078e0 __CFRunLoopRun + 1099
32 CoreFoundation 0x18690716c CFRunLoopRunSpecific + 463
33 GraphicsServices 0x19073f328 GSEventRunModal + 103
34 UIKitCore 0x18a971d0c UIApplicationMain + 1935
35 ------------- 0x104ea06c0 0x104e94000 + 50880
36 libdyld.dylib 0x186792424 start + 3```
I had the same problem and it was because of a UITextView in a storyboard and a critical issue in Xcode 11.2 fixed in Xcode 11.2.1 GM : https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_1_gm_seed_release_notes/
This update fixes a critical issue that could cause apps using UITextView to crash when run on previous versions of iOS, iPadOS, or tvOS. Please see the release notes.

my app crash in uikit ,only happen on IPhone X and above exception name NSInternalInconsistencyException

Failed to load bounding path bitmap data from the asset manager for asset name: BoundingPathBitmap-1125x2436-375x812-3.00x
The crash happen on the viewcontroller contain UIScrollView When open it,and only happens with the iPhone X and above
We develop app UI use storyboard
0 CoreFoundation ___exceptionPreprocess + 228
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation +[_CFXNotificationTokenRegistration keyCallbacks]
3 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
4 UIKitCore -[_UIScreenBezierBoundingPathUtilities _loadBitmapForScreen:type:] + 1124
5 UIKitCore -[_UIScreenBezierBoundingPathUtilities initWithScreen:] + 144
6 UIKitCore +[_UIScreenBoundingPathUtilities boundingPathUtilitiesForScreen:] + 108
7 UIKitCore -[UIScreen _boundingPathUtilities] + 56
8 UIKitCore -[UIWindow _boundingPath] + 168
9 UIKitCore -[UIView(UIViewBoundingPathSupportInternal) _effectiveBoundingPathAndBoundingPathView:] + 256
10 UIKitCore -[UIView(UIViewBoundingPathSupport) _inscribedRectInBoundingPathByInsettingRect:onEdges:withOptions:] + 88
11 UIKitCore -[UIScrollView(UIScrollViewInternal) _baseInsetsForTrailingEdgeAccessoryWithBoundingPathEdgesToUse:safeAreaInsets:bounds:scale:accessoryWidth:additionalInsetFromEdge:] + 180
12 UIKitCore -[UIScrollView(UIScrollViewInternal) _baseInsetsForAccessoryOnEdge:hasCustomClientInsets:accessorySize:additionalInsetFromEdge:] + 1388
13 UIKitCore -[UIScrollView(UIScrollViewInternal) _effectiveVerticalScrollIndicatorInsets] + 152
14 UIKitCore -[UIScrollView _layoutVerticalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:] + 252
15 UIKitCore -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] + 1040
16 UIKitCore -[UIScrollView _updateForChangedScrollIndicatorRelatedInsets] + 132
17 UIKitCore __UIScrollViewAdjustForOverlayInsetsChangeIfNecessary + 512
18 UIKitCore -[UIScrollView(UIScrollViewInternal) setSafeAreaInsets:] + 312
19 UIKitCore -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 1288
20 UIKitCore -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 124
21 UIKitCore -[UIScrollView(_UIOldConstraintBasedLayoutSupport) _resizeWithOldSuperviewSize:] + 52
22 CoreFoundation -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 464
23 UIKitCore -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
24 UIKitCore -[UIView(AdditionalLayoutSupport) _is_layout] + 152
25 UIKitCore -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 988
26 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1380
27 QuartzCore 0x00000001ca79e000 + 1309564
28 QuartzCore 0x00000001ca79e000 + 1329972
29 QuartzCore 0x00000001ca79e000 + 669080
30 QuartzCore 0x00000001ca79e000 + 859848
31 QuartzCore 0x00000001ca79e000 + 863536
32 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
33 CoreFoundation ___CFRunLoopDoObservers + 412
34 CoreFoundation ___CFRunLoopRun + 1264
35 CoreFoundation CFRunLoopRunSpecific + 436
36 GraphicsServices GSEventRunModal + 100
37 UIKitCore UIApplicationMain + 212
38 live main (main.mm:23)
39 libdyld.dylib 0x00000001c5d2a000 + 2996
hope someone could give me some advice, thanks
The same crash also happened in my app.
When I turned off the 'Show Horizontal Indicator' and 'Show Vertical Indicator' on the storyboard, the crash no longer occurred.
It just happened with my app .. Fixed ,
Delete the app and restart Simulator ..
^ command + shift + K to clean build folder

Resources