iOS app crash only if run from instrument (Automation)

2


My app do not crash on device. No leaks no memory warning. I was living happily. But recently I was doing some UI testing with Instrument(Automation). Boom Boom. App crashes after using it like 8 min. Looping around like 30 times. And it keep crashing but after different durations but all at same step. Again no leaks no memory warning. Again it do not crash on device(without instrument) doesn't matter how long use my app.

+ Every times it crashes after I pop a specific ViewController. And that view controller is loaded with stuffs (image view, playing and recording audio, take photo from album and camera) Here is the device log.

Any kind of help is highly appreciated.

Incident Identifier: 
CrashReporter Key:   
Hardware Model:      iPhone5,2
Process:         My App [15196]
Path:            
Identifier:      My App
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2013-08-16 12:48:10.814 +0200
OS Version:      iOS 6.1.3 (10B329)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x1208b319
Crashed Thread:  6

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x39be3e30 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39be3fd0 mach_msg + 48
2   CoreFoundation                  0x319da2b6 __CFRunLoopServiceMachPort + 126
3   CoreFoundation                  0x319d8fd6 __CFRunLoopRun + 814
4   CoreFoundation                  0x3194c238 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x3194c0c4 CFRunLoopRunInMode + 100
6   GraphicsServices                0x3552b336 GSEventRunModal + 70
7   UIKit                           0x338682b4 UIApplicationMain + 1116
8   MyApp                       0x0000531e 0x3000 + 8990
9   MyApp                       0x000052d4 0x3000 + 8916

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x39be45d0 kevent64 + 24
1   libdispatch.dylib               0x39b1fd22 _dispatch_mgr_invoke + 806
2   libdispatch.dylib               0x39b1b374 _dispatch_mgr_thread + 32

Thread 2 name:  WebThread
Thread 2:
0   libsystem_kernel.dylib          0x39be3e30 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39be3fd0 mach_msg + 48
2   CoreFoundation                  0x319da2b6 __CFRunLoopServiceMachPort + 126
3   CoreFoundation                  0x319d902c __CFRunLoopRun + 900
4   CoreFoundation                  0x3194c238 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x3194c0c4 CFRunLoopRunInMode + 100
6   WebCore                         0x37954390 RunWebThread(void*) + 440
7   libsystem_c.dylib               0x39b4d0de _pthread_start + 306
8   libsystem_c.dylib               0x39b4cfa4 thread_start + 4

Thread 3:
0   libsystem_kernel.dylib          0x39be3e30 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39be3fd0 mach_msg + 48
2   CoreFoundation                  0x319da2b6 __CFRunLoopServiceMachPort + 126
3   CoreFoundation                  0x319d902c __CFRunLoopRun + 900
4   CoreFoundation                  0x3194c238 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x3194c0c4 CFRunLoopRunInMode + 100
6   Foundation                      0x322705be -[NSRunLoop(NSRunLoop) runMode:beforeDate:]     + 250
7   MyApp                       0x00020b0a 0x3000 + 121610
8   Foundation                      0x3231d22c __NSThread__main__ + 968
9   libsystem_c.dylib               0x39b4d0de _pthread_start + 306
10  libsystem_c.dylib               0x39b4cfa4 thread_start + 4

Thread 4 name:  com.apple.NSURLConnectionLoader
Thread 4:
0   libsystem_kernel.dylib          0x39be3e30 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39be3fd0 mach_msg + 48
2   CoreFoundation                  0x319da2b6 __CFRunLoopServiceMachPort + 126
3   CoreFoundation                  0x319d902c __CFRunLoopRun + 900
4   CoreFoundation                  0x3194c238 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x3194c0c4 CFRunLoopRunInMode + 100
6   Foundation                      0x32299888 +[NSURLConnection(Loader)     _resourceLoadLoop:] + 304
7   Foundation                      0x3231d22c __NSThread__main__ + 968
8   libsystem_c.dylib               0x39b4d0de _pthread_start + 306
9   libsystem_c.dylib               0x39b4cfa4 thread_start + 4

Thread 5 name:  com.apple.CFSocket.private
Thread 5:
0   libsystem_kernel.dylib          0x39bf4594 __select + 20
1   CoreFoundation                  0x319de474 __CFSocketManager + 676
2   libsystem_c.dylib               0x39b4d0de _pthread_start + 306
3   libsystem_c.dylib               0x39b4cfa4 thread_start + 4

Thread 6 Crashed:
0   Foundation                      0x3231d692 __NSFinalizeThreadData + 122
1   CoreFoundation                  0x319d6212 __CFTSDFinalize + 62
2   libsystem_c.dylib               0x39b3feb8 _pthread_tsd_cleanup + 172
3   libsystem_c.dylib               0x39b3fb8e _pthread_exit + 114
4   libsystem_c.dylib               0x39b42ade _pthread_workq_return + 22
5   libsystem_c.dylib               0x39b427f2 _pthread_wqthread + 362
6   libsystem_c.dylib               0x39b42680 start_wqthread + 4

Thread 7:
0   libsystem_kernel.dylib          0x39bf4d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x39b42ad6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x39b427f2 _pthread_wqthread + 362
3   libsystem_c.dylib               0x39b42680 start_wqthread + 4

Thread 8:
0   libsystem_kernel.dylib          0x39bf4d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x39b42ad6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x39b427f2 _pthread_wqthread + 362
3   libsystem_c.dylib               0x39b42680 start_wqthread + 4

Thread 9 name:  AURemoteIO::IOThread
Thread 9:
0   libsystem_kernel.dylib          0x39be3e30 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39be3fd0 mach_msg + 48
2   AudioToolbox                    0x314cdc80 AURemoteIO::IOThread::Run() + 104
3   AudioToolbox                    0x314d000c AURemoteIO::IOThread::Entry(void*) + 4
4   AudioToolbox                    0x3140d9f2 CAPThread::Entry(CAPThread*) + 294
5   libsystem_c.dylib               0x39b4d0de _pthread_start + 306
6   libsystem_c.dylib               0x39b4cfa4 thread_start + 4

Thread 6 crashed with ARM Thread State (32-bit):
r0: 0x0010f522    r1: 0x39700941      r2: 0x39e57e88      r3: 0x1f8dc028
r4: 0x1208b2fd    r5: 0x0000001c      r6: 0x00000000      r7: 0x04af9f18
r8: 0x1f8dc028    r9: 0x007f8014     r10: 0x00000004     r11: 0x00000037
ip: 0x39d4db30    sp: 0x04af9d50      lr: 0x31946eb7      pc: 0x3231d692
cpsr: 0x20000030
objective-c
crash
automation
instruments
asked on Stack Overflow Aug 16, 2013 by Mohammad Faisal

1 Answer

1

EXC_BAD_ACCESS generally means that you are sending a objective c message to an invalid memory address. This happens because an object that you are using has been deallocated.

Use NSZombieEnabled to get more information. Start commenting out stuff. It's a memory issue, find the offending line of code.

answered on Stack Overflow Aug 16, 2013 by Woodstock

User contributions licensed under CC BY-SA 3.0