Skip to content

Crash EXC_BAD_ACCESS KERN_INVALID_ADDRESS [FIRInstanceIDKeyPairStore updateKeyRef:withTag:handler:] #2731

Closed
@mvandervelden

Description

@mvandervelden

[READ] Step 1: Are you in the right place?

Yes

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 10.1
  • Firebase SDK version: 5.19.0
  • Firebase Component: FirebaseInstanceID
  • Component version: 3.8.0

[REQUIRED] Step 3: Describe the problem

stack trace:

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x1bc9d8d7c objc_msgSend + 28
1  CoreFoundation                 0x1bd6dd6d0 +[__NSDictionaryI __new::::::] + 376
2  CoreFoundation                 0x1bd6e03b4 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 64
3  Catawiki                       0x1012754cc __58-[FIRInstanceIDKeyPairStore updateKeyRef:withTag:handler:]_block_invoke (FIRInstanceIDKeyPairStore.m:416)
4  libdispatch.dylib              0x1bd2296c8 _dispatch_call_block_and_release + 24
5  libdispatch.dylib              0x1bd22a484 _dispatch_client_callout + 16
6  libdispatch.dylib              0x1bd1d69a4 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
7  CoreFoundation                 0x1bd781ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
8  CoreFoundation                 0x1bd77cbac __CFRunLoopRun + 1964
9  CoreFoundation                 0x1bd77c0e0 CFRunLoopRunSpecific + 436
10 GraphicsServices               0x1bf9f5584 GSEventRunModal + 100
11 UIKitCore                      0x1ea708c00 UIApplicationMain + 212
12 Catawiki                       0x100e78b20 main (main.swift:6)
13 libdyld.dylib                  0x1bd23abb4 start + 4

Also I've seen a lot of crash and error reports in Firebase Crashlytics that are missing data in the "logs" tab.

Steps to reproduce:

Haven't been able to reproduce locally, but this started happening on quite large scale in production in our latest version (+700 users affected). In this release we updated from Firebase 5.10 (FirebaseInstanceID 3.2.2), and at the same time adding custom screen tagging (see code below).

Looking at the relevant code in FIRInstanceIDKeyPairStore line 416, it looks like an issue handling backwards compatibility?

Relevant Code:

func setScreenName(_ screenName: String?, screenClass: String?) {
        Firebase.Analytics.setScreenName(screenName, screenClass: screenClass)
}

Not sure the latter is related to the crash..

--EDIT--
Couple of days later, it seems that the occurrence of the crash is slowing down rapidly (no change on the client side), which seems likely to me if the issue was indeed backwards compatibility/migration:

Screenshot 2019-04-08 at 10 41 11

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions