WatchKit扩展崩溃

时间:2015-04-23 16:14:04

标签: ios xcode crash-reports apple-watch xcode-6.2

我为Apple Watch发了一个应用程序。今天,我收到了Apple的崩溃日志。据他们说,当我在Apple Watch上使用语音输入时,我的应用程序崩溃了。这是我的崩溃日志。有人有建议吗?我找不到我的应用程序崩溃的原因,因为它自己测试时工作完全正常

Incident Identifier: 623D5DE7-27F9-44CE-83B3-3101D29CA71A
CrashReporter Key:   3a62bf8f6b6b5aea51f9fa22b9df0f117f8e8a4b
Hardware Model:      xxx
Process:             awtrans WatchKit Extension [1038]
Path:                /private/var/mobile/Containers/Bundle/Application/654805BF-84CD-42E8-AAB6-A8E53384D632/awtrans.app/PlugIns/awtrans WatchKit Extension.appex/awtrans WatchKit Extension
Identifier:          com.prodict.awtrans.watchkitextension
Version:             4.0 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2015-04-23 04:44:26.640 -0700
Launch Time:         2015-04-23 04:43:51.234 -0700
OS Version:          iOS 8.3 (12F70)
Report Version:      105

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  1

Last Exception Backtrace:
(0x1837b82d8 0x194fdc0e4 0x1837b8218 0x1846446f0 0x100036bd0 0x19562d994 0x19562d954 0x19563a780 0x19563bc4c 0x19580d22c 0x19580cef0)

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x0000000195758e0c 0x195758000 + 3596
1   libsystem_kernel.dylib          0x0000000195758c84 0x195758000 + 3204
2   CoreFoundation                  0x000000018376f720 0x183690000 + 915232
3   CoreFoundation                  0x000000018376d674 0x183690000 + 906868
4   CoreFoundation                  0x00000001836992d0 0x183690000 + 37584
5   Foundation                      0x00000001845d14c4 0x1845c4000 + 54468
6   Foundation                      0x000000018462b80c 0x1845c4000 + 423948
7   libxpc.dylib                    0x00000001958401b0 0x195830000 + 65968
8   libxpc.dylib                    0x0000000195841f1c 0x195830000 + 73500
9   Foundation                      0x00000001847a2908 0x1845c4000 + 1960200
10  PlugInKit                       0x000000018f3ea80c 0x18f3dc000 + 59404
11  WatchKit                        0x0000000188c12248 0x188be8000 + 172616
12  libdyld.dylib                   0x000000019565aa04 0x195658000 + 10756

Thread 1 name:  Dispatch queue: com.apple.root.default-qos
Thread 1 Crashed:
0   libsystem_kernel.dylib          0x0000000195773270 0x195758000 + 111216
1   libsystem_pthread.dylib         0x000000019581116c 0x19580c000 + 20844
2   libsystem_c.dylib               0x00000001956eab14 0x195688000 + 404244
3   libc++abi.dylib                 0x00000001947a9414 0x1947a8000 + 5140
4   libc++abi.dylib                 0x00000001947c8b88 0x1947a8000 + 134024
5   libobjc.A.dylib                 0x0000000194fdc3bc 0x194fd4000 + 33724
6   libc++abi.dylib                 0x00000001947c5bb0 0x1947a8000 + 121776
7   libc++abi.dylib                 0x00000001947c5474 0x1947a8000 + 119924
8   libobjc.A.dylib                 0x0000000194fdc200 0x194fd4000 + 33280
9   CoreFoundation                  0x00000001837b8214 0x183690000 + 1212948
10  Foundation                      0x00000001846446ec 0x1845c4000 + 526060
11  awtrans WatchKit Extension      0x0000000100036bcc 0x10002c000 + 43980
12  libdispatch.dylib               0x000000019562d990 0x19562c000 + 6544
13  libdispatch.dylib               0x000000019562d950 0x19562c000 + 6480
14  libdispatch.dylib               0x000000019563a77c 0x19562c000 + 59260
15  libdispatch.dylib               0x000000019563bc48 0x19562c000 + 64584
16  libsystem_pthread.dylib         0x000000019580d228 0x19580c000 + 4648
17  libsystem_pthread.dylib         0x000000019580ceec 0x19580c000 + 3820

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib          0x0000000195758c24 0x195758000 + 3108
1   libdispatch.dylib               0x000000019563de6c 0x19562c000 + 73324
2   libdispatch.dylib               0x000000019562f998 0x19562c000 + 14744

Thread 3:
0   libsystem_kernel.dylib          0x0000000195773c78 0x195758000 + 113784
1   libsystem_pthread.dylib         0x000000019580d2d8 0x19580c000 + 4824
2   libsystem_pthread.dylib         0x000000019580ceec 0x19580c000 + 3820

Thread 4 name:  com.apple.NSURLConnectionLoader
Thread 4:
0   libsystem_kernel.dylib          0x0000000195758e0c 0x195758000 + 3596
1   libsystem_kernel.dylib          0x0000000195758c84 0x195758000 + 3204
2   CoreFoundation                  0x000000018376f720 0x183690000 + 915232
3   CoreFoundation                  0x000000018376d674 0x183690000 + 906868
4   CoreFoundation                  0x00000001836992d0 0x183690000 + 37584
5   CFNetwork                       0x000000018317a890 0x1830dc000 + 649360
6   Foundation                      0x00000001846b9db4 0x1845c4000 + 1007028
7   libsystem_pthread.dylib         0x000000019580fdc4 0x19580c000 + 15812
8   libsystem_pthread.dylib         0x000000019580fd20 0x19580c000 + 15648
9   libsystem_pthread.dylib         0x000000019580cef4 0x19580c000 + 3828

Thread 5 name:  com.apple.CFSocket.private
Thread 5:
0   libsystem_kernel.dylib          0x0000000195773498 0x195758000 + 111768
1   CoreFoundation                  0x0000000183775124 0x183690000 + 938276
2   libsystem_pthread.dylib         0x000000019580fdc4 0x19580c000 + 15812
3   libsystem_pthread.dylib         0x000000019580fd20 0x19580c000 + 15648
4   libsystem_pthread.dylib         0x000000019580cef4 0x19580c000 + 3828

1 个答案:

答案 0 :(得分:1)

它的重要部分是您无法重现客户的步骤。例如,您的语音输入命令有效,其语音命令会导致崩溃。但请注意,语音命令可能需要iPhone帮助和网络呼叫回苹果来处理音频,因此关键的区别在于它们所处的网络环境以及它们看到的延迟。

您是否有任何代码可以对回调执行操作 - 这些代码可以在测试环境中更早或更早出现,例如语音命令完成且文本可用时。

一种方法是尝试在代码中引入人工定时延迟,并在回调时添加日志代码。也许从Apple成员中心下载网络链路调节开发工具(允许在网络中引入延迟和错误)。

我注意到在电噪声环境中,我被多次调用(在这种情况下为darwin通知)(可能是OS层重新发送)。所以它也值得一看你的数据协议(如果你有的话)。确保捕获延迟消息和重复消息(比如将随机令牌放入任何消息调用中)。

由于您的应用程序处于野外状态,因此使用的条件可能会有很大差异,具体取决于它的使用范围。因此,随着使用量的增长,模拟恶劣条件并添加代码/日志以处理杂散条件变得更加重要。

因为你的错误是SIGABRT,这意味着系统知道你做错了它可以检测到的;这些通常是在已发布对象上调用方法或调用给定对象不支持的方法。它可能是一些标准错误,而不是你需要注意的异国情调。