【问题标题】:iPhone Crash log - Is the method name always correct?iPhone 崩溃日志 - 方法名称是否始终正确?
【发布时间】:2011-01-24 11:29:19
【问题描述】:

这是我感兴趣的崩溃日志部分:

1   TEST_iPhone_App  0x00043ff2 -[TSClassName methodName] (TSClassName.m:86)

免得说方法看起来像这样:

- (void) methodName {
    // Some code...
    [self otherMethod];   // This is line #86
    // Some more code...
}

- (void) otherMethod {
    // Dubious code... could the crash be here?
}

我的问题是,崩溃日志是否可能引用otherMethod?也许otherMethod被内联了,它无法区分这两种方法之间的区别,或者绝对参考methodName中的代码

编辑:我查看了第 86 行,它是对 otherMethod 的调用。这是否意味着实例被另一个线程释放,因此消息self 导致错误?或者错误仍然存​​在于otherMethod

【问题讨论】:

    标签: iphone crash crash-reports


    【解决方案1】:

    我当然体验过在调试器中堆栈跟踪的第一行显示实际发生错误的方法的调用方法。但是,如果是这种情况,在您的示例行中 86methodName 将是右括号。

    【讨论】:

    • 澄清一下,错误出在调用methodName 的方法中,前提是.m 文件的第86 行是}?
    • @Robert 我的意思是,在您的示例中,它是 methodName 的第 86 行,而不是 otherMethod 的第 86 行。 :)
    猜你喜欢
    • 1970-01-01
    • 2011-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-09
    • 1970-01-01
    相关资源
    最近更新 更多