深入了解崩溃 [英] Getting to the bottom of crash

查看:159
本文介绍了深入了解崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了以下崩溃,我无法按需复制,但确实发生了足以让用户注意到。

I have the following crash that I can't replicate on demand but does happen enough to get noticed by the users.

此崩溃报告也已被象征化。你怎么知道原因!!!这似乎只发生在4.1

This crash report has been symbolicated as well. How would you find out the cause!!! This only seems to happen on 4.1

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

Thread 0 Crashed:
0   libobjc.A.dylib                     0x000027d8 objc_msgSend + 16
1   CoreFoundation                      0x0007d749 ____CFXNotificationPost_old_block_invoke_1 + 45
2   libSystem.B.dylib                   0x000d5984 _dispatch_call_block_and_release + 20
3   libSystem.B.dylib                   0x000d66b0 _dispatch_continuation_pop + 72
4   libSystem.B.dylib                   0x000d69fc _dispatch_main_queue_callback_4CF + 220
5   CoreFoundation                      0x0002789b __CFRunLoopRun + 1335
6   CoreFoundation                      0x00027277 CFRunLoopRunSpecific + 231
7   CoreFoundation                      0x0002717f CFRunLoopRunInMode + 59
8   GraphicsServices                    0x000045f3 GSEventRunModal + 115
9   GraphicsServices                    0x0000469f GSEventRun + 63
10  UIKit                               0x00004123 -[UIApplication _run] + 403
11  UIKit                               0x0000212f UIApplicationMain + 671
12  MyApp                               0x000024e3 main (main.m:17)

我已经设法获得更多信息,但并不多。

I have since managed to get a little more info, but not much.

2012-02-12 18:03:04.556 MyApp[462:307] (null): unrecognized selector sent to class 0x3e0a360c
2012-02-12 18:03:04.618 MyApp[462:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '(null): unrecognized selector sent to class 0x3e0a360c'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x33506ed3 __exceptionPreprocess + 114
    1   libobjc.A.dylib                     0x30412811 objc_exception_throw + 24
    2   CoreFoundation                      0x335086ff +[NSObject(NSObject) doesNotRecognizeSelector:] + 102
    3   CoreFoundation                      0x334b01d9 ___forwarding___ + 508
    4   CoreFoundation                      0x334aff90 _CF_forwarding_prep_0 + 48
    5   Foundation                          0x302a86b3 _nsnote_callback + 142
    6   CoreFoundation                      0x334e4749 ____CFXNotificationPost_old_block_invoke_1 + 44
    7   libSystem.B.dylib                   0x31d05984 _dispatch_call_block_and_release + 20
    8   libSystem.B.dylib                   0x31d066b0 _dispatch_continuation_pop + 72
    9   libSystem.B.dylib                   0x31d069fc _dispatch_main_queue_callback_4CF + 220
    10  CoreFoundation                      0x3348e89b __CFRunLoopRun + 1334
    11  CoreFoundation                      0x3348e277 CFRunLoopRunSpecific + 230
    12  CoreFoundation                      0x3348e17f CFRunLoopRunInMode + 58
    13  GraphicsServices                    0x31b5e5f3 GSEventRunModal + 114
    14  GraphicsServices                    0x31b5e69f GSEventRun + 62
    15  UIKit                               0x341bd123 -[UIApplication _run] + 402
    16  UIKit                               0x341bb12f UIApplicationMain + 670

现在全部我的addObservers是基于块的,所以我不明白为什么它会导致un识别选择器。

Now all of my addObservers are block based so I can't see why it would lead to an unrecognised selector.

推荐答案

这种方式在调试崩溃时对我们没什么帮助。我找到了调试Crash代码的最佳方法之一。请点击调试技术链接:

This way won't help us much while Debugging crash. I found one of the best way to Debug the code for Crash. Follow the link for debugging technique:

https:// cocoadev.com/DebuggingAutorelease.html

您需要非常仔细地分析您的控制台,以了解崩溃发生的原因。这对几乎所有没有启用ARC的代码都有帮助。

You need to analyze your Console very carefully to see actually why the Crash occurs. This helped me in almost all of the Code that are without ARC enabled.

这篇关于深入了解崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆