gpt4 book ai didi

iphone - 深入了解崩溃的根源

转载 作者:行者123 更新时间:2023-12-03 19:00:10 30 4
gpt4 key购买 nike

我遇到了以下崩溃,无法按需复制,但发生的情况足以引起用户的注意。

此崩溃报告也已被符号化。怎么查原因啊!!!这似乎只发生在 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)

此后我设法获得了更多信息,但不多。

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 都是基于 block 的,所以我不明白为什么它会导致无法识别的选择器。

最佳答案

这种方式在调试崩溃时并没有多大帮助。我找到了调试崩溃代码的最佳方法之一。点击链接了解调试技术:

https://cocoadev.com/DebuggingAutorelease.html

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

关于iphone - 深入了解崩溃的根源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9209800/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com