we have encountered this crash too. from the sensors we could see the crash scenario is users choosing the photos from gallery. but we could not reproduce it either.
Crashed: com.apple.privacyaccounting.PAAccessLogger
0 libdispatch.dylib 0x194a8 dispatch_source_set_timer + 32
1 libdispatch.dylib 0x194a8 _dispatch_source_set_runloop_timer_4CF + 32
2 PrivacyAccounting 0xf1e8 -[PACoalescingIntervalTracker coalesce:] + 424
3 PrivacyAccounting 0x3d34 __22-[PAAccessLogger log:]_block_invoke + 360
4 libdispatch.dylib 0x13114 _dispatch_block_async_invoke2 + 148
5 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20
6 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain + 672
7 libdispatch.dylib 0xc214 _dispatch_lane_invoke + 436
8 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652
9 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288
10 libsystem_pthread.dylib 0xb98 start_wqthread + 8
com.apple.main-thread
0 libsystem_platform.dylib 0xbe0 __bzero + 64
1 libsystem_platform.dylib 0xbe0 _platform_bzero + 64
2 ImageIO 0x1ff8c PNGReadPlugin::copyImageBlockSetStandard(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1200
3 ImageIO 0x66dc4 PNGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 44
4 ImageIO 0x19f98 IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 228
5 ImageIO 0x15aa8 IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 744
6 ImageIO 0x1db4c IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 828
7 ImageIO 0x6f50 IIOImagePixelDataProvider::getBytesImageProvider(void*, unsigned long) + 500
8 ImageIO 0x89c28 AppleJPEGWritePlugin::writeOne(IIOImagePixelDataProvider*, IIODictionary*, IIODictionary*, unsigned int) + 1228
9 ImageIO 0x89198 AppleJPEGWritePlugin::writeAll() + 404
10 ImageIO 0x6eaa0 IIO_Writer_AppleJPEG::write(void*, void*) + 84
11 ImageIO 0x3187c IIOImageDestination::finalizeDestination() + 652
12 ImageIO 0x9978 CGImageDestinationFinalize + 132
13 UIKitCore 0x42db24 _UIImageJPEGRepresentation + 652
14 HLLDriver-SEA 0xb453a0 -[UIImage(HLL) base64StringWithQuality:] + 18 (UIImage+HLL.m:18)
15 HLLDriver-SEA 0xd3e7b4 LMDImagePickerController.imagePickerController(_:didFinishPickingMediaWithInfo:) + 94 (LMDImagePickerController.swift:94)
16 HLLDriver-SEA 0xd3eafc @objc LMDImagePickerController.imagePickerController(_:didFinishPickingMediaWithInfo:) + 5844112 (<compiler-generated>:5844112)
17 UIKitCore 0x77a684 -[UIImagePickerController _imagePickerDidCompleteWithInfo:] + 92
18 UIKitCore 0x77a034 __60-[UIImagePickerController didSelectMediaWithInfoDictionary:]_block_invoke + 44
19 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32
20 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20
21 libdispatch.dylib 0x127f4 _dispatch_main_queue_drain + 928
22 libdispatch.dylib 0x12444 _dispatch_main_queue_callback_4CF + 44
23 CoreFoundation 0x9aa08 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
24 CoreFoundation 0x7c368 __CFRunLoopRun + 2036
25 CoreFoundation 0x811e4 CFRunLoopRunSpecific + 612
26 GraphicsServices 0x1368 GSEventRunModal + 164
27 UIKitCore 0x3a2d88 -[UIApplication _run] + 888
28 UIKitCore 0x3a29ec UIApplicationMain + 340
29 HLLDriver-SEA 0x590c main + 36 (main.m:36)
30 ??? 0x1abfc9948 (Missing)
the related code is
public func imagePickerController(
_ picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]
) {
if let block = completeBlock {
block(picker, info)
} else {
if (info[.mediaType] as? String) == "public.image" {
let image = (info[.originalImage] as? UIImage)?.normalized()
let base64 =
image?
.base64String(withQuality: 1.0)
.replacingOccurrences(of: "\r\n", with: "") ?? ""
let js = "\(callBackName)('data:image/jpeg;base64,\(base64)');"
sourceController?.evaluateJavaScript(jsStr: js) { _, _ in
picker.dismiss(animated: true, completion: nil)
}
}
}