使用MFMailComposeViewController时,为什么应用程序崩溃“无法恢复”

时间:2012-07-05 01:55:18

标签: objective-c ios

我的应用程序需要通过电子邮件支持用户反馈。我们更喜欢使用MFMailComposeViewController而不是url架构,因为我们需要在邮件中附加一些日志文件。 但是,当用户按照以下步骤操作时,应用程序可能会因“未能及时恢复”而崩溃。

1. Get into message editing view;
2. "Cancel-->Save Draft";
3. When saving draft, presh home button. Application will enter background state;
4. User launch application again, application will block in launch image. After few second, application will crash.

设备日志说:

Jul  2 15:38:58 unknown SpringBoard[57] <Warning>: com.XXX failed to resume in time
Jul  2 15:38:58 unknown SpringBoard[57] <Warning>: Forcing crash report of XXX[461]...
Jul  2 15:38:59 unknown SpringBoard[57] <Warning>: Finished crash reporting.
Jul  2 15:38:59 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.XXX[0x8c58]) Exited: Killed: 9

问题: 为什么我的申请在恢复期间会被阻止? 为什么MFMailComposeViewController使用这么长时间来保存草稿? 我该怎样走动以避免撞车?

崩溃报告:

Date/Time:       2012-07-03 09:25:40.222 +0800
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

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

Application Specific Information:
com.XXX failed to resume in time

Elapsed total CPU time (seconds): 1.720 (user 1.720, system 0.000), 17% CPU
Elapsed application CPU time (seconds): 0.009, 0% CPU

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib        0x35ca8010 0x35ca7000 + 4112
1   libsystem_kernel.dylib        0x35ca8206 0x35ca7000 + 4614
2   AppSupport                    0x376c68c4 0x376b4000 + 75972
3   AppSupport                    0x376c52f0 0x376b4000 + 70384
4   AppSupport                    0x376c59a6 0x376b4000 + 72102
5   AppSupport                    0x376c3cfc 0x376b4000 + 64764
6   AppSupport                    0x376c3b8a 0x376b4000 + 64394
7   MessageUI                     0x305dea90 0x305d5000 + 39568
8   MessageUI                     0x306048b2 0x305d5000 + 194738
9   MessageUI                     0x305f3914 0x305d5000 + 125204
10  MessageUI                     0x305f2fa0 0x305d5000 + 122784
11  MessageUI                     0x306025ce 0x305d5000 + 185806
12  UIKit                         0x3727fcd4 0x37143000 + 1297620
13  CoreFoundation                0x33cf742e 0x33ce4000 + 78894
14  UIKit                         0x371619e4 0x37143000 + 125412
15  UIKit                         0x371619a0 0x37143000 + 125344
16  UIKit                         0x3716197e 0x37143000 + 125310
17  UIKit                         0x371616ee 0x37143000 + 124654
18  UIKit                         0x37162026 0x37143000 + 127014
19  UIKit                         0x37160508 0x37143000 + 120072
20  UIKit                         0x3715fefa 0x37143000 + 118522
21  UIKit                         0x371464e6 0x37143000 + 13542
22  UIKit                         0x37145d26 0x37143000 + 11558
23  GraphicsServices              0x30578dec 0x30574000 + 19948
24  CoreFoundation                0x33d7154c 0x33ce4000 + 578892
25  CoreFoundation                0x33d714ee 0x33ce4000 + 578798
26  CoreFoundation                0x33d7033c 0x33ce4000 + 574268
27  CoreFoundation                0x33cf34d6 0x33ce4000 + 62678
28  CoreFoundation                0x33cf339e 0x33ce4000 + 62366
29  GraphicsServices              0x30577fc6 0x30574000 + 16326
30  UIKit                         0x3717473c 0x37143000 + 202556
31  XXX                   0x00002d26 0x1000 + 7462
32  XXX                   0x00002ce4 0x1000 + 7396

0 个答案:

没有答案