不调试时,iOS应用程序崩溃EXC_BAD_ACCESS(电缆断开连接)

时间:2015-01-13 14:17:41

标签: ios objective-c

我试图调试一个只在未连接调试电缆时执行特定操作时崩溃的应用程序。生成的崩溃日志仅通过int main的Apple类提供堆栈跟踪。我该如何更好地调试?

我从xcode构建并运行应用程序。然后我杀了应用程序并断开电缆。当我再次启动应用程序并执行操作时,应用程序崩溃。

生成的异常是EXC_BAD_ACCESS

我已经阅读了一个可能相关的问题来启用编译器优化,但我没有在崩溃之间重新编译我的应用程序。

iOS app crash only when not debugging

Incident Identifier: F76048C0-A734-4C6C-A735-0EDD5C29A572
CrashReporter Key:   b2e2d243e5e9aa3a220c93d2d9ef57c03fcf7067
Hardware Model:      iPad2,7
Process:             bott2014 [1086]
Path:                /var/mobile/Applications/F9C9A611-D256-4A98-92F9-B340BFF8504B/bott2014.app/bott2014
Identifier:          --snip--
Version:             14092402 (2.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2015-01-12 15:54:30.507 +0100
OS Version:          iOS 7.1 (11D167)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x426c0004
Triggered by Thread:  0

Thread 0 Crashed:
0   CoreFoundation                  0x2e266764 CFRelease + 20
1   CoreFoundation                  0x2e271e54 -[__NSArrayM dealloc] + 152
2   libobjc.A.dylib                 0x3901bb66 objc_object::sidetable_release(bool) + 170
3   CoreData                        0x2e0d10ae -[NSSQLEntity dealloc] + 330
4   libobjc.A.dylib                 0x3901bb66 objc_object::sidetable_release(bool) + 170
5   CoreFoundation                  0x2e266978 CFRelease + 552
6   CoreFoundation                  0x2e271e54 -[__NSArrayM dealloc] + 152
7   libobjc.A.dylib                 0x3901bb66 objc_object::sidetable_release(bool) + 170
8   CoreData                        0x2e15c952 -[NSSQLModel dealloc] + 302
9   libobjc.A.dylib                 0x3901bb66 objc_object::sidetable_release(bool) + 170
10  CoreData                        0x2e13ed74 -[NSSQLCore dealloc] + 188
11  libobjc.A.dylib                 0x3901bb66 objc_object::sidetable_release(bool) + 170
12  CoreFoundation                  0x2e266978 CFRelease + 552
13  CoreFoundation                  0x2e26e504 -[__NSArrayI dealloc] + 60
14  libobjc.A.dylib                 0x3901bb66 objc_object::sidetable_release(bool) + 170
15  libobjc.A.dylib                 0x3901c0d2 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 354
16  CoreFoundation                  0x2e269ca4 _CFAutoreleasePoolPop + 12
17  UIKit                           0x30b4a5c4 _wrapRunLoopWithAutoreleasePoolHandler + 32
18  CoreFoundation                  0x2e3012a2 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
19  CoreFoundation                  0x2e2fec44 __CFRunLoopDoObservers + 280
20  CoreFoundation                  0x2e2fef86 __CFRunLoopRun + 726
21  CoreFoundation                  0x2e269f4a CFRunLoopRunSpecific + 518
22  CoreFoundation                  0x2e269d2e CFRunLoopRunInMode + 102
23  GraphicsServices                0x3319c65e GSEventRunModal + 134
24  UIKit                           0x30bb5168 UIApplicationMain + 1132
25  bott2014                        0x0009fffc 0x13000 + 577532
26  libdyld.dylib                   0x39519ab4 start + 0

Thread 1:
0   libsystem_kernel.dylib          0x395bc808 kevent64 + 24
1   libdispatch.dylib               0x394fe078 _dispatch_mgr_invoke + 228
2   libdispatch.dylib               0x394fddfe _dispatch_mgr_thread$VARIANT$mp + 34

Thread 2:
0   libsystem_kernel.dylib          0x395cfc70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x39636bda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x39636a94 start_wqthread + 4

Thread 3:
0   libsystem_kernel.dylib          0x395cfc70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x39636bda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x39636a94 start_wqthread + 4

Thread 4 name:  com.apple.NSURLConnectionLoader
Thread 4:
0   libsystem_kernel.dylib          0x395bca58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x395bc854 mach_msg + 44
2   CoreFoundation                  0x2e300896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2e2fefbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2e269f4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2e269d2e CFRunLoopRunInMode + 102
6   Foundation                      0x2eca9082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7   Foundation                      0x2ed1ea5a __NSThread__main__ + 1058
8   libsystem_pthread.dylib         0x39638916 _pthread_body + 138
9   libsystem_pthread.dylib         0x39638886 _pthread_start + 98
10  libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 5 name:  AFNetworking
Thread 5:
0   libsystem_kernel.dylib          0x395bca58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x395bc854 mach_msg + 44
2   CoreFoundation                  0x2e300896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2e2fefbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2e269f4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2e269d2e CFRunLoopRunInMode + 102
6   Foundation                      0x2ec5c1e6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7   Foundation                      0x2ecad09c -[NSRunLoop(NSRunLoop) run] + 76
8   bott2014                        0x00036a4c 0x13000 + 145996
9   Foundation                      0x2ed1ea5a __NSThread__main__ + 1058
10  libsystem_pthread.dylib         0x39638916 _pthread_body + 138
11  libsystem_pthread.dylib         0x39638886 _pthread_start + 98
12  libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 6 name:  com.apple.CFSocket.private
Thread 6:
0   libsystem_kernel.dylib          0x395cf434 __select + 20
1   CoreFoundation                  0x2e304758 __CFSocketManager + 480
2   libsystem_pthread.dylib         0x39638916 _pthread_body + 138
3   libsystem_pthread.dylib         0x39638886 _pthread_start + 98
4   libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 7:
0   libsystem_kernel.dylib          0x395bca58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x395bc854 mach_msg + 44
2   CoreFoundation                  0x2e300896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2e2fefbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2e269f4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2e269d2e CFRunLoopRunInMode + 102
6   libAVFAudio.dylib               0x2d2e144c GenericRunLoopThread::Entry(void*) + 124
7   libAVFAudio.dylib               0x2d2d57bc CAPThread::Entry(CAPThread*) + 176
8   libsystem_pthread.dylib         0x39638916 _pthread_body + 138
9   libsystem_pthread.dylib         0x39638886 _pthread_start + 98
10  libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 8 name:  com.apple.coremedia.player.async
Thread 8:
0   libsystem_kernel.dylib          0x395bcaa8 semaphore_wait_trap + 8
1   libdispatch.dylib               0x394fc23c _dispatch_semaphore_wait_slow + 172
2   MediaToolbox                    0x2f785ab4 fpa_AsyncMovieControlThread + 1752
3   CoreMedia                       0x2e8981e0 figThreadMain + 192
4   libsystem_pthread.dylib         0x39638916 _pthread_body + 138
5   libsystem_pthread.dylib         0x39638886 _pthread_start + 98
6   libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 9:
0   libsystem_kernel.dylib          0x395bca58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x395bc854 mach_msg + 44
2   CoreFoundation                  0x2e300896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2e2fefbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2e269f4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2e269d2e CFRunLoopRunInMode + 102
6   AudioToolbox                    0x2dc3f874 GenericRunLoopThread::Entry(void*) + 124
7   AudioToolbox                    0x2dc25fc0 CAPThread::Entry(CAPThread*) + 208
8   libsystem_pthread.dylib         0x39638916 _pthread_body + 138
9   libsystem_pthread.dylib         0x39638886 _pthread_start + 98
10  libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 10 name:  WebThread
Thread 10:
0   libsystem_kernel.dylib          0x395bca58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x395bc854 mach_msg + 44
2   CoreFoundation                  0x2e300896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2e2fefbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2e269f4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2e269d2e CFRunLoopRunInMode + 102
6   WebCore                         0x367f738e RunWebThread(void*) + 414
7   libsystem_pthread.dylib         0x39638916 _pthread_body + 138
8   libsystem_pthread.dylib         0x39638886 _pthread_start + 98
9   libsystem_pthread.dylib         0x39636aa0 thread_start + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x426c0000    r1: 0xfffffffe      r2: 0xffffffff      r3: 0xffffffff
    r4: 0x00000001    r5: 0x00000001      r6: 0x426c0000      r7: 0x27def8d0
    r8: 0x426c0000    r9: 0x16bc4830     r10: 0x397ea0fc     r11: 0x165c1e00
    ip: 0x2e271dbd    sp: 0x27def890      lr: 0x2e271e59      pc: 0x2e266764
  cpsr: 0x20000030

Binary Images:
-- snipped binary images list

0 个答案:

没有答案