Skip to content

Crash in -[FIRMessagingRmq2PersistentStore openDatabase:] caused by Messaging setup #199

Closed
@ghost

Description

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 8.3.3
  • Firebase SDK version: 4.0.4
  • Library version: 4.0.4
  • Firebase Product: Messaging

[REQUIRED] Step 3: Describe the problem

Since the migration to Firebase SDK v4 I'm facing intermittent (2-3% DAU) EXC_BREAKPOINT crashes in [FIRMessagingRmq2PersistentStore openDatabase:]

Steps to reproduce:

Code is setup as in https://github.com/firebase/quickstart-ios/blob/master/messaging/MessagingExampleSwift/AppDelegate.swift

Running on main thread:

FirebaseApp.configure()
Messaging.messaging().delegate = self
Messaging.messaging().shouldEstablishDirectChannel = false

Relevant Code:

Relevant threads in stack trace:

#0. Crashed: com.apple.main-thread
0  MyApp                          0x1006ae45c -[FIRMessagingRmq2PersistentStore openDatabase:] + 4302365788
1  MyApp                          0x1006ad770 -[FIRMessagingRmq2PersistentStore initWithDatabaseName:] + 4302362480
2  MyApp                          0x1006b016c -[FIRMessagingRmqManager initWithDatabaseName:] + 4302373228
3  MyApp                          0x1006977a8 -[FIRMessaging setupRmqManager] + 4302272424
4  MyApp                          0x100697144 -[FIRMessaging start] + 4302270788
5  MyApp                          0x100696e28 __25+[FIRMessaging messaging]_block_invoke + 4302269992
6  libswiftCoreData.dylib         0x1806629a0 (Missing)
7  libswiftCoreData.dylib         0x1806636cc (Missing)
8  MyApp                          0x100696dac +[FIRMessaging messaging] + 4302269868
9  MyApp                          0x100696798 +[FIRMessaging(FIRApp) didReceiveConfigureSDKNotification:] + 4302268312
10 libswiftCoreData.dylib         0x1817455f4 (Missing)
11 libswiftCoreData.dylib         0x181744d08 (Missing)
12 libswiftCoreData.dylib         0x181744a84 (Missing)
13 libswiftCoreData.dylib         0x1817b37a8 (Missing)
14 libswiftCoreData.dylib         0x18168895c (Missing)
15 libswiftCoreData.dylib         0x18219b970 (Missing)
16 MyApp                          0x10066915c +[FIRApp sendNotificationsToSDKs:] + 4302082396
17 MyApp                          0x1006680fc +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 4302078204
18 MyApp                          0x100667d90 +[FIRApp configure] + 4302077328
19 MyApp                          0x1000d5944 specialized AppManager.handleFinishLaunching(application : UIApplication, launchOptions : [UIApplicationLaunchOptionsKey : Any]?) -> Bool (AppManager.swift:48)
20 MyApp                          0x1000d2018 AppManager.handleFinishLaunching(application : UIApplication, launchOptions : [UIApplicationLaunchOptionsKey : Any]?) -> Bool (AppManager.swift)
21 MyApp                          0x10038e2e8 specialized AppDelegate.application(UIApplication, didFinishLaunchingWithOptions : [UIApplicationLaunchOptionsKey : Any]?) -> Bool (AppDelegate.swift:36)
22 MyApp                          0x10038cc88 @objc AppDelegate.application(UIApplication, didFinishLaunchingWithOptions : [UIApplicationLaunchOptionsKey : Any]?) -> Bool (AppDelegate.swift)
23 UIKit                          0x18794de48 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 380
24 UIKit                          0x187b5a37c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3452
25 UIKit                          0x187b5fe24 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1684
26 UIKit                          0x187b748b0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3147 + 48
27 UIKit                          0x187b5d0b8 -[UIApplication workspaceDidEndTransaction:] + 168
28 FrontBoardServices             0x183354884 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
29 FrontBoardServices             0x1833546f0 -[FBSSerialQueue _performNext] + 176
30 FrontBoardServices             0x183354aa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
31 libswiftCoreData.dylib         0x18175942c (Missing)
32 libswiftCoreData.dylib         0x181758d9c (Missing)
33 libswiftCoreData.dylib         0x1817569a8 (Missing)
34 libswiftCoreData.dylib         0x181686da4 (Missing)
35 UIKit                          0x187946fc8 -[UIApplication _run] + 652
36 UIKit                          0x187941c9c UIApplicationMain + 208
37 MyApp                          0x10038ddb8 main (AppDelegate.swift:12)
38 libswiftCoreData.dylib         0x18069559c (Missing)
#2. FIRAMonitorQueue
0  libswiftCoreData.dylib         0x1807a3e70 (Missing)
1  libswiftCoreData.dylib         0x180872070 (Missing)
2  libswiftCoreData.dylib         0x1802156dc (Missing)
3  libswiftCoreData.dylib         0x1802155cc (Missing)
4  libswiftCoreData.dylib         0x180220478 (Missing)
5  MyApp                          0x1006429f4 -[FIRAMonitor saveMonitoringDataToUserDefaultsOnMonitorQueue] + 4301924852
6  libswiftCoreData.dylib         0x1806629e0 (Missing)
7  libswiftCoreData.dylib         0x1806629a0 (Missing)
8  libswiftCoreData.dylib         0x180670ad4 (Missing)
9  libswiftCoreData.dylib         0x1806662cc (Missing)
10 libswiftCoreData.dylib         0x180672a50 (Missing)
11 libswiftCoreData.dylib         0x1806727d0 (Missing)
12 libswiftCoreData.dylib         0x18086b100 (Missing)
13 libswiftCoreData.dylib         0x18086acac (Missing)
#6. FIRAnalyticsQueue
0  MyApp                          0x100632000 -[FIRAMeasurement initWithOptions:] + 4301856768
1  MyApp                          0x100631310 __55+[FIRAMeasurement initializeSharedInstanceWithOptions:]_block_invoke + 4301853456
2  libswiftCoreData.dylib         0x1806629a0 (Missing)
3  libswiftCoreData.dylib         0x1806636cc (Missing)
4  MyApp                          0x10063127c +[FIRAMeasurement initializeSharedInstanceWithOptions:] + 4301853308
5  MyApp                          0x100648888 __47+[FIRAnalytics startWithConfiguration:options:]_block_invoke_2 + 4301949064
6  libswiftCoreData.dylib         0x1806629e0 (Missing)
7  libswiftCoreData.dylib         0x1806629a0 (Missing)
8  libswiftCoreData.dylib         0x180670ad4 (Missing)
9  libswiftCoreData.dylib         0x1806662cc (Missing)
10 libswiftCoreData.dylib         0x180672a50 (Missing)
11 libswiftCoreData.dylib         0x1806727d0 (Missing)
12 libswiftCoreData.dylib         0x18086b100 (Missing)
13 libswiftCoreData.dylib         0x18086acac (Missing)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions