使用EXC_BAD_ACCESS
崩溃,堆栈符号如下所示:
po [NSThread callStackSymbols]
<_NSCallStackArray 0x608000052c60>(
0 ??? 0x00000001077e66cd 0x0 + 4420691661,
1 Flume-Debug 0x000000010003ee60 main + 0,
2 libobjc.A.dylib 0x00007fffdbde90fc _ZN12_GLOBAL__N_119AutoreleasePoolPage11tls_deallocEPv + 110,
3 libsystem_pthread.dylib 0x00007fffdc8eb50f _pthread_tsd_cleanup + 544,
4 libsystem_pthread.dylib 0x00007fffdc8eb249 _pthread_exit + 152,
5 libsystem_pthread.dylib 0x00007fffdc8e9ab6 pthread_sigmask + 0,
6 libsystem_pthread.dylib 0x00007fffdc8e99f7 _pthread_body + 0,
7 libsystem_pthread.dylib 0x00007fffdc8e91fd thread_start + 13
)
我的平台ix x86_64,所以我tried examining注册$rdi
和$rsi
没有太多运气:
po [(id)$rdi class]
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x40dedeadbec8).
The process has been returned to the state before expression evaluation.
这甚至可能吗?由于收件人的地址不正确,邮件已经被发送并导致崩溃。启用NSZombie
无效 - 代码崩溃在同一点没有其他有用信息。
查看和回溯,我应该问自己 - “哪个对象已添加到自动释放池但是手动/早期解除分配?”找出问题所在?