I am analyzing the following stack traces in Crashlytics. I can not reproduce the problem on my phones. Below is a broken thread. Stack traces are slightly different between 64 and 32-bit CPUs.
The only interesting information is that there is another thread that resizes the image in the background (there is no manipulation of the user interface).
Since resizing the image can put some pressure on the phone’s memory, I suspect it is a memory error, but I did not expect to see a stack trace in this case, and I also don’t see a memory warning in the logs. Does this make sense? Or should I look for something completely different? Any suggestion would be helpful.
Do you have any idea what might be going on there?
On the iPhone 5S, iPad Air, the flow of crashes is as follows:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000001e256bec8
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x000000018f65a984 objc_object::release() + 8
1 libsystem_blocks.dylib 0x000000018fc5f908 _Block_release + 256
2 libdispatch.dylib 0x000000018fc17fd4 _dispatch_client_callout + 16
3 libdispatch.dylib 0x000000018fc1b1dc _dispatch_main_queue_callback_4CF + 336
4 CoreFoundation 0x00000001830f6ddc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
5 CoreFoundation 0x00000001830f511c __CFRunLoopRun + 1452
6 CoreFoundation 0x0000000183035dd0 CFRunLoopRunSpecific + 452
7 GraphicsServices 0x0000000188d1dc0c GSEventRunModal + 168
When executed in a thread with a high priority:
Thread : com.apple.root.high-priority
0 CoreGraphics 0x00000001831cef88 resample_byte_h_4cpp_armv7 + 420
1 CoreGraphics 0x00000001831cec74 resample_band + 1188
2 CoreGraphics 0x00000001831cd9b0 img_interpolate_read + 816
3 CoreGraphics 0x00000001831c94cc img_data_lock + 4440
4 CoreGraphics 0x00000001831c7944 CGSImageDataLock + 148
5 libRIP.A.dylib 0x0000000183573dec ripc_AcquireImage + 160
6 libRIP.A.dylib 0x0000000183573460 ripc_DrawImage + 624
7 CoreGraphics 0x00000001831c7674 CGContextDrawImage + 408
8 My App 0x00000001005105a4 -[UIImage(Async) scaleWithMaxSize:quality:scale:] (UIImage+Async.m:50)
9 My App 0x0000000100144244 __38-[ViewController viewDidAppear:]_block_invoke (ViewController.m:79)
10 libdispatch.dylib 0x000000018fc18014 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x000000018fc17fd4 _dispatch_client_callout + 16
12 libdispatch.dylib 0x000000018fc1f2b8 _dispatch_root_queue_drain + 556
13 libdispatch.dylib 0x000000018fc1f4fc _dispatch_worker_thread2 + 76
14 libsystem_pthread.dylib 0x000000018fdad6bc _pthread_wqthread + 356
On iPhone 5, 4S, 4 it's a little different
Crashed: com.apple.root.default-priority
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x2146c7cf
Thread : Crashed: com.apple.root.default-priority
0 libobjc.A.dylib 0x382af66a objc_release + 9
1 libsystem_blocks.dylib 0x387caac5 _Block_release + 216
2 libsystem_blocks.dylib 0x387caac5 _Block_release + 216
3 libxpc.dylib 0x388d9e71 _xpc_connection_call_reply + 32
4 libdispatch.dylib 0x3878fad7 _dispatch_root_queue_drain + 222
5 libdispatch.dylib 0x3878fd29 _dispatch_worker_thread2 + 56
6 libsystem_pthread.dylib 0x388cabd3 _pthread_wqthread + 298
also when executed in a thread with high priority:
Thread : com.apple.root.high-priority
0 CoreGraphics 0x2d6749e6 resample_byte_h_4cpp_armv7 + 117
1 ??? 0x00000002
2 CoreGraphics 0x2d67487d resample_band + 884
3 CoreGraphics 0x2d673a47 img_interpolate_read + 562
4 CoreGraphics 0x2d6701d3 img_data_lock + 4514
5 CoreGraphics 0x2d66e82d CGSImageDataLock + 88
6 libRIP.A.dylib 0x2d9bae67 ripc_AcquireImage + 98
7 libRIP.A.dylib 0x2d9ba20d ripc_DrawImage + 588
8 CoreGraphics 0x2d66e743 CGContextDelegateDrawImage + 50
9 CoreGraphics 0x2d66e5d9 CGContextDrawImage + 284
10 My App 0x0050f469 -[UIImage(Async) scaleWithMaxSize:quality:scale:] (UIImage+Async.m:50)
11 My App 0x00153fc7 __38-[ViewController viewDidAppear:]_block_invoke (ViewController.m:79)
12 libdispatch.dylib 0x38788833 _dispatch_call_block_and_release + 10
13 libdispatch.dylib 0x3878fad7 _dispatch_root_queue_drain + 222
14 libdispatch.dylib 0x3878fd29 _dispatch_worker_thread2 + 56
15 libsystem_pthread.dylib 0x388cabd3 _pthread_wqthread + 298