iPhone Crash log - Is the method name always correct?
T开发者_运维问答his is the part of the crash log I am interested in:
1 TEST_iPhone_App 0x00043ff2 -[TSClassName methodName] (TSClassName.m:86)
Lest say the method looks like this:
- (void) methodName {
// Some code...
[self otherMethod]; // This is line #86
// Some more code...
}
- (void) otherMethod {
// Dubious code... could the crash be here?
}
My question is, could it be possible that the crash log refers to otherMethod
? Perhaps otherMethod
is put inline and it cant tell the difference between the two methods, or dose it definitely refer to the code in methodName
EDIT: I have had a look at line 86 and it is the call to otherMethod
. Does this mean that the instance got released by anouther thread, therefore messaging self
caused the error? Or could the error stil be in otherMethod
?
I have certainly experienced having the top line of the stack trace in the debugger display the calling method of the method where the error actually occurred. If that's the case, though, in your example line 86
of methodName
would be the closing bracket.
精彩评论