1and2papa / CTAssetsPickerController

iOS control that allows picking multiple photos and videos from user's photo library.
MIT License
2.15k stars 550 forks source link

Crash on memory warning if photos permission denied #216

Open Pollizzio opened 8 years ago

Pollizzio commented 8 years ago

To reproduce: deny permission to photo access, open the picker controller, simulate memory warning.

* Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'This application is not allowed to access Photo data.' * First throw call stack: ( 0 CoreFoundation 0x0275ea14 exceptionPreprocess + 180 1 libobjc.A.dylib 0x0169be02 objc_exception_throw + 50 2 PhotoLibraryServices 0x0cf3d12c -[PLPhotoLibrary initWithTransientContext:name:] + 1311 3 Photos 0x035bdd51 30-[PHPhotoLibrary photoLibrary]_block_invoke + 77 4 libdispatch.dylib 0x05d119cd _dispatch_client_callout + 14 5 libdispatch.dylib 0x05cfb281 dispatch_once_f + 157 6 libdispatch.dylib 0x05cfb1df dispatch_once + 31 7 Photos 0x035bdcff -[PHPhotoLibrary photoLibrary] + 144 8 Photos 0x0358c463 -[PHCoreImageManager _cancelAndFlushPreheatItemsForAssets:CPLPrefetching:domain:operation:passingTestHandler:didCancelHandler:] + 149 9 Photos 0x035aacce 22-[PHImageManager init]_block_invoke + 210 10 AssetsLibraryServices 0x0d483f8a pl_dispatch_source_set_event_handler_block_invoke + 27 11 libdispatch.dylib 0x05d119cd _dispatch_client_callout + 14 12 libdispatch.dylib 0x05d0344d _dispatch_source_latch_and_call + 1041 13 libdispatch.dylib 0x05cfe12a _dispatch_source_invoke + 942 14 libdispatch.dylib 0x05cf77bb _dispatch_root_queue_drain + 550 15 libdispatch.dylib 0x05cf758e _dispatch_worker_thread3 + 115 16 libsystem_pthread.dylib 0x0603825c _pthread_wqthread + 1050 17 libsystem_pthread.dylib 0x06035f56 start_wqthread + 34 ) libc++abi.dylib: terminating with uncaught exception of type NSException

1and2papa commented 8 years ago

@Pollizzio Thanks for your report. Currently I'm very busy on my personal matter so this issue might not be fixed within short period of time.

1and2papa commented 8 years ago

Sorry, development of this project is suspended. Please read the home page.