我得到错误0x8badf00d在iPhone应用程序,并不是通常的嫌疑犯 [英] I get error 0x8badf00d in iPhone app, and is not the usual suspect

查看:308
本文介绍了我得到错误0x8badf00d在iPhone应用程序,并不是通常的嫌疑犯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程式在启动时发生随机崩溃。

I have a random crash in my app in launching.

我确定不是启动时间(如 8badf00d是什么意思?)因为应用程序启动快。

I'm pretty sure is not the launching time (as explained in What does 8badf00d mean?) because the app launch fast.

最糟糕的是,崩溃日志不能simbolicate(我不能得到源代码行号)。这是错误:

The worst is that the crash log can't be simbolicate (I can't get the sourcecode line numbers). This is the error:

Exception Type:  00000020
Exception Codes: 0x8badf00d
Highlighted Thread:  0

Application Specific Information:
Failed to launch
Thread 0:
0   JhonSell                        0x000c63d6 0x1000 + 807894
1   JhonSell                        0x000c7ffe 0x1000 + 815102
2   JhonSell                        0x000c9646 0x1000 + 820806
3   JhonSell                        0x000ca50a 0x1000 + 824586
4   JhonSell                        0x000b3b72 0x1000 + 732018
5   JhonSell                        0x000b3e1e 0x1000 + 732702
6   JhonSell                        0x000b3fd4 0x1000 + 733140
7   JhonSell                        0x0000a312 0x1000 + 37650
8   JhonSell                        0x0000aa7c 0x1000 + 39548
9   JhonSell                        0x00006e7c 0x1000 + 24188
10  JhonSell                        0x0000fede 0x1000 + 61150
11  JhonSell                        0x00004080 0x1000 + 12416
12  UIKit                           0x30a4ef24 -[UIApplication performInitializationWithURL:asPanel:] + 160
13  UIKit                           0x30a57dec -[UIApplication _runWithURL:] + 644
14  Foundation                      0x306945a2 __NSFireDelayedPerform + 326
15  CoreFoundation                  0x30269d88 CFRunLoopRunSpecific + 2642
16  CoreFoundation                  0x30269320 CFRunLoopRunInMode + 44
17  GraphicsServices                0x31567e58 GSEventRunModal + 268
18  UIKit                           0x30a4fa6c -[UIApplication _run] + 520
19  UIKit                           0x30a591d0 UIApplicationMain + 1132
20  JhonSell                        0x00002290 0x1000 + 4752
21  JhonSell                        0x0000202c 0x1000 + 4140

我无法调试

推荐答案

在UIApplicationDelegate实现中有三种方法必须在5-6秒内完成或iPhone将杀死你的应用程序(这不适用于当你附带一个调试器和模拟器)。我不知道确切的时间间隔是否记录在任何地方,但这是我决定实验。有两个启动时,applicationDidFinishLaunching和应用程序:didFinishLaunchingWithOptions,一个在关闭,applicationWillTerminate。

There are three methods in your UIApplicationDelegate implementation that have to finish within 5-6 seconds or the iPhone will kill your application (this does not apply to when you are attached with a debugger and on the simulator). I'm not sure if the exact time interval is documented anywhere, but that's what I determined experimentally. There are two on startup, applicationDidFinishLaunching: and application:didFinishLaunchingWithOptions, and one on shutdown, applicationWillTerminate.

你会想检查任何网络访问或耗时这些方法中的操作是异步执行的,所以方法可以快速返回。

You'll want to check out that any network access or time-consuming operations in those methods are performed asynchronously, so that the method can return quickly.

这是我知道的唯一的事情会导致看门狗崩溃启动。

That's the only thing I know of that would cause watchdog crashes on startup.

对于堆栈跟踪上的更多提示,如果您使用的是OS 3.0和3.0 SDK,管理器应该这样做。只是确保你保持dSYM文件从-exact-构建可用在硬盘驱动器上聚光灯某处。然后,当您在XCode中查看管理器下的@跟踪时,它应该为您自动添加符号。

As for more hints on the stack trace, if you are using OS 3.0 and the 3.0 SDK, Organizer should do this before. Just make sure you're keeping the dSYM files from the -exact- build available on the hard drive to spotlight somewhere. Then when you look @ the trace under the Organizer in XCode, it should add symbols automatically for you.

这篇关于我得到错误0x8badf00d在iPhone应用程序,并不是通常的嫌疑犯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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