我试着用NSZombie调试"exc_bad_access“。这些错误来自sqlite3。我已经在xCode / editScheme/ Diagnostics中启用了僵尸对象。使用Instruments (僵尸)运行应用程序时会在控制台框架中显示此消息:
(1330,0x2581000) malloc: *** error for object 0x4c3ea00: non-page-aligned, non-allocated pointer being freed
*** set a breakpoint in malloc_error_break to debug
<End of Run>我的问题是如何找到导致这种情况的对象(此处: 0x4c3ea00)?如果您知道使用NSZombie的其他方法,请让我知道。谢谢
发布于 2014-12-18 22:50:59
YOu可以通过编辑Xcode中的方案来启用NSZombie。您还可以通过Xcode添加异常断点。请参阅图片以查找添加异常断点的位置。

发布于 2014-12-18 23:00:04
消息会告诉你。
转到断点并在malloc_error_break上添加一个符号断点。
当断点触发时,导致错误的代码将位于堆栈跟踪中。
https://stackoverflow.com/questions/27548995
复制相似问题