Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从iPhone读取崩溃报告_Iphone_Cocoa Touch_Stack Trace - Fatal编程技术网

如何从iPhone读取崩溃报告

如何从iPhone读取崩溃报告,iphone,cocoa-touch,stack-trace,Iphone,Cocoa Touch,Stack Trace,从beta测试人员那里得到了一份崩溃报告,我很难找到问题的根源。显然,当试图设置UIButton(screenOverlay)时出错了。以下是它在ViewDidLoad中的创建: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); butto

从beta测试人员那里得到了一份崩溃报告,我很难找到问题的根源。显然,当试图设置UIButton(screenOverlay)时出错了。以下是它在ViewDidLoad中的创建:

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
button.backgroundColor = [UIColor blackColor];
button.alpha = 0.0;
button.hidden = YES;
[button addTarget:self.noteView action:@selector(backgroundClicked:) forControlEvents:UIControlEventTouchUpInside];
self.screenOverlay = button;
[self.view addSubview:screenOverlay];
[button release];
奇怪的是,这个崩溃发生在加载视图之后很久……也许当键盘移到屏幕外时,viewDidLoad再次被调用?不管怎么说,有没有老兵在你得到这些东西时,对如何处理它们有一些智慧之言

这是堆栈跟踪。如果您觉得有价值,很乐意上传rest

    Date/Time:       2009-09-04 08:42:05.341 -0700
    OS Version:      iPhone OS 3.0.1 (7A400)
    Report Version:  104

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

    Thread 0 Crashed:
    0   libobjc.A.dylib  0x30011960 objc_msgSend + 52
    1   libobjc.A.dylib  0x3001313c objc_setProperty + 160
    2   MyApp            0x00003258 -[ItemizeViewController setScreenOverlay:] (ItemizeViewController.m:24)
    3   MyApp            0x00003920 -[ItemizeViewController viewDidLoad] (ItemizeViewController.m:229)
    4   UIKit            0x3093d5e4 -[UIViewController view] + 152
    5   UIKit            0x30a56d84 -[UIViewController contentScrollView] + 24
    6   UIKit            0x30973ee0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 180
    7   UIKit            0x30973d90 -[UINavigationController _startDeferredTransitionIfNeeded] + 256
    8   UIKit            0x309a7468 -[UINavigationController _popViewControllerWithTransition:allowPoppingLast:] + 400
    9   UIKit            0x309a72c8 -[UINavigationController popViewControllerAnimated:] + 32
    10  UIKit            0x309a7a0c -[UINavigationController navigationBar:shouldPopItem:] + 132
    11  UIKit            0x309a77e8 -[UINavigationBar popNavigationItemAnimated:] + 184
    12  UIKit            0x30a3667c -[UINavigationBar _handleMouseUpAtPoint:] + 536
    13  UIKit            0x30a34f64 -[UINavigationBar touchesEnded:withEvent:] + 84
    14  UIKit            0x309a60d4 -[UIWindow _sendTouchesForEvent:] + 520
    15  UIKit            0x309a5464 -[UIWindow sendEvent:] + 108
    16  UIKit            0x30936e3c -[UIApplication sendEvent:] + 400
    17  UIKit            0x30936874 _UIApplicationHandleEvent + 4336
    18  GraphicsServices 0x32046964 PurpleEventCallback + 1028
    19  CoreFoundation   0x30254a70 CFRunLoopRunSpecific + 2296
    20  CoreFoundation   0x30254164 CFRunLoopRunInMode + 44
    21  GraphicsServices 0x3204529c GSEventRunModal + 188
    22  UIKit            0x308f0374 -[UIApplication _run] + 552
    23  UIKit            0x308eea8c UIApplicationMain + 960
    24  MyApp            0x00002090 main (main.m:14)
    25  MyApp            0x0000202c start + 44

Thread 1:
0   libSystem.B.dylib               0x31d47158 mach_msg_trap + 20
1   libSystem.B.dylib               0x31d49ed8 mach_msg + 60
2   CoreFoundation                  0x3025454e CFRunLoopRunSpecific + 982
3   CoreFoundation                  0x30254164 CFRunLoopRunInMode + 44
4   WebCore                         0x3588dbc8 RunWebThread(void*) + 412
5   libSystem.B.dylib               0x31d705a0 _pthread_body + 20

Thread 0 crashed with ARM Thread State:
    r0: 0x0018e4e0    r1: 0x300991c4      r2: 0x43a00000      r3: 0x00001108
    r4: 0x80000408    r5: 0x00000001      r6: 0x00000000      r7: 0x2fffeb94
    r8: 0x43a00000    r9: 0x001fc098     r10: 0x301038dc     r11: 0x30082134
    ip: 0x381fd03c    sp: 0x2fffeb74      lr: 0x30013144      pc: 0x30011960
  cpsr: 0xa0000010

从上面的代码中,我看到了以下内容

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

然后你调用[button release],这可能会导致你的问题,你调用的clas方法不会保留对象,因为它是自动释放的,所以你对对象调用release,稍后当它尝试自动释放时,你会遇到崩溃…非常确定这是你的问题…删除[buttom release]你应该没事,从上面的代码来看,这基本上是一个过度发布的问题,我看到了以下几点

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

然后你调用[button release],这可能会导致你的问题,你调用的clas方法不会保留对象,因为它是自动释放的,所以你对对象调用release,稍后当它尝试自动释放时,你会遇到崩溃…非常确定这是你的问题…删除[buttom release]你应该没问题,这基本上是一个过度发布的问题

screenOverlay是如何定义的?如何将其设置为ItemizeViewController的属性?@property(非原子,保留)UIButton*screenOverlay;screenOverlay是如何定义的?如何将其设置为ItemizeViewController的属性?@property(非原子,保留)UIButton*screenOverlay;的确我真傻。奇怪的一个,因为它只崩溃每20左右使用。。。我的大部分过度发布问题都会导致即时爆炸!谢谢你的帮助!的确我真傻。奇怪的一个,因为它只崩溃每20左右使用。。。我的大部分过度发布问题都会导致即时爆炸!谢谢你的帮助!