iOS 16 libobjc.A.dylib objc_release Crash

Hardware Model: iPhone12,8 Code Type: ARM-64 Parent Process: [1]

Date/Time: 2023-05-14T09:24:05Z OS Version: iPhone OS 16.3.1 (20D67) Report Version: 104

Exception Type: SIGSEGV Exception Codes: SEGV_ACCERR at 0xd665cce30 Crashed Thread: 2

Thread 2 Crashed:
0   libobjc.A.dylib                      0x00000001860db554 objc_release + 16
1   libsystem_blocks.dylib               0x00000001db1c9124 _call_dispose_helpers_excp + 48
2   libsystem_blocks.dylib               0x00000001db1c8d54 _Block_release + 248
3   libdispatch.dylib                    0x000000019456cf88 _dispatch_client_callout + 16
4   libdispatch.dylib                    0x0000000194574640 _dispatch_lane_serial_drain + 668
5   libdispatch.dylib                    0x000000019457518c _dispatch_lane_invoke + 380
6   libdispatch.dylib                    0x000000019457fe10 _dispatch_workloop_worker_thread + 648
7   libsystem_pthread.dylib              0x00000001db1ccdf8 _pthread_wqthread + 284
8   libsystem_pthread.dylib              0x00000001db1ccb98 start_wqthread + 4

Replies

It’s hard to be 100% sure — this crash report is from a third-party crasher report and I don’t trust those to speak my age [1] — but this is very likely to be a memory corruption problem. Your app is crashing with a memory access exception with this backtrace:

Thread 2 Crashed:
0   libobjc.A.dylib         … objc_release + 16
1   libsystem_blocks.dylib  … _call_dispose_helpers_excp + 48
2   libsystem_blocks.dylib  … _Block_release + 248
3   libdispatch.dylib       … _dispatch_client_callout + 16
4   libdispatch.dylib       … _dispatch_lane_serial_drain + 668
5   libdispatch.dylib       … _dispatch_lane_invoke + 380
6   libdispatch.dylib       … _dispatch_workloop_worker_thread + 648
7   libsystem_pthread.dylib … _pthread_wqthread + 284
8   libsystem_pthread.dylib … start_wqthread + 4

This is a Dispatch worker thread. It’s just finished running a block on a queue and is now releasing that block, and that release has triggered the memory access exception.

In cases like this I recommend that you apply the standard memory debugging tools to see if that helps make the issue more reproducible.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] That, btw, is a HHGTTG quote but, surprisingly, not one with a convenient explanation that I can link to. Anyway, if you’re curious as to why I say this, see Implementing Your Own Crash Reporter.