我收到了一位用户的崩溃报告,说该应用程序在启动时崩溃
我将崩溃报告拖到Xcode 4并收到以下信息(这是摘录),
但 Xcode 4并不代表第10,24,25行,我真的很想看。
我使用atos命令:
atos -arch armv6 -o 'MyApp.app'/'MyApp' 0x0000449b
但它显示的是:
0x0000449b(在MyApp中)+ 64
您是否知道如何阅读第10,24,25行中的符号?
Incident Identifier: 5142E671-BD08-483A-AAF2-F7D680BE0267
CrashReporter Key: 481fe1c162975f8367127b52824e30d33ffaa014
Hardware Model: iPhone4,1
Process: MyApp [2463]
Path: /var/mobile/Applications/79DE9C42-332C-4243-B637-9DCF6AC4EC35/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-07-04 11:37:39.362 -0600
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x353a188f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x37748259 objc_exception_throw + 33
2 CoreFoundation 0x353a4a9b -[NSObject doesNotRecognizeSelector:] + 175
3 CoreFoundation 0x353a3915 ___forwarding___ + 301
4 CoreFoundation 0x352fe650 _CF_forwarding_prep_0 + 48
5 Foundation 0x34eaf4ff __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 19
6 CoreFoundation 0x3536d547 ___CFXNotificationPost_block_invoke_0 + 71
7 CoreFoundation 0x352f9097 _CFXNotificationPost + 1407
8 Foundation 0x34e233eb -[NSNotificationCenter postNotificationName:object:userInfo:] + 67
9 Foundation 0x34e24c1b -[NSNotificationCenter postNotificationName:object:] + 31
10 MyApp 0x0000449b 0x1000 + 13467
11 UIKit 0x32e19c31 -[UIApplication _stopDeactivatingForReason:] + 189
12 UIKit 0x32eb1381 -[UIApplication _handleApplicationResumeEvent:] + 1141
13 UIKit 0x32dd5b03 -[UIApplication handleEvent:withNewEvent:] + 1075
14 UIKit 0x32dd5567 -[UIApplication sendEvent:] + 55
15 UIKit 0x32dd4f3b _UIApplicationHandleEvent + 5827
16 GraphicsServices 0x36f9422b PurpleEventCallback + 883
17 CoreFoundation 0x35375523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
18 CoreFoundation 0x353754c5 __CFRunLoopDoSource1 + 141
19 CoreFoundation 0x35374313 __CFRunLoopRun + 1371
20 CoreFoundation 0x352f74a5 CFRunLoopRunSpecific + 301
21 CoreFoundation 0x352f736d CFRunLoopRunInMode + 105
22 GraphicsServices 0x36f93439 GSEventRunModal + 137
23 UIKit 0x32e03cd5 UIApplicationMain + 1081
24 MyApp 0x00004b27 0x1000 + 15143
25 MyApp 0x00003cd0 0x1000 + 11472
答案 0 :(得分:1)
我没有找到关于如何在崩溃日志中读取内存地址的答案。
但我已经弄清楚如何解决这个问题:
- 此崩溃表明它是由本地通知引起的
- [NSObject doesNotRecognizeSelector:]被引发
因此,我在项目中搜索所有本地通知,并为每个观察者找到相应的选择器,其中一个选择器未实现。这就是我收到的原因
-[NSObject doesNotRecognizeSelector:
而应用程序崩溃了。
实现缺少的选择器解决了问题。