What caused this crash log in iPhone?

I’m somewhat stuck, and I need to solve it, because one of my applications shows random crashes that 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 suggest a suggestion on what could be the reason?

Thanks!

+4
source share
3 answers

It looks like you have a timer shooting and trying to send a message to an object that has been deleted.

+6
source

Keywords: Exception Type: EXC_BAD_ACCESS (SIGBUS)

This happens when you try to access an object that was previously released. Since you are trying to access the object in a timer callback, what could happen is that while the timer is responsible for the object, the object in question has been freed.

You can track an object by specifying an NSZombie environment variable .

+2
source

When creating NSTimer, it is imperative that you hold onto ref and then invalidate it if the called object goes away. For instance:

 [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 should:

 [self.bugZapTimer invalidate]; self.bugZapTimer = nil; 
+1
source

All Articles