我今天在我正在开发的应用程序中遇到了一个奇怪的错误。
问题出在目录模块上。在每一页上方,有一个小的黑色区域,因为该页没有 100% 填满屏幕。点击该区域会产生崩溃。
我的崩溃日志如下所示:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2fd00fec
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 QuartzCore 0x35d812ac CA::Transaction::ensure_compat() + 0
1 QuartzCore 0x35da2648 CALayerMapGeometry_(CALayer*, CALayer*, void (*)(void*, CA::Mat4<double> const&), void (*)(void*, CA::Mat4<double> const&), void*) + 28
2 QuartzCore 0x35da25f8 -[CALayer convertPoint:fromLayer:] + 52
3 UIKit 0x32457018 -[UIView(Geometry) convertPoint:fromView:] + 68
4 UIKit 0x32456d40 -[UIView(Geometry) hitTest:withEvent:] + 172
5 UIKit 0x32456d50 -[UIView(Geometry) hitTest:withEvent:] + 188
(...)repeat the line above^ until it reached 511
511 UIKit 0x32456d50 -[UIView(Geometry) hitTest:withEvent:] + 188
更重要的是,xcode 很快就崩溃了。
调试导航器向我展示了更奇怪的东西:http://i43.tinypic.com/5txnq0.png,然后继续显示一个巨大的列表,就像这里:http://i41.tinypic.com/2h81ctw.png
我真的不知道从哪里开始...
目录模块很旧并且经过了很好的测试,以前从未发生过类似的事情。
我知道有很多变量和事情可能会影响应用程序,但如果有人能对此有所了解,我将不胜感激
正如我所说,我什至不知道如何开始处理这件事,它看起来不像你常规的“访问已释放的对象”、“内存泄漏”或我目前遇到的其他问题
最佳答案
您在某处有无限递归。您是否覆盖了-[UIView hitTest:withEvent:]
某处?那将是一个很好的起点。
关于objective-c - 与 CALayer 相关的奇怪崩溃日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8578622/