Search code examples
iosiphoneios-keyboard-extension

iOS Keyboard Extension crash before any of my code runs


I have been getting crash reports like this for a keyboard extension I have developed and am either confused about how to read the stack trace or why it is occurring or both and I was hoping someone could help me clear this up.

Below is the stack trace:

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0xd15db9df
Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x37949f66 objc_msgSend + 5
1  UIKit                          0x2cd57f05 -[_UIViewControllerTransitionContext completeTransition:] + 52
2  UIKit                          0x2d10ac1f __95-[_UIWindowAnimationController _performLayoutAnimationWithContext:windowGeometryUpdatingBlock:]_block_invoke88 + 26
3  UIKit                          0x2cc7b8e1 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 308
4  UIKit                          0x2cc7b4f9 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 184
5  UIKit                          0x2cc7b40f -[UIViewAnimationState animationDidStop:finished:] + 70
6  QuartzCore                     0x2c660fe7 CA::Layer::run_animation_callbacks(void*) + 234
7  libdispatch.dylib              0x37ecdc6f _dispatch_client_callout + 22
8  libdispatch.dylib              0x37ed9553 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1322
9  CoreFoundation                 0x295ac889 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
10 CoreFoundation                 0x295aafa9 __CFRunLoopRun + 1512
11 CoreFoundation                 0x294f69a1 CFRunLoopRunSpecific + 476
12 CoreFoundation                 0x294f67b3 CFRunLoopRunInMode + 106
13 GraphicsServices               0x30e911a9 GSEventRunModal + 136
14 UIKit                          0x2cca7635 UIApplicationMain + 1440
15 libxpc.dylib                   0x3806f9e3 _xpc_objc_main + 706
16 libxpc.dylib                   0x38071009 xpc_main + 168
17 Foundation                     0x2a3ec289 service_connection_handler + 162
18 PlugInKit                      0x32c5ff75 -[PKService run] + 508
19 PlugInKit                      0x32c5fc4b +[PKService main] + 58
20 PlugInKit                      0x32c5ffa9 +[PKService _defaultRun:arguments:] + 20
21 libextension.dylib             0x371b60c5 NSExtensionMain + 48
22 libdyld.dylib                  0x37f0baaf start + 2

In the left column where it lists the libraries (correct term?) I don't see any reference to my code. In other crash logs there is always some reference to a class in my app or something but I don't see that in this one. What does that mean? Is the crash occurring before my code executes and this is an Apple issue I can ignore?


Solution

  • It's an Apple Bug. The keyboard extension I work on has a nearly identical crash report. Fortunately, this only seems to happen on iOS 8, though I have seen a similar one that affects iOS 9.

    I would file a bug report with Apple, and include a copy of the stack trace.