Вот стек вызовов из отчета о сбое пользователя :
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 com.growl.GrowlSafari 0x179d383c writeWithFormat + 25
1 com.growl.GrowlSafari 0x179d388e writeWithFormat + 107
2 com.growl.GrowlSafari 0x179d388e writeWithFormat + 107
3 com.growl.GrowlSafari 0x179d388e writeWithFormat + 107
4 com.growl.GrowlSafari 0x179d388e writeWithFormat + 107
5 com.growl.GrowlSafari 0x179d388e writeWithFormat + 107
Трассировка обрезается в кадре 511.
Вот writeWithFormat
:
int writeWithFormat(FILE *file, NSString *format, ...) {
va_list args;
va_start(args, format);
int written = writeWithFormatAndArgs(file, format, args);
va_end(args);
return written;
}
Как видите, он не вызывает сам себя.
Вот функция, которую он вызывает:
int writeWithFormatAndArgs(FILE *file, NSString *format, va_list args) {
return 0;
return fprintf(file, "%s\n", [[[[NSString alloc] initWithFormat:format arguments:args] autorelease] UTF8String]);
}
(Как вы можете догадаться, это код регистрацииэто деактивировано.)
Итак, как этот код приводит к трассировке стека?
Разборка с использованием otx:
_writeWithFormatAndArgs:
+0 00000f68 55 pushl %ebp
+1 00000f69 89e5 movl %esp,%ebp
+3 00000f6b 31c0 xorl %eax,%eax
+5 00000f6d c9 leave
+6 00000f6e c3 ret
_writeWithFormat:
+0 00001823 55 pushl %ebp
+1 00001824 89e5 movl %esp,%ebp
+3 00001826 83ec10 subl $0x10,%esp
+6 00001829 31c0 xorl %eax,%eax
+8 0000182b c9 leave
+9 0000182c c3 ret