vfr / UXReader-iOS

UXReader PDF Framework for iOS
Other
290 stars 66 forks source link

There is a crash, I can not figure it ! #20

Open usiege opened 6 years ago

usiege commented 6 years ago
0 libobjc.A.dylib objc_msgSend + 16
1 UXReader -[UXReaderDocumentPage renderTileInContext:] + 1032
2 UXReader -[UXReaderPageTiledView drawLayer:inContext:] + 64
3 QuartzCore -[CALayer drawInContext:] + 296
4 QuartzCore tiled_layer_render(_CAImageProvider, unsigned int, unsigned int, unsigned int, unsigned int, void) + 1532
5 QuartzCore CAImageProviderThread(unsigned int*, bool) + 812
6 libdispatch.dylib __dispatch_client_callout + 16
7 libdispatch.dylib __dispatch_queue_override_invoke$VARIANT$mp + 716
8 libdispatch.dylib __dispatch_root_queue_drain + 600
9 libdispatch.dylib __dispatch_worker_thread3 + 120
10 libsystem_pthread.dylib _pthread_wqthread + 1268
usiege commented 6 years ago

Please check it out!

KronosRemote commented 5 years ago

This looks pretty much like the issues I'm having as well. As far as I can tell UXReader is not properly threadsafe, drawing is performed on CALayers on a separate thread (UXReader even introduces its own dispatch queue) but references to the pdf document object and other stuff are handed down the chain and used from everywhere, leading to crashes. In my case I'm having the issues if I change the pdf document quickly, so the previous document is replaced while the drawing functions are still accessing it. Correct me if I'm wrong but this is what I've found so far. Haven't found a fix for it yet...