“只关注我自己的业务,iOS应用程序在模拟器中运行。没有做任何非常有趣的事情......只是在视图控制器之间移动......然后暂停...和KABLAMMO!”
我立即查看所有线程的回溯(见下文),但我没有看到任何特别有意义的事情:
(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。:在Debug Navigator中,Thread 7列为com.apple.CFSocket.private,Thread 4列为WebThread。)
我想操作系统会关闭我的应用程序,但我不确定原因。
内存使用过多?好吧,我们在模拟器中(但是,是的,我已经很谨慎了 - 在调试期间没有发现内存警告)。
阻止主线程?嗯......不是我知道的!用户界面在发生时似乎足够响应。
运行日志中有什么有趣的东西?不是......而是日常生活中的事情,但就是这样。 :\
进一步的见解和想法赞赏!
请参阅this question了解类似的(相同的?)ish。