PDFKit Crash Problem

Recently, our app crash monitor detect a lot of PDFKit crash problem at iOS 15.3:

MACH_Exception EXC_BREAKPOINT EXC_ARM_BREAKPOINT fault_address:0x00000001809a52d8
Thread 67 name: PDFKit.PDFTilePool.workQueue

0
CoreFoundation
_CFRetain (in CoreFoundation)
1
CoreGraphics
_CGColorRetain (in CoreGraphics)
2
PDFKit
-[PDFPage _drawWithBox:inContext:withRotation:isThumbnail:withAnnotations:withBookmark:withDelegate:] (in PDFKit)
3
PDFKit
-[PDFPage drawWithBox:inContext:isThumbnail:] (in PDFKit)
4
PDFKit
-[PDFView drawPage:toContext:] (in PDFKit)
5
PDFKit
-[PDFTilePool _renderTileForRequest:] (in PDFKit)
6
libdispatch.dylib
__dispatch_call_block_and_release (in libdispatch.dylib)
7
libdispatch.dylib
__dispatch_client_callout (in libdispatch.dylib)
8
libdispatch.dylib
__dispatch_lane_serial_drain (in libdispatch.dylib)
9
libdispatch.dylib
__dispatch_lane_invoke (in libdispatch.dylib)
10
libdispatch.dylib
__dispatch_workloop_worker_thread (in libdispatch.dylib)
11
libsystem_pthread.dylib
__pthread_wqthread (in libsystem_pthread.dylib)
12
libsystem_pthread.dylib
_start_wqthread (in libsystem_pthread.dylib)

It crash at the thread: PDFKit.PDFTilePool.workQueue

Anyone got the same problem? Is there any solutions for this problem?

Post not yet marked as solved Up vote post of hanson21 Down vote post of hanson21
1.7k views
  • I have exactly the same issue on macOS. Mine blows up on the PDFView drawPage:toContext. Happens when doing a stress test alternately opening and closing two PDF files. Some crashes on the first close, some on a later close.Suspect "stale" window update events that trigger PDF page redraws after the user has clicked on the window close button. What am I missing?

Add a Comment

Replies

Our app encountered this issue too, does this issue can be resolved right now?

We have this issue too

We have this issue, too.

I had a similar problem where my PDFView would crash on selecting text or other gestures like swiping.

Turns out that for some reason it had to do with setting the creationDateAttribute on the documentAttributes of the view's PDFDocument was causing the crash. I don't know how this is related to the problem. Limiting the documents metadata to just some essential information (no creationDateAttribute) did the trick for me.