简体   繁体   English

是什么导致了这个iPhone崩溃日志?

[英]What caused this iPhone crash log?

Im somewhat stuck, and need to have this resolved because one of my apps is exhibiting random crashes which cannot always be reproduced. 我有点卡住,需要解决这个问题,因为我的一个应用程序出现了随机崩溃,无法永远复制。 This is one of the crash logs: 这是崩溃日志之一:

Incident Identifier: 59865612-9F00-44EA-9474-2BF607AD662E
CrashReporter Key:   bea17b7f4237e78a13ce60449d694621d0f16a44
Hardware Model:      iPhone2,1
Process:         APPNAME [82]
Path:            /var/mobile/Applications/ACE9A1A2-F1BE-43E0-9775-1291723D4C4A/APPNAME.app/APPNAME
Identifier:      APPNAME
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2011-05-21 19:10:27.893 +0100
OS Version:      iPhone OS 4.3.3 (8J2)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000009
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x33b24c98 objc_msgSend + 16
1   Foundation                      0x344507b4 __NSFireTimer + 112
2   CoreFoundation                  0x3039ca40 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
3   CoreFoundation                  0x3039eec4 __CFRunLoopDoTimer + 844
4   CoreFoundation                  0x3039f83e __CFRunLoopRun + 1082
5   CoreFoundation                  0x3032febc CFRunLoopRunSpecific + 224
6   CoreFoundation                  0x3032fdc4 CFRunLoopRunInMode + 52
7   GraphicsServices                0x3448e418 0x3448a000 + 17432
8   GraphicsServices                0x3448e4c4 0x3448a000 + 17604
9   UIKit                           0x33f3cd62 -[UIApplication _run] + 398
10  UIKit                           0x33f3a800 UIApplicationMain + 664
11  APPNAME                         0x00002d88 0x1000 + 7560
12  APPNAME                         0x00002d3c 0x1000 + 7484

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x36100fbc kevent + 24
1   libdispatch.dylib               0x33d0b032 _dispatch_mgr_invoke + 706
2   libdispatch.dylib               0x33d0c03a _dispatch_queue_invoke + 86
3   libdispatch.dylib               0x33d0b5ea _dispatch_worker_thread2 + 186
4   libsystem_c.dylib               0x33e0a58a _pthread_wqthread + 258
5   libsystem_c.dylib               0x33e0abbc start_wqthread + 0

Thread 2 name:  WebThread
Thread 2:
0   libsystem_kernel.dylib          0x360fdc00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x360fd758 mach_msg + 44
2   CoreFoundation                  0x3039d2b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x3039f562 __CFRunLoopRun + 350
4   CoreFoundation                  0x3032febc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x3032fdc4 CFRunLoopRunInMode + 52
6   WebCore                         0x34c2627e RunWebThread(void*) + 382
7   libsystem_c.dylib               0x33e0930a _pthread_start + 242
8   libsystem_c.dylib               0x33e0abb4 thread_start + 0

Thread 3:
0   libsystem_kernel.dylib          0x360fdc00 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x360fd758 mach_msg + 44
2   CoreFoundation                  0x3039d2b8 __CFRunLoopServiceMachPort + 88
3   CoreFoundation                  0x3039f562 __CFRunLoopRun + 350
4   CoreFoundation                  0x3032febc CFRunLoopRunSpecific + 224
5   CoreFoundation                  0x3032fdc4 CFRunLoopRunInMode + 52
6   Foundation                      0x343ea7f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7   Foundation                      0x343dd382 -[NSThread main] + 38
8   Foundation                      0x3444f5c6 __NSThread__main__ + 966
9   libsystem_c.dylib               0x33e0930a _pthread_start + 242
10  libsystem_c.dylib               0x33e0abb4 thread_start + 0

Thread 4 name:  com.apple.CFSocket.private
Thread 4:
0   libsystem_kernel.dylib          0x360ffc60 __select + 20
1   CoreFoundation                  0x303a28f2 __CFSocketManager + 582
2   libsystem_c.dylib               0x33e0930a _pthread_start + 242
3   libsystem_c.dylib               0x33e0abb4 thread_start + 0

Thread 5:
0   libsystem_kernel.dylib          0x361003ec __workq_kernreturn + 8
1   libsystem_c.dylib               0x33e0a6d8 _pthread_wqthread + 592
2   libsystem_c.dylib               0x33e0abbc start_wqthread + 0

Thread 6:
0   libsystem_kernel.dylib          0x361003ec __workq_kernreturn + 8
1   libsystem_c.dylib               0x33e0a6d8 _pthread_wqthread + 592
2   libsystem_c.dylib               0x33e0abbc start_wqthread + 0

Thread 7:
0   libsystem_kernel.dylib          0x361003ec __workq_kernreturn + 8
1   libsystem_c.dylib               0x33e0a6d8 _pthread_wqthread + 592
2   libsystem_c.dylib               0x33e0abbc start_wqthread + 0

Thread 8:
0   libsystem_kernel.dylib          0x361003ec __workq_kernreturn + 8
1   libsystem_c.dylib               0x33e0a6d8 _pthread_wqthread + 592
2   libsystem_c.dylib               0x33e0abbc start_wqthread + 0

Thread 0 crashed with ARM Thread State:
r0: 0x04246810    r1: 0x33738814      r2: 0x042b3704      r3: 0x00000000
r4: 0x00000001    r5: 0x00000001      r6: 0x00259330      r7: 0x2fdfeb30
r8: 0x002593d0    r9: 0x00000000     r10: 0x04241720     r11: 0x00000000
ip: 0x3fa3f4e8    sp: 0x2fdfea60      lr: 0x349077bb      pc: 0x33dfcc98
  cpsr: 0x280f0030

Can someone offer a suggestion as to what might be the cause ? 有人可以就可能的原因提出建议吗?

Thanks! 谢谢!

看起来你有一个计时器触发并试图向已被解除分类的对象发送消息。

Keyline here is: Exception Type: EXC_BAD_ACCESS (SIGBUS) 这里的Keyline是: Exception Type: EXC_BAD_ACCESS (SIGBUS)

It occurs, when you are trying to access an object that has been released earlier. 当您尝试访问先前已释放的对象时,会发生这种情况。 Since, you are trying to access an object in a timer's callback, what is possibly happening is that while the timer responds for an object, the object in question has been released. 因为,您正在尝试访问计时器回调中的对象,所以可能发生的是当计时器响应对象时,相关对象已被释放。

You can track the object by enabling the NSZombie environment variable . 您可以通过启用NSZombie环境变量来跟踪对象。

When you create a NSTimer it is critical that you hold on to the ref and then invalidate it if the object to be called goes away. 创建NSTimer时,如果要调用的对象消失,则必须保留ref,然后使其无效。 Like so: 像这样:

[self.bugZapTimer invalidate];
self.bugZapTimer = [NSTimer timerWithTimeInterval: 0.1
                                           target: self
                                         selector: @selector(bugZapTimer:)
                                         userInfo: NULL
                                          repeats: FALSE];
[[NSRunLoop currentRunLoop] addTimer:self.bugZapTimer forMode: NSDefaultRunLoopMode];

Then, in your dealloc method you must do: 然后,在您的dealloc方法中,您必须:

[self.bugZapTimer invalidate];
self.bugZapTimer = nil;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM