得到下面的崩溃报告,但不知道为什么会发生和如何解决它.
SIGABRT ABORT at 0x000000019aa3258c
libsystem_kernel.dylib
__pthread_kill
Thread : Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x000000019aa3258c __pthread_kill + 8 1 libsystem_pthread.dylib 0x000000019aab516c pthread_kill + 104 2 libsystem_c.dylib 0x000000019a9c6808 abort + 112 3 libc++abi.dylib 0x0000000199bec994 __cxa_bad_cast 4 libc++abi.dylib 0x0000000199c07184 std::__terminate(void (*)()) + 44 5 libc++abi.dylib 0x0000000199c06d3c __cxa_rethrow + 144 6 libobjc.A.dylib 0x000000019a3443a8 objc_exception_rethrow + 44 7 CoreFoundation 0x000000018dd3d74c CFRunLoopRunSpecific + 576 8 GraphicsServices 0x0000000193a21c0c GSEventRunModal + 168 9 UIKit 0x0000000190e6efdc UIApplicationMain + 1156 10 ************* 0x00000001000a5c80 main (main.m:17) 11 libdyld.dylib 0x000000019a937aa0 start + 4
解决方法
为了更容易地看到崩溃发生在哪里,请更改您的main.m文件,如下所示:
int main(int argc,char* argv[]) { @autoreleasepool { int returnValue; @try { returnValue = UIApplicationMain(argc,argv,nil,NSStringFromClass([MyAppDelegate class])); } @catch (NSException* exception) { LogError(@"Uncaught exception: %@,%@",[exception description],[exception callStackSymbols]); @throw exception; } return returnValue; } }
. . .或者像其他人所建议的那样,设置一个异常断点.
如果你的崩溃只发生在“野外”,你将不得不重新启动你的崩溃日志.像曲棍球或测试飞行这样的服务为您做这个,或者可以在this process之后手动完成.