我的 iPad 应用程序最近在 iOS 模拟器中运行时收到了神秘的 SIGKILL 信号。它似乎在应用程序启动后 2 分钟内发生,但并非每次都发生。
这个回溯是否表明了什么,或者我应该尝试删除一些东西直到找到罪魁祸首?
可能涉及一些组件;一个例子是我最近集成了 Crashlytics。另一个例子是我使用 CLGeocoder 在 MKMapView 上绘制位置,这可以解释为什么问题发生在启动后的某个未确定点(以及 MapKit 出现在其中一个线程中的原因)。但是如果没有从回溯或日志中获得更清晰的指示,我就在黑暗中拍摄。
Xcode 4.3.2;针对 iOS 5。
* thread #1: tid = 0x1f03, 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGKILL
frame #0: 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x9c2c41f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x0178110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x016e4550 CoreFoundation`__CFRunLoopRun + 1312
frame #4: 0x016e3d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x016e3c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x015af7d8 GraphicsServices`GSEventRunModal + 190
frame #7: 0x015af88a GraphicsServices`GSEventRun + 103
frame #8: 0x00394626 UIKit`UIApplicationMain + 1163
frame #9: 0x00001d4d Tablecloth`main + 141 at main.m:16
frame #10: 0x00001cb5 Tablecloth`start + 53
thread #3: tid = 0x2403, 0x9c2c790a libsystem_kernel.dylib`kevent + 10
frame #0: 0x9c2c790a libsystem_kernel.dylib`kevent + 10
frame #1: 0x020b9372 libdispatch.dylib`_dispatch_mgr_invoke + 918
frame #2: 0x020b7be1 libdispatch.dylib`_dispatch_mgr_thread + 53
thread #5: tid = 0x2603, 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x9c2c41f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x0178110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x016e45d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x016e3d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x016e3c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x03ede420 WebCore`_ZL12RunWebThreadPv + 560
frame #7: 0x93ebced9 libsystem_c.dylib`_pthread_start + 335
thread #6: tid = 0x2703, 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x9c2c41f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x0178110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x016e45d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x016e3d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x016e3c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x00d94e30 Foundation`+[NSURLConnection(Loader) _resourceLoadLoop:] + 398
frame #7: 0x00ca64d6 Foundation`-[NSThread main] + 76
frame #8: 0x00ca6447 Foundation`__NSThread__main__ + 1258
frame #9: 0x93ebced9 libsystem_c.dylib`_pthread_start + 335
thread #7: tid = 0x2803, 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #0: 0x9c2c4c22 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x9c2c41f6 libsystem_kernel.dylib`mach_msg + 70
frame #2: 0x0178110a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x016e45d5 CoreFoundation`__CFRunLoopRun + 1445
frame #4: 0x016e3d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x016e3c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x0012286b MapKit`MKNormalizedPointForLayer + 30057
frame #7: 0x00ca64d6 Foundation`-[NSThread main] + 76
frame #8: 0x00ca6447 Foundation`__NSThread__main__ + 1258
frame #9: 0x93ebced9 libsystem_c.dylib`_pthread_start + 335
thread #8: tid = 0x2903, 0x9c2c6b42 libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
frame #0: 0x9c2c6b42 libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
frame #1: 0x017157cb CoreFoundation`__CFSocketManager + 939
frame #2: 0x93ebced9 libsystem_c.dylib`_pthread_start + 335
thread #9: tid = 0x2a03, 0x9c2c702e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x9c2c702e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x93ebeccf libsystem_c.dylib`_pthread_wqthread + 773
编辑:Crashlytics 支持团队帮助我调试了这个,似乎解决它的方法是使用模拟器应用程序中的“重置内容和设置...”菜单项。目前尚不清楚为什么会发生这种情况,但我不再遇到调试中断。