关于scrolleView 的[MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fc
来源:互联网 发布:excel表xy轴怎么填数据 编辑:程序博客网 时间:2024/05/01 19:50
在使用scrollView 滚动的代理方法时 有时候会遇到 message sent to deallocated instance 0x7fc....这样的。
1. 我们可以找到地址对应的错误代码行,如果在断点调试中没有找到那一行 可以通过以下方法试试。
遇到这样的 不经意崩溃 可以在editScheme 中Run 选项中的Diagnostics 中的 勾选上Enabled Zombie Objects (僵尸对象) 和logging 中的 Malloc Stack 和Distributed Objects 做好这些之后,再次去运行下 直到 crash,我们能看到类似这样的信息 [MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fcabe 。
这里我们 通过系统的 活动指示器 找到对应进程的PID 和之前的崩溃地址0x7fcabe
我们在终端 输入一下命令sudo malloc _history 对应的PID 对应的地址
例如: sudo malloc _history 50132 0x7fcabe
再去查看 出来的结果 找到对应的错误代码。。
2. 这样的崩溃还有一种方法 ,可能是因为 scrollView在滚动还没有结束的时候 就释放了
可以在 dealloc中将scrollview的代理置空。
- (void)dealloc
{
scrollview.delegate = nil;
}
到此不知道 问题是否能得到解决呢。
0 0
- 关于scrolleView 的[MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fc
- ios -[MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fc0f6f2
- iOS [MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance
- [****ViewController scrollViewDidScroll:]: message sent to deallocated instance 0x12d6c22f0
- -[xxxViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fc04
- message sent to deallocated instance 的解决办法
- message sent to deallocated instance 0x100202dc0
- message sent to deallocated instance 0x154eec600
- message sent to deallocated instance 0x7f9a6d85dca0 错误的排查
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- message sent to deallocated instance
- c++11 std::bind使用
- 百度地图 Android SDK - 标注(Marker)的基本使用
- VMware中CentOS设置静态IP
- 浅谈算法和数据结构: 十一 哈希表
- 龙珠直播CTO谭振林:从0到500万用户背后的技术架构变迁
- 关于scrolleView 的[MTMeViewController scrollViewDidScroll:]: message sent to deallocated instance 0x7fc
- android中handler用法总结
- 带宏函数等excel解析方法
- c#.net网页跳转七种方法
- 分享一种最简单的Android打渠道包的方法
- LintCode:把排序数组转换为高度最小的二叉搜索树
- iOS GitHub上值得留意的第三方库
- 分布式搜索Elasticsearch——概述
- 设置启动图片