简体   繁体   中英

Crash on WatchKit Extension

I made an application for the Apple Watch, which I have published. Today, I received a crash log from Apple. According to them, my app crashes when using voice input on the Apple Watch. Here is my crash log. Does anybody have advice? I cannot find the reason why my app would crash, since it works totally fine when testing it myself

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

The significant part of it is that you cannot reproduce the steps the customer has. For example, you voice input commands work, their voice commands cause a crash. However, note that voice commands can require iPhone help and network calls back to apple to process the audio, so a key difference is the network environment they are sitting in, and the latencies they see.

Do you have any code that does actions upon a callback -- those could be coming in later or earlier than in your testing environment, such as when the voice command has completed and the text is available.

One approach is to try introducing artificial timing delays in your code and adding logging code whenever a callback comes in. Perhaps download the network link conditioner developer tool from Apple member centre (which allows introduction of latencies and errors in the network).

I have noticed that in a electrically noisy environment, I get called by (darwin notification in this case) multiple times (maybe OS layer re-sends). So its also worth looking at your data protocols (if you have any). Make sure you catch delayed messages and duplicate messages (say put in a random token into any messaging call).

Since your application is out in the wild the conditions it is used in can vary a lot depending on how widely it is used. So simulating bad conditions and added code/logging to handle stray conditions comes more important as usage grows.

Because your error is SIGABRT it means the system knows you have done something wrong that it can detect; these are often calling methods on released objects or calling methods not supported on the given object. Its probably some standard error, not something exotic that you need to look out for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM