问题
"Just minding my own business, iOS app running in the simulator. Not doing anything terribly interesting ... just moving between view controllers ... and then a pause ... and KABLAMMO!"
I immediately looked at backtraces for all threads (see below), but I'm not seeing anything particularly eventful:
(gdb) t a a bt
Thread 10 (process 55348):
#0 0x9046e02e in __workq_kernreturn ()
#1 0x9ac98ccf in _pthread_wqthread ()
#2 0x9ac9a6fe in start_wqthread ()
Thread 9 (process 55348):
#0 0x9046bc22 in mach_msg_trap ()
#1 0x9046b1f6 in mach_msg ()
#2 0x0228ad86 in __CFRunLoopServiceMachPort ()
#3 0x021e7e74 in __CFRunLoopRun ()
#4 0x021e7840 in CFRunLoopRunSpecific ()
#5 0x021e7761 in CFRunLoopRunInMode ()
#6 0x016186cc in TileCachePrivate::runCacheThread ()
#7 0x01618702 in _runCacheThread ()
#8 0x9ac96ed9 in _pthread_start ()
#9 0x9ac9a6de in thread_start ()
Thread 7 (process 55348):
#0 0x9046db42 in select$DARWIN_EXTSN ()
#1 0x0221c2bc in __CFSocketManager ()
#2 0x9ac96ed9 in _pthread_start ()
#3 0x9ac9a6de in thread_start ()
Thread 6 (process 55348):
#0 0x9046bc22 in mach_msg_trap ()
#1 0x9046b1f6 in mach_msg ()
#2 0x0228ad86 in __CFRunLoopServiceMachPort ()
#3 0x021e7e74 in __CFRunLoopRun ()
#4 0x021e7840 in CFRunLoopRunSpecific ()
#5 0x021e7761 in CFRunLoopRunInMode ()
#6 0x0076a102 in +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] ()
#7 0x00734cf4 in -[NSThread main] ()
#8 0x00734c80 in __NSThread__main__ ()
#9 0x9ac96ed9 in _pthread_start ()
#10 0x9ac9a6de in thread_start ()
Thread 4 (process 55348):
#0 0x9046bc22 in mach_msg_trap ()
#1 0x9046b1f6 in mach_msg ()
#2 0x0228ad86 in __CFRunLoopServiceMachPort ()
#3 0x021e7e74 in __CFRunLoopRun ()
#4 0x021e7840 in CFRunLoopRunSpecific ()
#5 0x021e7761 in CFRunLoopRunInMode ()
#6 0x034ef903 in RunWebThread ()
#7 0x9ac96ed9 in _pthread_start ()
#8 0x9ac9a6de in thread_start ()
Thread 3 (process 55348):
#0 0x9046e90a in kevent ()
#1 0x01f32f36 in _dispatch_mgr_invoke ()
#2 0x01f33333 in _dispatch_queue_invoke ()
#3 0x01f33593 in _dispatch_worker_thread2 ()
#4 0x9ac98b24 in _pthread_wqthread ()
#5 0x9ac9a6fe in start_wqthread ()
Thread 1 (process 55348):
#0 0x9046bc22 in mach_msg_trap ()
#1 0x9046b1f6 in mach_msg ()
#2 0x0228ad86 in __CFRunLoopServiceMachPort ()
#3 0x021e7e74 in __CFRunLoopRun ()
#4 0x021e7840 in CFRunLoopRunSpecific ()
#5 0x021e7761 in CFRunLoopRunInMode ()
#6 0x025861c4 in GSEventRunModal ()
#7 0x02586289 in GSEventRun ()
#8 0x009d8c93 in UIApplicationMain ()
#9 0x0007682d in main (argc=1, argv=0xbffff510) at /path/to/app/source/Classes/main.m:14
(gdb)
(n.b.: In the Debug Navigator, Thread 7 is listed as com.apple.CFSocket.private, and Thread 4 is listed as WebThread.)
I suppose the OS killed my app off, but I'm not sure why.
Excessive memory use? Well, we're in the simulator (but, yes, I'm cautious with that already - no memory warnings spotted during debug either).
Blocking the main thread? Umm ... not that I'm aware of! The UI seemed responsive enough when it happened.
Anything interesting in the run log? Nope ... rather everyday stuff going on, but that's it. :\
Further insight and thoughts appreciated!
See this question for a similar (identical?) ish.
来源:https://stackoverflow.com/questions/10537525/ios-sigkill-using-ios-4-3-simulator-with-uninteresting-backtraces