gpt4 book ai didi

objective-c - NSException 调用堆栈符号

转载 作者:搜寻专家 更新时间:2023-10-30 20:26:40 25 4
gpt4 key购买 nike

当发生异常时,有这样的堆栈跟踪:

2 CoreFoundation 0x013bd1cc -[__NSArrayI objectAtIndex:] + 236
3 –ò–°–≠–î 0x0000ac76 -[ContentButton handleGesture:] + 326
4 UIKit 0x00de24f2 -[UIGestureRecognizer _updateGestureWithEvent:] + 730
...

当我尝试在 handleGesture: 方法的自定义类 ContentButton 中的 NSArray 中获取 objectAtIndex: 时,我发现发生了异常。

但是消息后面的数字是什么意思(比如 +236)?

在 java 堆栈跟踪中,这意味着发生异常的行号(据我所知)。但是消息 [__NSArrayI objectAtIndex:] 在第 47 行(不是 236)发送。

非常感谢。

最佳答案

WWDC 2010 上有一段关于理解崩溃报告的精彩视频。

You can find it here (需要登录 Apple Developer)

关于objective-c - NSException 调用堆栈符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7467185/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com