QuickLook Crash at iOS 18.x

Hello! In our App we found out the сrash at QuickLook after users updated their iPhones up to iOS 18. Crash report:

SIGABRT 0x0000000000000000

Crashed: Thread
0  libsystem_kernel.dylib      __abort_with_payload + 8
1  libsystem_kernel.dylib      abort_with_payload_wrapper_internal + 104
2  libsystem_kernel.dylib      abort_with_payload_wrapper_internal + 0
3  libobjc.A.dylib             _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4  libobjc.A.dylib             _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 0
5  libobjc.A.dylib             weak_register_no_lock + 396
6  libobjc.A.dylib             objc_initWeak + 440
7  UIKitCore                   -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1412
8  UIKitCore                   -[_UIRemoteViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 396
9  UIKitCore                   -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1180
10 UIKitCore                   -[_UISizeTrackingView _didMoveFromWindow:toWindow:] + 112
11 UIKitCore                   -[UIView(Internal) _didMoveFromWindow:toWindow:] + 712
12 UIKitCore                   __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 128
13 CoreAutoLayout              -[NSISEngine withBehaviors:performModifications:] + 84
14 UIKitCore                   -[UIView _postMovedFromSuperview:] + 512
15 UIKitCore                   __UIViewWasRemovedFromSuperview + 136
16 UIKitCore                   -[UIView(Hierarchy) removeFromSuperview] + 248
17 QuickLook                   -[QLToolbarController setAccessoryView:animated:] + 576
18 QuickLook                   __55-[QLPreviewController _presentLoadedPreviewCollection:]_block_invoke + 120
19 QuickLookUICore             QLRunInMainThread + 60
20 QuickLook                   -[QLPreviewController _presentLoadedPreviewCollection:] + 116
21 QuickLook                   __48-[QLPreviewController _presentPreviewCollection]_block_invoke_2 + 68
22 QuickLook                   (Missing)
23 libswift_Concurrency.dylib  swift::runJobInEstablishedExecutorContext(swift::Job*) + 252

After research, we found out that a crash occurs in QuickLook when a user tries to open a file with unknown mimeType - application/octet-stream. QuickLook convert that files to known type (for an example - application/pdf), but crashes for the first opening the file.

Any help would be greatly appreciated!

any update on this?

Can you please file a Feedback report? This over-release is difficult to investigate without repro steps. Thanks.

hi! we can't reproduce crash by ourself, but as I wrote above:

we found out that it occurs in QuickLook when a user tries to open a file with unknown mimeType - application/octet-stream. QuickLook convert that files to known type (for an example - application/pdf), but crashes for the first opening the file.

unfortunately, we don't have a file with unknown mimeType - application/octet-stream that crashes QuickLook when opened.

I'm attaching a crash report below as txt file.

# Device model: iPhone15,3
# OS version: iOS 18.1.1
# Jailbroken: false

#0. SIGABRT 0x0000000000000000

Crashed: Thread
0  libsystem_kernel.dylib       0x1d4924ec4 __abort_with_payload + 8
1  libsystem_kernel.dylib       0x1d4944bec abort_with_payload_wrapper_internal + 104
2  libsystem_kernel.dylib       0x1d4944b84 abort_with_payload_wrapper_internal + 0
3  libobjc.A.dylib              0x181847ea0 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4  libobjc.A.dylib              0x181847e2c _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 0
5  libobjc.A.dylib              0x181847040 weak_register_no_lock + 396
6  libobjc.A.dylib              0x1818469bc objc_initWeak + 440
7  UIKitCore                    0x186f72b08 -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1412
8  UIKitCore                    0x18819aa4c -[_UIRemoteViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 396
9  UIKitCore                    0x186d05d90 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1180
10 UIKitCore                    0x18818eb3c -[_UISizeTrackingView _didMoveFromWindow:toWindow:] + 112
11 UIKitCore                    0x186d05bbc -[UIView(Internal) _didMoveFromWindow:toWindow:] + 712
12 UIKitCore                    0x186cf82f0 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 128
13 CoreAutoLayout               0x1a74f0030 -[NSISEngine withBehaviors:performModifications:] + 84
14 UIKitCore                    0x186cfb234 -[UIView _postMovedFromSuperview:] + 512
15 UIKitCore                    0x186dad068 __UIViewWasRemovedFromSuperview + 136
16 UIKitCore                    0x186dacdac -[UIView(Hierarchy) removeFromSuperview] + 248
17 QuickLook                    0x217051b3c -[QLToolbarController setAccessoryView:animated:] + 576
18 QuickLook                    0x217042eb8 __55-[QLPreviewController _presentLoadedPreviewCollection:]_block_invoke + 120
19 QuickLookUICore              0x206476d24 QLRunInMainThread + 60
20 QuickLook                    0x217042e24 -[QLPreviewController _presentLoadedPreviewCollection:] + 116
21 QuickLook                    0x217042d84 __48-[QLPreviewController _presentPreviewCollection]_block_invoke_2 + 68
22 QuickLook                    0x2170ec29c (Missing)
23 libswift_Concurrency.dylib   0x18fc5b104 swift::runJobInEstablishedExecutorContext(swift::Job*) + 252

We're experiencing the same crash. For us it happens inconsistently when users

  1. Open a PDF preview
  2. Background the app
  3. Foreground the app

We've tried reproducing the crash using files that lead to a crash for users, but that didn't help.

We were able to temporarily fix this by dismissing the preview when the app enters background.

Still facing this crash on iOS 18+. Do we have any solution?

Same issue. Many users


0  libsystem_kernel.dylib         0x13f64 __abort_with_payload + 8
1  libsystem_kernel.dylib         0x33c20 abort_with_payload_wrapper_internal + 104
2  libsystem_kernel.dylib         0x33bb8 abort_with_payload_wrapper_internal + 30
3  libobjc.A.dylib                0xbea0 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116
4  libobjc.A.dylib                0xbe2c _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 30
5  libobjc.A.dylib                0xb040 weak_register_no_lock + 396
6  libobjc.A.dylib                0xa9bc objc_initWeak + 440
7  UIKitCore                      0x29a7a8 -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1412
8  UIKitCore                      0x14a5090 -[_UIRemoteViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 396
9  UIKitCore                      0x253c8 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1180
10 UIKitCore                      0x1499000 -[_UISizeTrackingView _didMoveFromWindow:toWindow:] + 112
11 UIKitCore                      0x251f4 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 712
12 UIKitCore                      0x16e84 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 128
13 CoreAutoLayout                 0x12030 -[NSISEngine withBehaviors:performModifications:] + 84
14 UIKitCore                      0x19dc8 -[UIView _postMovedFromSuperview:] + 512
15 UIKitCore                      0xd45e4 __UIViewWasRemovedFromSuperview + 136
16 UIKitCore                      0xd4328 -[UIView(Hierarchy) removeFromSuperview] + 248
17 QuickLook                      0x1b0b8 -[QLToolbarController setAccessoryView:animated:] + 576
18 QuickLook                      0xc688 __55-[QLPreviewController _presentLoadedPreviewCollection:]_block_invoke + 120
19 QuickLookUICore                0x3f04 QLRunInMainThread + 60
20 QuickLook                      0xc5f4 -[QLPreviewController _presentLoadedPreviewCollection:] + 116
21 QuickLook                      0xc554 __48-[QLPreviewController _presentPreviewCollection]_block_invoke_2 + 68
22 QuickLook                      0xb55d4 __swift_memcpy0_1 + 45444
23 libswift_Concurrency.dylib     0x610e4 swift::runJobInEstablishedExecutorContext(swift::Job*) + 252
24 libswift_Concurrency.dylib     0x624f4 swift_job_runImpl(swift::Job*, swift::SerialExecutorRef) + 144
25 libdispatch.dylib              0x128f4 _dispatch_main_queue_drain + 744
26 libdispatch.dylib              0x125fc _dispatch_main_queue_callback_4CF + 44
27 CoreFoundation                 0x56f64 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
28 CoreFoundation                 0x54188 __CFRunLoopRun + 1996
29 CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
30 GraphicsServices               0x11c4 GSEventRunModal + 164
31 UIKitCore                      0x3de2c0 -[UIApplication _run] + 816
32 UIKitCore                      0x48cddc UIApplicationMain + 340
33 Клиент                         0x148b44 main + 31 (AppDelegate.swift:31)
34 ???                            0x1ad094d34 (Missing)
QuickLook Crash at iOS 18.x
 
 
Q