Fatal Exception: NSInternalInconsistencyException

Hello fellow developers. 
I have a crash that is only available on iOS 14. I tried many methods and failed to find the cause.

Known points: 
  1. Related to UIActivityViewController 

  2. Back to the front

  3. UIDiffableDataSource

Full stack of crash:

Code Block language
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x1866d65ac exceptionPreprocess
1 libobjc.A.dylib 0x19a75042c objc_exception_throw
2 CoreFoundation 0x1865df1b4 -[CFPrefsSearchListSource addManagedSourceForIdentifier:user:]
3 Foundation 0x18793d7bc -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 UIKitCore 0x189486284 -[_UIDiffableDataSourceState initWithGenerationID:identifiers:sections:dataSourceSnapshot:]
5 UIKitCore 0x1886f09e0 56-[UIDiffableDataSource reloadFromSnapshot:completion:]_block_invoke
6 UIKitCore 0x1886f0adc 56-[UIDiffableDataSource reloadFromSnapshot:completion:]_block_invoke.188
7 libdispatch.dylib 0x1862d4ac8 _dispatch_client_callout
8 libdispatch.dylib 0x1862e2c8c _dispatch_lane_barrier_sync_invoke_and_complete
9 UIKitCore 0x1886f0764 -[UIDiffableDataSource reloadFromSnapshot:completion:]
10 UIKitCore 0x1886f0be0 -[UIDiffableDataSource applyDifferencesFromSnapshot:animatingDifferences:completion:]
11 UIKitCore 0x1886ec9ac -[UICollectionViewDiffableDataSource applySnapshot:animatingDifferences:completion:]
12 ShareSheet 0x196ac46dc -[UIActivityContentViewController refreshContent]
13 ShareSheet 0x196ace9e0 -[UIActivityViewController willEnterForeground:]
14 CoreFoundation 0x186635764 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER
15 CoreFoundation 0x186635718 _CFXRegistrationPost_block_invoke
16 CoreFoundation 0x186634cd4 _CFXRegistrationPost
17 CoreFoundation 0x1866346a0 _CFXNotificationPost
18 Foundation 0x1878c85f4 -[NSNotificationCenter postNotificationName:object:userInfo:]
19 UIKitCore 0x18900d494 -[UIApplication _sendWillEnterForegroundCallbacks]
20 UIKitCore 0x188687060 101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2
21 UIKitCore 0x188bd14d4 _UIScenePerformActionsWithLifecycleActionMask
22 UIKitCore 0x1886868c0 101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke
23 UIKitCore 0x1886862d4 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:]
24 UIKitCore 0x1886866d0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
25 UIKitCore 0x188685f48 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:]
26 UIKitCore 0x18868e078 186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke
27 UIKitCore 0x188ae3c28 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:]
28 UIKitCore 0x188be9810 _UISceneSettingsDiffActionPerformChangesWithTransitionContext
29 UIKitCore 0x18868ddf0 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]
30 UIKitCore 0x1884c2eb0 64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke
31 UIKitCore 0x1884c186c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:]
32 UIKitCore 0x1884c2ad8 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:]
33 UIKitCore 0x188b0c724 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
34 FrontBoardServices 0x195688b78 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]
35 FrontBoardServices 0x1956b4194 94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2
36 FrontBoardServices 0x195696d24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
37 FrontBoardServices 0x1956b40c0 94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke
38 libdispatch.dylib 0x1862d4ac8 _dispatch_client_callout
39 libdispatch.dylib 0x1862d8348 _dispatch_block_invoke_direct
40 FrontBoardServices 0x1956da0e0 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK
41 FrontBoardServices 0x1956d9d88 -[FBSSerialQueue _targetQueue_performNextIfPossible]
42 FrontBoardServices 0x1956da2ac -[FBSSerialQueue _performNextFromRunLoopSource]
43 CoreFoundation 0x18665381c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
44 CoreFoundation 0x186653718 CFRunLoopDoSource0
45 CoreFoundation 0x186652a94 CFRunLoopDoSources0
46 CoreFoundation 0x18664cd20 __CFRunLoopRun
47 CoreFoundation 0x18664c4bc CFRunLoopRunSpecific
48 GraphicsServices 0x19d0d1820 GSEventRunModal
49 UIKitCore 0x188ff0734 -[UIApplication _run]
50 UIKitCore 0x188ff5e10 UIApplicationMain
51 App 0x1042b9248 main (<compiler-generated>)
52 libdyld.dylib 0x186313e60 start


Have same problem

Have same problem

Have same problem

Fatal Exception: NSInternalInconsistencyException
 
 
Q