App crashes while retaking a picture if user does not provide access to photo library.
| Originator: | mansi.ece06 | ||
| Number: | rdar://18810465 | Date Originated: | 10/20/21014 |
| Status: | Open | Resolved: | |
| Product: | Product Version: | ||
| Classification: | Reproducible: | Always |
Using the UIImagePickerController and setting allowsEditing to YES, crashes the app while retaking the picture if the user does not have access to photo library.
Crash report:
{
"MessageType" : "CrashReport",
"DeviceModel" : "iPad4,1",
"ExceptionReason" : "This application is not allowed to access Photo data.",
"NetworkStatus" : "WiFi",
"ExceptionUserInfo" : "",
"ExceptionName" : "NSObjectInaccessibleException",
"DeviceOS" : "iPhone OS Version 8.0.2 (Build 12A405)",
},
{
"StackTrace" : [
"#0 CoreFoundation 0X2B501E3F <redacted>()",
"#1 libobjc.A.dylib 0X38E7AC8B objc_exception_throw()",
"#2 PhotoLibraryServices 0X33F86E2B -[PLPhotoLibrary initWithTransientContext:name:]",
"#3 Photos 0X2E16111B <redacted>()",
"#4 libdispatch.dylib 0X393DA8B7 <redacted>()",
"#5 libdispatch.dylib 0X393DB4FB dispatch_once_f()",
"#6 Photos 0X2E1610D7 -[PHPhotoLibrary photoLibrary]",
"#7 Photos 0X2E141D81 -[PHCoreImageManager _cancelAndFlushPreheatItemsForAssets:domain:passingTestHandler:]",
"#8 Photos 0X2E155C7F -[PHImageManager dealloc]",
"#9 libobjc.A.dylib 0X38E94D5F <redacted>()",
"#10 PhotoLibrary 0X33EAE963 -[PLPhotoTileViewController dealloc]",
"#11 libsystem_blocks.dylib 0X39415AE1 _Block_release()",
"#12 libobjc.A.dylib 0X38E951A9 <redacted>()",
"#13 CoreFoundation 0X2B4143A9 _CFAutoreleasePoolPop()",
"#14 UIKit 0X2E995CBF <redacted>()",
"#15 CoreFoundation 0X2B4C85CD <redacted>()",
"#16 CoreFoundation 0X2B4C5C8B <redacted>()",
"#17 CoreFoundation 0X2B4C6093 <redacted>()",
"#18 CoreFoundation 0X2B414621 CFRunLoopRunSpecific()",
"#19 CoreFoundation 0X2B414433 CFRunLoopRunInMode()",
"#20 GraphicsServices 0X3275A0A9 GSEventRunModal()",
"#21 UIKit 0X2E9FF359 UIApplicationMain()",
"#22 SampleApp 0X000FB93B main()",
"#23 libdyld.dylib 0X393FAAAF <redacted>()"
]
}
Ways to produce the crash:
Way 1:
- Using camera, take a picture.
- Now zoom the pic and tap on retake on bottom left of the view.
- This will ask for the permission to access photo library.
- Select "Don't allow". App crashes.
Way 2:
- Using camera, take a picture.
- Now zoom the pic and tap on retake on bottom left of the view.
- This will ask you for the permission to access photo library.
- Select "Ok".
- Go to app settings -> privacy -> photos and set the photo library access to off for this app.
- Come back to the app, take a picture, zoom it and tap on retake. App crashes.
This crash was produced on iOS version 8.0.2 and version 8.1.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!