Crash on DiffableDataSource while .apply(snapshot:)

0  libsystem_platform.dylib       0x1a48 _platform_memmove + 552
1  CoreAutoLayout                 0x18e80 _NSBitSetResize + 236
2  CoreAutoLayout                 0xda18 NSBitSetAddIndex + 52
3  CoreAutoLayout                 0xf6a4 NSISLinExpEnumerateVars + 88
4  CoreAutoLayout                 0x112cc _row_setHead + 140
5  CoreAutoLayout                 0xfecc -[NSISEngine tryAddingDirectly:] + 208
6  CoreAutoLayout                 0xcd14 -[NSISEngine _tryToAddConstraintWithMarkerEngineVar:row:mutuallyExclusiveConstraints:] + 132
7  CoreAutoLayout                 0x8494 -[NSISEngine tryToAddConstraintWithMarker:expression:mutuallyExclusiveConstraints:] + 548
8  CoreAutoLayout                 0xfcc8 -[NSLayoutConstraint _addLoweredExpression:toEngine:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 276
9  CoreAutoLayout                 0xddc8 -[NSLayoutConstraint _addToEngine:mutuallyExclusiveConstraints:] + 164
10 UIKitCore                      0x2eaf24 -[UIView _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 548
11 UIKitCore                      0x25c5d0 -[UIView _tryToAddConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 208
12 UIKitCore                      0x23da48 -[UIView(UIConstraintBasedLayout) nsli_addConstraint:] + 72
13 UIKitCore                      0x24e60c -[UIView _updateContentSizeConstraints] + 700
14 UIKitCore                      0x2f9bdc -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 124
15 UIKitCore                      0x35f368 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 480
16 UIKitCore                      0x18100c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 996
17 UIKitCore                      0x180eec -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 708
18 UIKitCore                      0x180eec -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 708
19 UIKitCore                      0x180eec -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 708
20 CoreAutoLayout                 0x7a88 -[NSISEngine withBehaviors:performModifications:] + 80
21 UIKitCore                      0x4fd528 -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 120
22 UIKitCore                      0x180eec -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 708
23 UIKitCore                      0x1e6ad8 __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 84
24 UIKitCore                      0x25ec64 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 160
25 UIKitCore                      0x463078 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 516
26 UIKitCore                      0x184fcc -[UIView _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 368
27 UIKitCore                      0x17d9d0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2692
28 QuartzCore                     0x3cb6c CA::Layer::layout_if_needed(CA::Transaction*) + 532
29 UIKitCore                      0x1dfa74 -[UIView(Hierarchy) layoutBelowIfNeeded] + 524
30 UIKitCore                      0x164750 +[UIView(Animation) performWithoutAnimation:] + 96
31 UIKitCore                      0x2723dc -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 2236
32 UIKitCore                      0x45fbe8 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 704
33 UIKitCore                      0x296d74 -[UITableView _updateVisibleCellsNow:] + 1428
34 UIKitCore                      0x16d9ec -[UITableView layoutSubviews] + 436
35 UIKitCore                      0x17d964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2584
36 QuartzCore                     0x3cb6c CA::Layer::layout_if_needed(CA::Transaction*) + 532
37 UIKitCore                      0x1dfa74 -[UIView(Hierarchy) layoutBelowIfNeeded] + 524
38 UIKitCore                      0x29c19c -[UITableView reloadData] + 1512
39 UIKitCore                      0x943a8 -[UITableView _performInternalBatchUpdates:] + 48
40 UIKitCore                      0x941d4 -[UITableView _performDiffableUpdate:] + 96
41 UIKitCore                      0x3bf084 -[_UIDiffableDataSourceViewUpdater _reloadData] + 316
42 UIKitCore                      0x32d348 __56-[__UIDiffableDataSource reloadFromSnapshot:completion:]_block_invoke + 208
43 UIKitCore                      0x35dfcc __56-[__UIDiffableDataSource reloadFromSnapshot:completion:]_block_invoke.178 + 44
44 libdispatch.dylib              0x641a8 _dispatch_client_callout + 16
45 libdispatch.dylib              0x111f8 _dispatch_lane_barrier_sync_invoke_and_complete + 52
46 UIKitCore                      0x35d628 -[__UIDiffableDataSource reloadFromSnapshot:completion:] + 652
47 UIKitCore                      0x3164d4 -[__UIDiffableDataSource applyDifferencesFromSnapshot:animatingDifferences:completion:] + 160
48 libswiftUIKit.dylib            0x6314 UICollectionViewDiffableDataSource.apply(_:animatingDifferences:completion:) + 196
49 Target              0x3eb300 ViewController.applySnapshot(with:) + 146 (ViewController.swift:146)
50 Target              0x3e8b5c ViewController.reloadUI(didUserSelect:completion:) + 4305881948 (<compiler-generated>:4305881948)
51 Target              0x3ece6c closure #1 in ViewController.configureWidgetObserver() + 4305899116 (<compiler-generated>:4305899116)
52 Combine                        0x9160 Subscribers.Sink.receive(_:) + 88
53 Combine                        0x8bf0 protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B> + 20
54 Combine                        0xe540 closure #1 in Publishers.ReceiveOn.Inner.receive(_:) + 208
55 libswiftDispatch.dylib         0x12a4 thunk for @escaping @callee_guaranteed () -> () + 20

I have implemented a table view using Diffable datasource, not getting the crash in debug mode, when it goes for release many of our users are facing the crash. Im unable to understand the root cause. Kindly if someone identifies the reason please help. Thanks in advance

have you checked your layout and the constraints you defined ?

Crash on DiffableDataSource while .apply(snapshot:)
 
 
Q