捉襟见肘之message sent to deallocated instance 0x16f62a70

时间:2023-03-08 20:02:34

出现的问题(真机ios8到ios9测试没有问题,真机ios7.1出现问题):

-- :::60b] *** -[ChatViewController scrollViewDidScroll:]: message sent to deallocated instance 0x16f62a70

首先,使用LLDB定位到由于内存操作不当引起的Crash(连接打不开,复制到浏览器中打开)

http://www.devdiv.com/lldb_message_sent_to_deallocated_instance_-blog-50901-50856.html

但是,发现我的模拟器不能重现问题,懊恼,在此时,我不得不重新学习调试

http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1

http://www.raywenderlich.com/10505/my-app-crashed-now-what-part-2

http://lldb.llvm.org/lldb-gdb.html

最后,问题定位到ScrollView设置的监听没有,在她当前ViewController中dealloc释放掉,代码写的不规范