我在我的iOS应用崩溃报告中遇到了很多SIGSEGV异常,并且在UINavigationController中也崩溃了

jai*_*kar 1 iphone segmentation-fault ios

这是我的崩溃报告,这与iOS版本和设备无关.另外我想知道,SIGSEGV_ACCERR是与内存有关的东西.你能帮我解决一下这个问题.我有一堆崩溃报告,下面是日志

Date/Time:       2012-09-25 23:55:33 +0000
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x60000008
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                     0x37734f78 objc_msgSend + 16
1   UIKit                               0x32e0c503 -[UINavigationController _startDeferredTransitionIfNeeded] + 251
2   UIKit                               0x32e568eb _popViewControllerNormal + 191
3   UIKit                               0x32e56719 -[UINavigationController _popViewControllerWithTransition:allowPoppingLast:] + 393
4   UIKit                               0x32e56c79 -[UINavigationController navigationBar:shouldPopItem:] + 153
5   UIKit                               0x32e56a8f -[UINavigationBar _popNavigationItemWithTransition:] + 99
6   UIKit                               0x32ea6247 -[UINavigationBar popNavigationItemAnimated:] + 123
7   UIKit                               0x32ea60d5 -[UINavigationBar _handleMouseUpAtPoint:] + 925
8   UIKit                               0x32ea5d33 -[UINavigationBar touchesEnded:withEvent:] + 83
9   UIKit                               0x32de192b -[UIWindow _sendTouchesForEvent:] + 319
10  UIKit                               0x32de1319 -[UIWindow sendEvent:] + 381
11  UIKit                               0x32dc7695 -[UIApplication sendEvent:] + 357
12  UIKit                               0x32dc6f3b _UIApplicationHandleEvent + 5827
13  GraphicsServices                    0x36f8622b PurpleEventCallback + 883
14  CoreFoundation                      0x35367523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
15  CoreFoundation                      0x353674c5 __CFRunLoopDoSource1 + 141
16  CoreFoundation                      0x35366313 __CFRunLoopRun + 1371
17  CoreFoundation                      0x352e94a5 CFRunLoopRunSpecific + 301
18  CoreFoundation                      0x352e936d CFRunLoopRunInMode + 105
19  GraphicsServices                    0x36f85439 GSEventRunModal + 137
20  UIKit                               0x32df5cd5 UIApplicationMain + 1081
21  Myapp                               0x00003597 main (main.m:20)
Run Code Online (Sandbox Code Playgroud)

Jod*_*ins 13

一个非常快速的谷歌SIGSEGV会告诉你它究竟是什么(一个信号意味着分割违规).这些链接也会教你它为什么会发生.

从堆栈跟踪中,您可以看到主循环正在导航栏中处理触摸,从而导致pop转换.弹出视图控制器时,错误的内存访问会导致应用程序崩溃.

它甚至会告诉你它试图访问的地址(导致崩溃):0x60000008 这个地址看起来有点太"整洁吗?"

所以,我首先尝试在调试器中重新创建它.我还在我的视图控制器中添加一些日志记录,这些日志控制器被推送/弹出,这样我就可以知道哪一个导致了崩溃.

您可以猜测,这是按下导航控制器中的"后退"按钮之一的直接结果.

所以,我也倾向于看看如何设置我在控制器上推送的控制器,并调查你如何使用导航栏(因为弹出它们导致崩溃).

看起来崩溃发生在核心库中,因此必须在控制器的设置中,因为在堆栈跟踪中似乎没有对您的代码进行任何调用.