awkward / Tatsi

A drop-in replacement for UIImagePickerController with the ability to select multiple images and/or videos
MIT License
110 stars 30 forks source link

Tatsi crashes on `PHImageManager.requestImage` #35

Open Czajnikowski opened 4 years ago

Czajnikowski commented 4 years ago

I'm getting some crashes while using the library.

From the logs i see that users have it when displaying Tatsi (modally). Seems to be present only on iOS 13.3 by now. Variety of devices. Multiple com.apple.root.user-interactive-qos threads spawned, waiting to requestImage on libsystem_kernel.dylib __ulock_wait + 8. Can't reproduce locally.

Crashed: com.apple.root.user-interactive-qos
0  libobjc.A.dylib                0x19f438fb0 objc_msgSend + 16
1  CoreFoundation                 0x19f5f9970 -[__NSDictionaryM objectForKeyedSubscript:] + 184
2  PhotoLibraryServices           0x1aa1a4304 PLDataStoreForClassIDAndLibraryID + 476
3  PhotoLibraryServices           0x1aa67d464 +[PLManagedAsset(RM) enumerateImageRequestHintData:assetWidth:assetHeight:libraryID:startingOffset:block:] + 332
4  Photos                         0x1aafb1e54 _presentResourcesFromHintsUntilStop + 376
5  Photos                         0x1aafb35d0 PHChooserListContinueEnumerating + 68
6  Photos                         0x1aaffbc00 -[PHImageResourceChooser presentNextQualifyingResource] + 1476
7  Photos                         0x1aaea6028 -[PHImageRequest startRequest] + 2120
8  Photos                         0x1aaebd41c -[PHMediaRequestContext _registerAndStartRequests:] + 1176
9  Photos                         0x1aaebbf68 -[PHMediaRequestContext start] + 260
10 Photos                         0x1ab04cb3c -[PHImageManager runRequestWithContext:] + 324
11 Photos                         0x1ab048498 -[PHImageManager requestNewCGImageForAsset:targetSize:contentMode:options:resultHandler:] + 1132
12 Photos                         0x1ab04c468 -[PHImageManager requestImageForAsset:targetSize:contentMode:options:resultHandler:] + 200
13 Tatsi                          0x1037e34ac (Missing)
14 Tatsi                          0x1037e3ef4 (Missing)
15 libswiftObjectiveC.dylib       0x1d536ed9c autoreleasepool<A>(invoking:) + 64
16 Tatsi                          0x1037e314c (Missing)
17 Tatsi                          0x1037ef968 (Missing)
18 libdispatch.dylib              0x19f3c8b7c _dispatch_call_block_and_release + 32
19 libdispatch.dylib              0x19f3c9fd8 _dispatch_client_callout + 20
20 libdispatch.dylib              0x19f3d8cfc _dispatch_root_queue_drain + 644
21 libdispatch.dylib              0x19f3d9384 _dispatch_worker_thread2 + 120
22 libsystem_pthread.dylib        0x19f42f690 _pthread_wqthread + 216
23 libsystem_pthread.dylib        0x19f4359e8 start_wqthread + 8
sadihakan commented 3 years ago

I'm getting same crashes

21 Tatsi                          0x105f0e6ec specialized AssetsGridViewController.done(_:) + 50 (PickerViewController.swift:50)
22 Tatsi                          0x105f091a8 @objc AssetsGridViewController.cancel(_:) + 4386148776