[PHImageManager requestImage] crash only iOS17.0

Unhandled error (NSCocoaErrorDomain, 134093) occurred during faulting and was thrown: Error Domain=NSCocoaErrorDomain Code=134093 "(null)"

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0xed5e0 __exceptionPreprocess
1  libobjc.A.dylib                0x2bc00 objc_exception_throw
2  CoreData                       0x129c8 _PFFaultHandlerLookupRow
3  CoreData                       0x11d60 _PF_FulfillDeferredFault
4  CoreData                       0x11c58 _pvfk_header
5  CoreData                       0x98e64 _sharedIMPL_pvfk_core_c
6  PhotoLibraryServices           0x6d8b0 -[PLInternalResource orientation]
7  PhotoLibraryServices           0x6d7bc -[PLInternalResource orientedWidth]
8  Photos                         0x147e74 ___presentFullResourceAtIndex_block_invoke
9  PhotoLibraryServices           0x174ee4 __53-[PLManagedObjectContext _directPerformBlockAndWait:]_block_invoke
10 CoreData                       0x208ec developerSubmittedBlockToNSManagedObjectContextPerform
11 libdispatch.dylib              0x4300 _dispatch_client_callout
12 libdispatch.dylib              0x136b4 _dispatch_lane_barrier_sync_invoke_and_complete
13 CoreData                       0x207f8 -[NSManagedObjectContext performBlockAndWait:]
14 PhotoLibraryServices           0x174e98 -[PLManagedObjectContext _directPerformBlockAndWait:]
15 PhotoLibraryServices           0x1738c8 -[PLManagedObjectContext performBlockAndWait:]
16 Photos                         0x147d30 _presentFullResourceAtIndex
17 Photos                         0x1476bc PHChooserListContinueEnumerating
18 Photos                         0x1445e0 -[PHImageResourceChooser presentNextQualifyingResource]
19 Photos                         0x2ea74 -[PHImageRequest startRequest]
20 Photos                         0x3f2c0 -[PHMediaRequestContext _registerAndStartRequests:]
21 Photos                         0x3e484 -[PHMediaRequestContext start]
22 Photos                         0x1f0710 -[PHImageManager runRequestWithContext:]
23 Photos                         0x1efdb0 -[PHImageManager requestImageDataAndOrientationForAsset:options:resultHandler:]
24 TeraBox                        0x2497f0c closure #1 in LocalPhotoLibManager.getDataFrom(_:_:) + 549 (LocalPhotoLibManager.swift:549)
25 TeraBox                        0x1835fc4 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
26 TeraBox                        0x1cb1288 +[DuboxOCException tryOC:catchException:] + 18 (DuboxOCException.m:18)
27 TeraBox                        0x249b4d4 specialized LocalPhotoLibManager.convert(with:_:) + 548 (LocalPhotoLibManager.swift:548)
28 TeraBox                        0x2493b24 closure #1 in closure #1 in closure #1 in LocalPhotoLibManager.scanAlbumUpdateLocalphotoTable(_:) + 173 (LocalPhotoLibManager.swift:173)
29 TeraBox                        0x1835fc4 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
30 libdispatch.dylib              0x26a8 _dispatch_call_block_and_release
31 libdispatch.dylib              0x4300 _dispatch_client_callout
32 libdispatch.dylib              0x744c _dispatch_queue_override_invoke
33 libdispatch.dylib              0x15be4 _dispatch_root_queue_drain
34 libdispatch.dylib              0x163ec _dispatch_worker_thread2
35 libsystem_pthread.dylib        0x1928 _pthread_wqthread
36 libsystem_pthread.dylib        0x1a04 start_wqthread

very similar another posts which crash on iOS 16 https://developer.apple.com/forums/thread/711466

same here

Hi guys, is there anyone knows how to reproduce this issue? or any progress about this issue?

@Adam_Wang @DodaTW @XJX @linziyi127 - Hi Folks, I am also getting a lot of crash logs for this, were any of you able to resolve this?

Hi. Was anyone able to reproduce this issue? @Adam_Wang @DodaTW @linziyi127 @abhay_shan

hi, we also encounter this issue since introducing PHImageManager, does anyone know how to reproduce it?

[PHImageManager requestImage] crash only iOS17.0
 
 
Q