iOS 内存错误调试(EXC_BAD_ACCESS)
2016-10-14 17:02
295 查看
内存错误crash现场:
Thread堆栈:
有可能是访问被释放对象造成,根据现场并不能找到具体哪个对象出现内存错误。
1.开启僵尸对象调试
Edit Scheme->Debug->Diagnostics->Enable Zombie Objects
2.闪退后查看控制台,看输出应该是某个Button出错
3.由于新版xcode默认调试器为lldb,旧版本gdb调试器可以使用如下命令查看
(1)Profile your project
(2)Select Zombies from the list of instruments
(3)Make your app trigger the problem
(4)At this point you should be presented with the address that was already deallocated and you can explore it.
(5)定位问题
Thread堆栈:
有可能是访问被释放对象造成,根据现场并不能找到具体哪个对象出现内存错误。
1.开启僵尸对象调试
Edit Scheme->Debug->Diagnostics->Enable Zombie Objects
2.闪退后查看控制台,看输出应该是某个Button出错
2016-10-14 16:40:49.959 funmiosbr_ZQB[2761:388881] *** -[UIButton setHidden:]: message sent to deallocated instance 0x185942a0
3.由于新版xcode默认调试器为lldb,旧版本gdb调试器可以使用如下命令查看
(gdb) info malloc-history 0x185942a0
(1)Profile your project
(2)Select Zombies from the list of instruments
(3)Make your app trigger the problem
(4)At this point you should be presented with the address that was already deallocated and you can explore it.
(5)定位问题
相关文章推荐
- ios内存错误 exc_bad_access
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- EXC_BAD_ACCESS iOS内存错误
- ios CGImageRelease 出现 EXC_BAD_ACCESS的错误 ios特定形状剪裁图片 内存泄露
- iOS内存错误EXC_BAD_ACCESS的解决方法
- ios 调试技巧收藏 一 解决EXC_BAD_ACCESS错误的一种方法--NSZombieEnabled
- iOS内存错误EXC_BAD_ACCESS的解决方法
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- iOS内存错误EXC_BAD_ACCESS的解决办法(message sent to deallocated instance)
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- ios 调试技巧收藏 一 解决EXC_BAD_ACCESS错误的一种方法--NSZombieEnabled
- ios 调试技巧收藏 一 解决EXC_BAD_ACCESS错误的一种方法--NSZombieEnabled
- ios 解决bug(3)---iOS内存错误EXC_BAD_ACCESS的解决方法
- 【iOS沉思录】BAD_ACCESS内存错误调试
- iOS内存错误EXC_BAD_ACCESS的解决方法(message sent to deallocated instance)
- iOS内存错误EXC_BAD_ACCESS的解决方法
- iOS内存错误EXC_BAD_ACCESS的解决方法