Code Bye

怎么样定位到这个bug的代码行

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x216fbcc2
Triggered by Thread:  0
Thread 0 Crashed:
0   libobjc.A.dylib                0x37f10626 objc_msgSend + 6
1   UIKit                          0x2ff8b74c -[UISearchBar _didMoveFromWindow:toWindow:] + 152
2   UIKit                          0x2fea9502 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 690
3   UIKit                          0x2fea9502 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 690
4   UIKit                          0x2fea9502 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 690
5   UIKit                          0x2fea9502 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 690
6   UIKit                          0x2fea9502 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 690
7   UIKit                          0x2fea8e6c __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 108
8   Foundation                     0x2dff3b28 -[NSISEngine withBehaviors:performModifications:] + 208
9   UIKit                          0x2fea8cee -[UIView(Hierarchy) _postMovedFromSuperview:] + 294
10  UIKit                          0x2feb5a6a -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1410
11  UIKit                          0x2feb54da -[UIView(Hierarchy) addSubview:] + 26
12  UIKit                          0x2ff96dd2 -[UITransitionView transition:fromView:toView:removeFromView:] + 974
13  UIKit                          0x2ffd6f5a -[UITransitionView transition:fromView:toView:] + 26
14  UIKit                          0x2ffd6f30 -[UITransitionView transition:toView:] + 100
15  UIKit                          0x2ffd6056 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1102
16  UIKit                          0x2ffd5bfa -[UITabBarController transitionFromViewController:toViewController:] + 34
17  UIKit                          0x2ffd5ad2 -[UITabBarController _setSelectedViewController:] + 254
18  UIKit                          0x3009fdf0 -[UITabBarController _tabBarItemClicked:] + 268
19  UIKit                          0x2fedf052 -[UIApplication sendAction:to:from:forEvent:] + 86
20  UIKit                          0x2fedeff2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
21  UIKit                          0x3009fca6 -[UITabBar _sendAction:withEvent:] + 366
22  UIKit                          0x2fedf052 -[UIApplication sendAction:to:from:forEvent:] + 86
23  UIKit                          0x2fedeff2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
24  UIKit                          0x2fedefcc -[UIControl sendAction:to:forEvent:] + 40
25  UIKit                          0x2feca732 -[UIControl _sendActionsForEvents:withEvent:] + 370
26  UIKit                          0x3009f9c6 -[UITabBar(Static) _buttonUp:] + 114
27  UIKit                          0x2fedf052 -[UIApplication sendAction:to:from:forEvent:] + 86
28  UIKit                          0x2fedeff2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
29  UIKit                          0x2fedefcc -[UIControl sendAction:to:forEvent:] + 40
30  UIKit                          0x2feca732 -[UIControl _sendActionsForEvents:withEvent:] + 370
31  UIKit                          0x2fedea4a -[UIControl touchesEnded:withEvent:] + 586
32  UIKit                          0x2fea1f2e _UIGestureRecognizerUpdate + 5518
33  CoreFoundation                 0x2d6592a2 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
34  CoreFoundation                 0x2d656c44 __CFRunLoopDoObservers + 280
35  CoreFoundation                 0x2d656f86 __CFRunLoopRun + 726
36  CoreFoundation                 0x2d5c1f0a CFRunLoopRunSpecific + 518
37  CoreFoundation                 0x2d5c1cee CFRunLoopRunInMode + 102
38  GraphicsServices               0x3251a65e GSEventRunModal + 134
39  UIKit                          0x2ff0d168 UIApplicationMain + 1132
40  eOral-iPhone                   0x0015d184 0x3a000 + 1192324
41  libdyld.dylib                  0x38413ab4 start + 0
Thread 1:
0   libsystem_kernel.dylib         0x384b6808 kevent64 + 24
1   libdispatch.dylib              0x383f8078 _dispatch_mgr_invoke + 228
2   libdispatch.dylib              0x383f7dfe _dispatch_mgr_thread$VARIANT$mp + 34
Thread 2:
0   libsystem_kernel.dylib         0x384b6a58 mach_msg_trap + 20
1   libsystem_kernel.dylib         0x384b6854 mach_msg + 44
2   CoreFoundation                 0x2d658896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                 0x2d656fbc __CFRunLoopRun + 780
4   CoreFoundation                 0x2d5c1f0a CFRunLoopRunSpecific + 518
5   CoreFoundation                 0x2d5c1cee CFRunLoopRunInMode + 102
6   Foundation                     0x2dfb41e6 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7   Foundation                     0x2e00509c -[NSRunLoop(NSRunLoop) run] + 76
8   eOral-iPhone                   0x003517f4 0x3a000 + 3241972
9   Foundation                     0x2e076a5a __NSThread__main__ + 1058
10  libsystem_pthread.dylib        0x38532916 _pthread_body + 138
11  libsystem_pthread.dylib        0x38532886 _pthread_start + 98
12  libsystem_pthread.dylib        0x38530aa0 thread_start + 4
Thread 3 name:  com.apple.NSURLConnectionLoader
Thread 3:
0   libsystem_kernel.dylib         0x384b6a58 mach_msg_trap + 20
1   libsystem_kernel.dylib         0x384b6854 mach_msg + 44
2   CoreFoundation                 0x2d658896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                 0x2d656fbc __CFRunLoopRun + 780
4   CoreFoundation                 0x2d5c1f0a CFRunLoopRunSpecific + 518
5   CoreFoundation                 0x2d5c1cee CFRunLoopRunInMode + 102
6   Foundation                     0x2e001082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7   Foundation                     0x2e076a5a __NSThread__main__ + 1058
8   libsystem_pthread.dylib        0x38532916 _pthread_body + 138
9   libsystem_pthread.dylib        0x38532886 _pthread_start + 98
10  libsystem_pthread.dylib        0x38530aa0 thread_start + 4
Thread 4:
0   libsystem_kernel.dylib         0x384c9c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib        0x38530bda _pthread_wqthread + 306
2   libsystem_pthread.dylib        0x38530a94 start_wqthread + 4
Thread 5:
0   libsystem_kernel.dylib         0x384c9c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib        0x38530bda _pthread_wqthread + 306
2   libsystem_pthread.dylib        0x38530a94 start_wqthread + 4
Thread 6:
0   libsystem_kernel.dylib         0x384b6a58 mach_msg_trap + 20
1   libsystem_kernel.dylib         0x384b6854 mach_msg + 44
2   CoreFoundation                 0x2d658896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                 0x2d656fbc __CFRunLoopRun + 780
4   CoreFoundation                 0x2d5c1f0a CFRunLoopRunSpecific + 518
5   CoreFoundation                 0x2d6059fe CFRunLoopRun + 94
6   CoreMotion                     0x2dc7f3a8 0x2dc46000 + 234408
7   libsystem_pthread.dylib        0x38532916 _pthread_body + 138
8   libsystem_pthread.dylib        0x38532886 _pthread_start + 98
9   libsystem_pthread.dylib        0x38530aa0 thread_start + 4
Thread 7:
0   libsystem_kernel.dylib         0x384c9c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib        0x38530bda _pthread_wqthread + 306
2   libsystem_pthread.dylib        0x38530a94 start_wqthread + 4
Thread 8:
0   libsystem_kernel.dylib         0x384b6a58 mach_msg_trap + 20
1   libsystem_kernel.dylib         0x384b6854 mach_msg + 44
2   CoreFoundation                 0x2d658896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                 0x2d656fbc __CFRunLoopRun + 780
4   CoreFoundation                 0x2d5c1f0a CFRunLoopRunSpecific + 518
5   CoreFoundation                 0x2d5c1cee CFRunLoopRunInMode + 102
6   AudioToolbox                   0x2cf97874 GenericRunLoopThread::Entry(void*) + 124
7   AudioToolbox                   0x2cf7dfc0 CAPThread::Entry(CAPThread*) + 208
8   libsystem_pthread.dylib        0x38532916 _pthread_body + 138
9   libsystem_pthread.dylib        0x38532886 _pthread_start + 98
10  libsystem_pthread.dylib        0x38530aa0 thread_start + 4
Thread 9:
0   libsystem_kernel.dylib         0x384c9c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib        0x38530bda _pthread_wqthread + 306
2   libsystem_pthread.dylib        0x38530a94 start_wqthread + 4
Thread 10:
0   libsystem_kernel.dylib         0x384c9c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib        0x38530bda _pthread_wqthread + 306
2   libsystem_pthread.dylib        0x38530a94 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x18334060    r1: 0x304d68a1      r2: 0x304f0daf      r3: 0x00000000
r4: 0x18422f80    r5: 0x0000006c      r6: 0x304f0daf      r7: 0x27dc7b18
r8: 0x00000000    r9: 0x216fbcb6     r10: 0x16d71380     r11: 0x00000028
ip: 0x38a5332c    sp: 0x27dc7afc      lr: 0x2ff8b751      pc: 0x37f10626
cpsr: 0x20000030
解决方案

20

你这份报告是从苹果返回的crash吧,crash原因是访问了不存在的内存。你这份报告指指出了出错的内存地址
你需要一个XXX.app.dSYM文件。
你可以参考一下方式
http://blog.csdn.net/mr_lp/article/details/50144971

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明怎么样定位到这个bug的代码行