I have searched open and closed issues for this issue.
I have read and understood the license (link below).
Minimal reproducible example
we haven't found a way to repro but continue to observe these crashes in crash reports
What platform(s) does this occur on?
iOS
Did you reproduce on a real device or emulator / simulator?
real device
Steps to reproduce
We're observing an occasional crash on iOS affecting between 0.03 - 0.07 % of all sessions in our app (whilst small this is the most common crash we're seeing).
It appears to be in Apple's code when displaying a document. It looks like QLPreviewController always uses a zoom animation to transition to show the document. Sometimes Apple's code is crashing with:
NSInternalInconsistencyException - Cannot morph from a view that is not in the hierarchy.
It appears this is happening in _morphPreviewFromCurrentState in _UIZoomTransitionController (see attached example stack trace).
I understand this is in Apple's code but I'd like to propose a work-around. Would it be possible to modify RNDocumentViewer.mm's presentPreview:restoredURL:presentationStyle:resolve:reject: to nest the QLPreviewController in a UINavigationController? This would mean that the zoom transition would no longer be used (as the UINavigationController could be presented with a different animated transition).
If the issue is related to specific file(s), I have linked the files so that others can reproduce exactly what I see.
Stacktrace of the crash (if applicable)
Incident Identifier: 9D9C0F94-3F14-4F52-AA57-94A429C822F9
Distributor ID: com.apple.AppStore
Hardware Model: iPhone15,3
Process:
Path:
Identifier:
Version:
AppStoreTools: 17F106
AppVariant: 1:iPhone15,3:18
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition:
Date/Time: 2026-08-19 10:09:27.5256 +0930
Launch Time: 2026-08-19 10:07:57.0087 +0930
OS Version: iPhone OS 26.5.2 (23F84)
Release Type: User
Baseband Version: 4.51.04
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x183e5623c __exceptionPreprocess + 164 (:-1)
1 libobjc.A.dylib 0x180925224 objc_exception_throw + 88 (objc-exception.mm:356)
2 Foundation 0x181987110 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 288 (:-1)
3 UIKitCore 0x189fddcd4 -[UIView(UIMorphableInternal) _morphPreviewFromCurrentState:fallbackBackgroundColor:contentScale:] + 252 (:-1)
4 UIKitCore 0x18a135378 _UIMagicMorphAnimation.morph(to:parameters:alongsideAnimations:completion:) + 80 (:-1)
5 UIKitCore 0x18a135378 _UIZoomTransitionController.morph(to:spec:contentScale:useIntermediateShapes:completion:) + 1532 (:-1)
6 UIKitCore 0x18a134528 closure #2 in _UIZoomTransitionController.startInteractiveTransition(_:) + 268 (:-1)
7 UIKitCore 0x18995180c <deduplicated_symbol> + 28 (:-1)
8 UIKitCore 0x189987634 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
9 UIKitCore 0x189972b74 +[UIView(Animation) performWithoutAnimation:] + 76 (UIView.m:17218)
10 UIKitCore 0x18a132378 _UIZoomTransitionController.startInteractiveTransition(_:) + 3524 (:-1)
11 UIKitCore 0x18a136280 @objc _UIZoomTransitionController.startInteractiveTransition(_:) + 60 (:-1)
12 UIKitCore 0x189aac1fc ___UIViewControllerTransitioningRunCustomTransitionWithRequest_block_invoke_3 + 156 (UIViewControllerTransitioning.m:1579)
13 UIKitCore 0x189aa8508 +[UIKeyboardSceneDelegate _pinInputViewsForKeyboardSceneDelegate:onBehalfOfResponder:duringBlock:] + 92 (UIKeyboardSceneDelegate.m:3638)
14 UIKitCore 0x189aac094 ___UIViewControllerTransitioningRunCustomTransitionWithRequest_block_invoke_2 + 212 (UIViewControllerTransitioning.m:1571)
15 UIKitCore 0x189aa83ac +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:animated:] + 180 (UIView.m:17165)
16 UIKitCore 0x189aabee8 _UIViewControllerTransitioningRunCustomTransitionWithRequest + 556 (UIViewControllerTransitioning.m:1560)
17 UIKitCore 0x189a9a500 __77-[UIPresentationController runTransitionForCurrentStateAnimated:handoffData:]_block_invoke_3 + 1920 (UIPresentationController.m:1504)
18 UIKitCore 0x189a545e8 -[_UIAfterCACommitBlock run] + 72 (_UIAfterCACommitQueue.m:137)
19 UIKitCore 0x189a5451c -[_UIAfterCACommitQueue flush] + 160 (_UIAfterCACommitQueue.m:228)
20 UIKitCore 0x189a54434 _runAfterCACommitDeferredBlocks + 260 (UIApplication.m:3302)
21 UIKitCore 0x189a54a70 _cleanUpAfterCAFlushAndRunDeferredBlocks + 80 (UIApplication.m:3280)
22 UIKitCore 0x189a291c4 _UIApplicationFlushCATransaction + 72 (UIApplication.m:3343)
23 UIKitCore 0x189a290e4 __setupUpdateSequence_block_invoke_2 + 352 (_UIUpdateScheduler.m:1646)
24 UIKitCore 0x189a422a8 _UIUpdateSequenceRunNext + 128 (_UIUpdateSequence.mm:189)
25 UIKitCore 0x189a3f834 schedulerStepScheduledMainSectionContinue + 60 (_UIUpdateScheduler.m:1197)
26 UpdateCycle 0x298e0f56c UC::DriverCore::continueProcessing() + 84 (UCDriver.cc:288)
27 CoreFoundation 0x183de1358 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (:-1)
28 CoreFoundation 0x183de12cc __CFRunLoopDoSource0 + 172 (:-1)
29 CoreFoundation 0x183da65a8 __CFRunLoopDoSources0 + 232 (:-1)
30 CoreFoundation 0x183d701a0 __CFRunLoopRun + 820 (:-1)
31 CoreFoundation 0x183d6f54c _CFRunLoopRunSpecificWithOptions + 532 (:-1)
32 GraphicsServices 0x22950f498 GSEventRunModal + 120 (GSEvent.c:2049)
33 UIKitCore 0x189a68244 -[UIApplication _run] + 796 (UIApplication.m:3904)
34 UIKitCore 0x1899d3158 UIApplicationMain + 332 (UIApplication.m:5586)
35 XXXXXX 0x102d0d598 main + 64 (AppDelegate.swift:7)
36 dyld 0x18097dc1c start + 6928 (:-1)
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000232b3c1d0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001e2f737dc pthread_kill + 268 (:-1)
2 libsystem_c.dylib 0x000000018f8f5c98 abort + 148 (abort.c:122)
3 Dynatrace 0x0000000103c61ea4 0x103b18000 + 1351332
4 Dynatrace 0x0000000103c5f608 0x103b18000 + 1340936
5 CoreFoundation 0x0000000183ebc16c __handleUncaughtException + 660 (:-1)
6 libobjc.A.dylib 0x000000018092785c _objc_terminate() + 144 (objc-exception.mm:495)
7 libc++abi.dylib 0x0000000180a331f8 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
8 libc++abi.dylib 0x0000000180a34e18 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88 (cxa_exception.cpp:152)
9 libc++abi.dylib 0x0000000180a21360 __cxa_throw + 92 (cxa_exception.cpp:299)
10 libobjc.A.dylib 0x000000018092538c objc_exception_throw + 448 (objc-exception.mm:385)
11 Foundation 0x0000000181987110 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 288 (:-1)
12 UIKitCore 0x0000000189fddcd4 -[UIView(UIMorphableInternal) _morphPreviewFromCurrentState:fallbackBackgroundColor:contentScale:] + 252 (:-1)
13 UIKitCore 0x000000018a135378 _UIMagicMorphAnimation.morph(to:parameters:alongsideAnimations:completion:) + 80 (:-1)
14 UIKitCore 0x000000018a135378 _UIZoomTransitionController.morph(to:spec:contentScale:useIntermediateShapes:completion:) + 1532 (:-1)
15 UIKitCore 0x000000018a134528 closure #2 in _UIZoomTransitionController.startInteractiveTransition(_:) + 268 (:-1)
16 UIKitCore 0x000000018995180c <deduplicated_symbol> + 28 (:-1)
17 UIKitCore 0x0000000189987634 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
18 UIKitCore 0x0000000189972b74 +[UIView(Animation) performWithoutAnimation:] + 76 (UIView.m:17218)
19 UIKitCore 0x000000018a132378 _UIZoomTransitionController.startInteractiveTransition(_:) + 3524 (:-1)
20 UIKitCore 0x000000018a136280 @objc _UIZoomTransitionController.startInteractiveTransition(_:) + 60 (:-1)
21 UIKitCore 0x0000000189aac1fc ___UIViewControllerTransitioningRunCustomTransitionWithRequest_block_invoke_3 + 156 (UIViewControllerTransitioning.m:1579)
22 UIKitCore 0x0000000189aa8508 +[UIKeyboardSceneDelegate _pinInputViewsForKeyboardSceneDelegate:onBehalfOfResponder:duringBlock:] + 92 (UIKeyboardSceneDelegate.m:3638)
23 UIKitCore 0x0000000189aac094 ___UIViewControllerTransitioningRunCustomTransitionWithRequest_block_invoke_2 + 212 (UIViewControllerTransitioning.m:1571)
24 UIKitCore 0x0000000189aa83ac +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:animated:] + 180 (UIView.m:17165)
25 UIKitCore 0x0000000189aabee8 _UIViewControllerTransitioningRunCustomTransitionWithRequest + 556 (UIViewControllerTransitioning.m:1560)
26 UIKitCore 0x0000000189a9a500 __77-[UIPresentationController runTransitionForCurrentStateAnimated:handoffData:]_block_invoke_3 + 1920 (UIPresentationController.m:1504)
27 UIKitCore 0x0000000189a545e8 -[_UIAfterCACommitBlock run] + 72 (_UIAfterCACommitQueue.m:137)
28 UIKitCore 0x0000000189a5451c -[_UIAfterCACommitQueue flush] + 160 (_UIAfterCACommitQueue.m:228)
29 UIKitCore 0x0000000189a54434 _runAfterCACommitDeferredBlocks + 260 (UIApplication.m:3302)
30 UIKitCore 0x0000000189a54a70 _cleanUpAfterCAFlushAndRunDeferredBlocks + 80 (UIApplication.m:3280)
31 UIKitCore 0x0000000189a291c4 _UIApplicationFlushCATransaction + 72 (UIApplication.m:3343)
32 UIKitCore 0x0000000189a290e4 __setupUpdateSequence_block_invoke_2 + 352 (_UIUpdateScheduler.m:1646)
33 UIKitCore 0x0000000189a422a8 _UIUpdateSequenceRunNext + 128 (_UIUpdateSequence.mm:189)
34 UIKitCore 0x0000000189a3f834 schedulerStepScheduledMainSectionContinue + 60 (_UIUpdateScheduler.m:1197)
35 UpdateCycle 0x0000000298e0f56c UC::DriverCore::continueProcessing() + 84 (UCDriver.cc:288)
36 CoreFoundation 0x0000000183de1358 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (:-1)
37 CoreFoundation 0x0000000183de12cc __CFRunLoopDoSource0 + 172 (:-1)
38 CoreFoundation 0x0000000183da65a8 __CFRunLoopDoSources0 + 232 (:-1)
39 CoreFoundation 0x0000000183d701a0 __CFRunLoopRun + 820 (:-1)
40 CoreFoundation 0x0000000183d6f54c _CFRunLoopRunSpecificWithOptions + 532 (:-1)
41 GraphicsServices 0x000000022950f498 GSEventRunModal + 120 (GSEvent.c:2049)
42 UIKitCore 0x0000000189a68244 -[UIApplication _run] + 796 (UIApplication.m:3904)
43 UIKitCore 0x00000001899d3158 UIApplicationMain + 332 (UIApplication.m:5586)
44 XXXXXX 0x0000000102d0d598 main + 64 (AppDelegate.swift:7)
45 dyld 0x000000018097dc1c start + 6928 (:-1)
Thread 1:
0 libsystem_kernel.dylib 0x0000000232b37808 __semwait_signal + 8
1 libsystem_c.dylib 0x000000018f88b82c nanosleep + 220 (nanosleep.c:104)
2 Foundation 0x00000001812e7fa8 +[NSThread sleepForTimeInterval:] + 152 (:-1)
3 Dynatrace 0x0000000103bec63c 0x103b18000 + 869948
4 Dynatrace 0x0000000103ca4a14 0x103b18000 + 1624596
5 libdispatch.dylib 0x00000001be19c9a8 _dispatch_call_block_and_release + 32 (init.c:1597)
6 libdispatch.dylib 0x00000001be1b61e4 _dispatch_client_callout + 16 (client_callout.mm:85)
7 libdispatch.dylib 0x00000001be1d378c <deduplicated_symbol> + 28 (:-1)
8 libdispatch.dylib 0x00000001be1aea5c _dispatch_root_queue_drain + 708 (queue.c:7473)
9 libdispatch.dylib 0x00000001be1af098 _dispatch_worker_thread2 + 184 (queue.c:7551)
10 libsystem_pthread.dylib 0x00000001e2f6d374 _pthread_wqthread + 232 (:-1)
11 libsystem_pthread.dylib 0x00000001e2f6c8c0 start_wqthread + 8
Thread 2:
0 libsystem_kernel.dylib 0x0000000232b37808 __semwait_signal + 8
1 libsystem_c.dylib 0x000000018f88b82c nanosleep + 220 (nanosleep.c:104)
2 Foundation 0x00000001812e7fa8 +[NSThread sleepForTimeInterval:] + 152 (:-1)
3 Dynatrace 0x0000000103b54574 0x103b18000 + 247156
4 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
5 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
6 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 3:
0 libsystem_kernel.dylib 0x0000000232b37c4c guarded_pwrite_np + 8
1 libsqlite3.dylib 0x00000001821f1bd4 seekAndWrite + 472 (sqlite3-see-cccrypt.c:45844)
2 libsqlite3.dylib 0x00000001821a341c unixWrite + 176 (sqlite3-see-cccrypt.c:45922)
3 libsqlite3.dylib 0x00000001821ad6c8 syncJournal + 528 (sqlite3-see-cccrypt.c:70507)
4 libsqlite3.dylib 0x00000001821a30e4 sqlite3PagerCommitPhaseOne + 408 (sqlite3-see-cccrypt.c:72802)
5 libsqlite3.dylib 0x0000000182192d4c sqlite3BtreeCommitPhaseOne + 160 (sqlite3-see-cccrypt.c:83582)
6 libsqlite3.dylib 0x00000001821928ec vdbeCommit + 1140 (sqlite3-see-cccrypt.c:96742)
7 libsqlite3.dylib 0x0000000182169ae4 sqlite3VdbeHalt + 1348 (sqlite3-see-cccrypt.c:97152)
8 libsqlite3.dylib 0x000000018218c320 sqlite3VdbeExec + 40560 (sqlite3-see-cccrypt.c:106830)
9 libsqlite3.dylib 0x0000000182181c44 sqlite3_step + 928 (sqlite3-see-cccrypt.c:100567)
10 libsqlite3.dylib 0x000000018215b1ec sqlite3_exec + 372 (sqlite3-see-cccrypt.c:146838)
11 Dynatrace 0x0000000103b99844 0x103b18000 + 530500
12 Dynatrace 0x0000000103b99ef0 0x103b18000 + 532208
13 Dynatrace 0x0000000103bc686c 0x103b18000 + 714860
14 Dynatrace 0x0000000103bcb0ac 0x103b18000 + 733356
15 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
16 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
17 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 4:
0 libsystem_kernel.dylib 0x0000000232b37808 __semwait_signal + 8
1 libsystem_c.dylib 0x000000018f88b82c nanosleep + 220 (nanosleep.c:104)
2 Foundation 0x00000001812e7fa8 +[NSThread sleepForTimeInterval:] + 152 (:-1)
3 Dynatrace 0x0000000103b7f2cc 0x103b18000 + 422604
4 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
5 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
6 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 5:
0 libsystem_kernel.dylib 0x0000000232b31cd4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x0000000232b3530c mach_msg2_internal + 76 (:-1)
2 libsystem_kernel.dylib 0x0000000232b3522c mach_msg2 + 4 (:-1)
3 libsystem_kernel.dylib 0x0000000232b3522c mach_msg_overwrite + 424 (:-1)
4 libsystem_kernel.dylib 0x0000000232b35078 mach_msg + 24 (:-1)
5 CoreFoundation 0x0000000183da6344 __CFRunLoopServiceMachPort + 160 (:-1)
6 CoreFoundation 0x0000000183d70310 __CFRunLoopRun + 1188 (:-1)
7 CoreFoundation 0x0000000183d6f54c _CFRunLoopRunSpecificWithOptions + 532 (:-1)
8 Foundation 0x0000000180fddcf0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (:-1)
9 Foundation 0x0000000180fddbd8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (:-1)
10 UIKitCore 0x0000000189a2da7c -[UIEventFetcher threadMain] + 420 (UIEventFetcher.m:1333)
11 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
12 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
13 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 6:
Thread 7:
Thread 8:
0 libsystem_kernel.dylib 0x0000000232b31cd4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x0000000232b3530c mach_msg2_internal + 76 (:-1)
2 libsystem_kernel.dylib 0x0000000232b3522c mach_msg2 + 4 (:-1)
3 libsystem_kernel.dylib 0x0000000232b3522c mach_msg_overwrite + 424 (:-1)
4 libsystem_kernel.dylib 0x0000000232b35078 mach_msg + 24 (:-1)
5 CoreFoundation 0x0000000183da6344 __CFRunLoopServiceMachPort + 160 (:-1)
6 CoreFoundation 0x0000000183d70310 __CFRunLoopRun + 1188 (:-1)
7 CoreFoundation 0x0000000183d6f54c _CFRunLoopRunSpecificWithOptions + 532 (:-1)
8 React 0x0000000104934f14 0x104694000 + 2756372
9 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
10 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
11 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 9:
0 libsystem_kernel.dylib 0x0000000232b375e8 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001e2f6eb48 _pthread_psynch_cond_wait + 92 (:-1)
2 libsystem_pthread.dylib 0x00000001e2f6eb48 _pthread_cond_wait + 980 (:-1)
3 libc++.1.dylib 0x0000000193479bcc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 32 (condition_variable.cpp:36)
4 hermes 0x00000001053cb9c4 0x1052fc000 + 850372
5 hermes 0x00000001053cb92c 0x1052fc000 + 850220
6 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
7 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 10:
0 libsystem_kernel.dylib 0x0000000232b375e8 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001e2f6eb48 _pthread_psynch_cond_wait + 92 (:-1)
2 libsystem_pthread.dylib 0x00000001e2f6eb48 _pthread_cond_wait + 980 (:-1)
3 libc++.1.dylib 0x0000000193479bcc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 32 (condition_variable.cpp:36)
4 hermes 0x00000001053cb9c4 0x1052fc000 + 850372
5 hermes 0x00000001053cb92c 0x1052fc000 + 850220
6 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
7 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 11:
0 libsystem_kernel.dylib 0x0000000232b375e8 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001e2f6eb48 _pthread_psynch_cond_wait + 92 (:-1)
2 libsystem_pthread.dylib 0x00000001e2f6eb48 _pthread_cond_wait + 980 (:-1)
3 libc++.1.dylib 0x0000000193479bcc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 32 (condition_variable.cpp:36)
4 XXXXXX 0x00000001032ff6a0 void std::__1::condition_variable::wait<margelo::DispatchQueue::dispatch_queue::dispatch_thread_handler()::$_0>(std::__1::unique_lock<std::__1::mutex>&, margelo::DispatchQueue::dispatch_queue::disp... + 20 (condition_variable.h:147)
5 XXXXXX 0x00000001032ff6a0 margelo::DispatchQueue::dispatch_queue::dispatch_thread_handler() + 104 (MGLDispatchQueue.cpp:58)
6 XXXXXX 0x00000001032ffba4 decltype(*std::declval<margelo::DispatchQueue::dispatch_queue*>().*std::declval<void (margelo::DispatchQueue::dispatch_queue::*)()>()()) std::__1::__invoke[abi:ne200100]<void (margelo::DispatchQueu... + 28 (invoke.h:147)
7 XXXXXX 0x00000001032ffba4 void std::__1::__thread_execute[abi:ne200100]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (margelo::DispatchQueue::dispatch_queue::*)(... + 28 (thread.h:205)
8 XXXXXX 0x00000001032ffba4 void* std::__1::__thread_proxy[abi:ne200100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (margelo::DispatchQueue::disp... + 72 (thread.h:214)
9 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
10 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 12:
0 libsystem_kernel.dylib 0x0000000232b31cd4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x0000000232b3530c mach_msg2_internal + 76 (:-1)
2 libsystem_kernel.dylib 0x0000000232b3522c mach_msg2 + 4 (:-1)
3 libsystem_kernel.dylib 0x0000000232b3522c mach_msg_overwrite + 424 (:-1)
4 libsystem_kernel.dylib 0x0000000232b35078 mach_msg + 24 (:-1)
5 CoreFoundation 0x0000000183da6344 __CFRunLoopServiceMachPort + 160 (:-1)
6 CoreFoundation 0x0000000183d70310 __CFRunLoopRun + 1188 (:-1)
7 CoreFoundation 0x0000000183d6f54c _CFRunLoopRunSpecificWithOptions + 532 (:-1)
8 CFNetwork 0x0000000199222b54 +[__CFN_CoreSchedulingSetRunnable _run:] + 416 (CoreSchedulingSet.mm:1473)
9 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
10 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
11 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 13:
Thread 14:
0 libsystem_kernel.dylib 0x0000000232b31c50 semaphore_wait_trap + 8
1 libdispatch.dylib 0x00000001be19e410 _dispatch_sema4_wait + 28 (lock.c:139)
2 libdispatch.dylib 0x00000001be19eaa0 _dispatch_semaphore_wait_slow + 132 (semaphore.c:132)
3 UIKitCore 0x0000000189d20d6c 0x189947000 + 4037996
4 UIKitCore 0x0000000189d20d24 closure #2 in InProcessAnimationManager.startAdvancing(_:) + 308 (InProcessAnimationManager.swift:1110)
5 UIKitCore 0x00000001899875c4 <deduplicated_symbol> + 36 (:-1)
6 Foundation 0x0000000181061824 __NSThread__start__ + 732 (:-1)
7 libsystem_pthread.dylib 0x00000001e2f70438 _pthread_start + 136 (:-1)
8 libsystem_pthread.dylib 0x00000001e2f6c8cc thread_start + 8
Thread 15:
Thread 16:
Thread 17:
Thread 18:
Thread 19:
Thread 20:
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000010 x5: 0x0000000000000000 x6: 0xffffffffbfc007ff x7: 0xfffff0003ffff800
x8: 0x9850f8ba91002319 x9: 0x9850f8bb7dd402d9 x10: 0x0000000000000002 x11: 0x00000000fffffffd
x12: 0x0000000000000000 x13: 0x0000000000000000 x14: 0x0000000000000000 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x00000001ecd421c0 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000103 x21: 0x00000001ecd422a0 x22: 0x0000000122071560 x23: 0x00000001ee8808e0
x24: 0x0000000000000024 x25: 0x00000001841f1533 x26: 0x00000001e9d65ae4 x27: 0x00000001e5eb7000
x28: 0x000000010abf3480 fp: 0x000000016d0f4260 lr: 0x00000001e2f737dc
sp: 0x000000016d0f4240 pc: 0x0000000232b3c1d0 cpsr: 0x40001000
esr: 0x56000080 (Syscall)
Binary Images:
0x102d08000 - 0x10361ffff XXXXXX arm64 <5ef396581bac321181b4cdb8ab5b6674> /private/var/containers/Bundle/Application/39DE0EFC-7169-4AA1-8493-A50427DE6FC9/XXXXXX.app/XXXXXX
0x103b18000 - 0x103dd3fff Dynatrace arm64 <7d9449e2a26e3784a03e1e8c55655b25> /private/var/containers/Bundle/Application/39DE0EFC-7169-4AA1-8493-A50427DE6FC9/XXXXXX.app/Frameworks/Dynatrace.framework/Dynatrace
0x104198000 - 0x1044dffff OpenSSL arm64 <f78b39415f30312d8c8c35414a8738ad> /private/var/containers/Bundle/Application/39DE0EFC-7169-4AA1-8493-A50427DE6FC9/XXXXXX.app/Frameworks/OpenSSL.framework/OpenSSL
0x104694000 - 0x104acffff React arm64 <76fbcee9351730b39dc662c4e914e908> /private/var/containers/Bundle/Application/39DE0EFC-7169-4AA1-8493-A50427DE6FC9/XXXXXX.app/Frameworks/React.framework/React
0x1051a4000 - 0x10522bfff ReactNativeDependencies arm64 <b35f1182b82e33728a74a4fe502c0906> /private/var/containers/Bundle/Application/39DE0EFC-7169-4AA1-8493-A50427DE6FC9/XXXXXX.app/Frameworks/ReactNativeDependencies.framework/ReactNativeDependencies
0x1052fc000 - 0x1054fffff hermes arm64 <80d5528f2c783b90b90f747e89a9f880> /private/var/containers/Bundle/Application/39DE0EFC-7169-4AA1-8493-A50427DE6FC9/XXXXXX.app/Frameworks/hermes.framework/hermes
0x10e824000 - 0x10e82ffff libobjc-trampolines.dylib arm64e <3702c305c51e37d59a2255cef15e974a> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
0x10e8b4000 - 0x10e8cbfff GAXClient arm64e <520976f031c33a3e9ffc5a0ff7cab8be> /System/Library/AccessibilityBundles/GAXClient.bundle/GAXClient
0x1808f4000 - 0x18094547f libobjc.A.dylib arm64e <0ab507cfcb123ccd99679aac912af8e1> /usr/lib/libobjc.A.dylib
0x180979000 - 0x180a1e17f dyld arm64e <02f772fd9e3835a4b9fa9cce3a090e6d> /usr/lib/dyld
0x180a1f000 - 0x180a3959f libc++abi.dylib arm64e <9bb6bd63c74f32b281361f263c4d1a06> /usr/lib/libc++abi.dylib
0x180fd3000 - 0x181e5b6df Foundation arm64e <e9ddce29335930c6b25a526a61eae841> /System/Library/Frameworks/Foundation.framework/Foundation
0x182153000 - 0x1822fc893 libsqlite3.dylib arm64e <0a0c0fa502bb35b59ce5b702637152a7> /usr/lib/libsqlite3.dylib
0x183d41000 - 0x1842dd7bf CoreFoundation arm64e <dda24297289c30ec82284c426aad4d7f> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x189947000 - 0x18be87d7f UIKitCore arm64e <9ee8c19aa3703599823b34b84131aad7> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18f87f000 - 0x18f8fe1b7 libsystem_c.dylib arm64e <2d1e74c15d0335aeb31babe7286be166> /usr/lib/system/libsystem_c.dylib
0x19346d000 - 0x1934fda7b libc++.1.dylib arm64e <1021bb438e783e4da7a4876bcdd5b9f2> /usr/lib/libc++.1.dylib
0x199191000 - 0x19954177f CFNetwork arm64e <357a18765f973b178d5ba2536cea32ba> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x1be19b000 - 0x1be1e15ff libdispatch.dylib arm64e <e1a24fa021603366ae7e420f0fa3c5bc> /usr/lib/system/libdispatch.dylib
0x1e2f6c000 - 0x1e2f784ef libsystem_pthread.dylib arm64e <39dacbe16bf639569f6c802bea4ec760> /usr/lib/system/libsystem_pthread.dylib
0x22950e000 - 0x2295167bf GraphicsServices arm64e <d0a89589718a3d3a96dad2c99bb19040> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x232b31000 - 0x232b6cae7 libsystem_kernel.dylib arm64e <f70c76e313523a17ba3e95f85cbd1d5b> /usr/lib/system/libsystem_kernel.dylib
0x298e0e000 - 0x298e101bf UpdateCycle arm64e <6627cd0bb0fe3e028d0a33bbf0812e4d> /System/Library/PrivateFrameworks/UpdateCycle.framework/UpdateCycle
EOF
Your computer environment
I have searched open and closed issues for this issue.
I have read and understood the license (link below).
Minimal reproducible example
we haven't found a way to repro but continue to observe these crashes in crash reports
What platform(s) does this occur on?
iOS
Did you reproduce on a real device or emulator / simulator?
real device
Steps to reproduce
We're observing an occasional crash on iOS affecting between 0.03 - 0.07 % of all sessions in our app (whilst small this is the most common crash we're seeing).
It appears to be in Apple's code when displaying a document. It looks like QLPreviewController always uses a zoom animation to transition to show the document. Sometimes Apple's code is crashing with:
NSInternalInconsistencyException - Cannot morph from a view that is not in the hierarchy.
It appears this is happening in _morphPreviewFromCurrentState in _UIZoomTransitionController (see attached example stack trace).
I understand this is in Apple's code but I'd like to propose a work-around. Would it be possible to modify RNDocumentViewer.mm's presentPreview:restoredURL:presentationStyle:resolve:reject: to nest the QLPreviewController in a UINavigationController? This would mean that the zoom transition would no longer be used (as the UINavigationController could be presented with a different animated transition).
If the issue is related to specific file(s), I have linked the files so that others can reproduce exactly what I see.
Stacktrace of the crash (if applicable)
Your computer environment