firebase-ios-sdk: iOS 9 crashes after Xcode 11.4

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.4
  • Firebase SDK version: 6.9.0
  • Firebase Component: Analytics
  • Component version: 6.1.2
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

I haven’t updated Firebase/Analytics SDK in a while, but yesterday I started gettings tons of new crashes in many parts of the SDK after updating my app. The updated app was built with Xcode 11.4, which I suspect is the issue because I didn’t change anything related to the SDK itself or the usage of the SDK.

Steps to reproduce:

These crashes are mostly on iOS 9, although I see a few on iOS 10 as well. I’m having trouble reproing them, so all crash reports are from production.

Crash Traces

Here are some crash traces This one has 26 crashes so far: com.scribbletogether.scribble_issue_crash_7e178704a3ad4bfeb8f00348edf9667b_DNE_0_v2.txt

Most of the rest of the crashes are one-off. Each crash trace is unique. There are ~90 issues each one with a new unique trace. Screen Shot 2020-03-31 at 9 44 22 AM Here is an example of one: APMDatabase Crash

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (5 by maintainers)

Most upvoted comments

From the Xcode 11.5 Beta release notes: Fixed an issue with incorrect code generation when targeting armv7 devices. (61901594)

Going to mark this resolved by avoiding Xcode 11.4 with either earlier or later Xcode versions.

I re-released with Xcode 11.3.1 and an updated Firebase. The crashes have stopped. I’m not sure which solution was the actual fix. I ordered an iPad 2 to investigate more.

Sent with GitHawk

Unfortunately the crashes seem to persist when built with the new Xcode version 11.4.1

I’m suspecting a compiler bug. If it helps, Firebase wasn’t the only library crashing. I was also getting a lot of crashes in the Branch SDK, which doesn’t user SQLite. This method was crashing a lot. This and the Firebase crashes would happen to users immediately after opening the app, even after restarting the device.

com.apple.root.default-qos
0  libsystem_kernel.dylib         0x24272920 semaphore_wait_trap + 8
1  libsystem_platform.dylib       0x243273a5 _os_semaphore_wait + 12
2  libdispatch.dylib              0x24179b9f _dispatch_sync_f_slow + 230
3  libdispatch.dylib              0x241726d9 dispatch_sync_f$VARIANT$mp + 108
4  Scribble                       0x1fd98d -[Branch getLatestReferringParamsSynchronous] + 1425 (Branch.m:14

Sent with GitHawk

I am also facing this issue since I updated to XCode 11.4. I am using Core Data with an SQLite store in my app. The issue also persists after updating the pods to the latest versions. It seems the crashes are only appearing on 32 bit devices with low memory remaining. A colleague has an iPad 3 with iOS 9 and can reproduce the crashes. Unfortunately I don’t have access to this device atm due to home office.

PODS:

  • Crashlytics (3.14.0):
    • Fabric (~> 1.10.2)
  • Fabric (1.10.2)
  • Firebase/Analytics (6.21.0):
    • Firebase/Core
  • Firebase/Core (6.21.0):
    • Firebase/CoreOnly
    • FirebaseAnalytics (= 6.4.0)
  • Firebase/CoreOnly (6.21.0):
    • FirebaseCore (= 6.6.5)
  • FirebaseAnalytics (6.4.0):
    • FirebaseCore (~> 6.6)
    • FirebaseInstallations (~> 1.1)
    • GoogleAppMeasurement (= 6.4.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    • GoogleUtilities/MethodSwizzler (~> 6.0)
    • GoogleUtilities/Network (~> 6.0)
    • “GoogleUtilities/NSData+zlib (~> 6.0)”
    • nanopb (= 0.3.9011)
  • FirebaseCore (6.6.5):
    • FirebaseCoreDiagnostics (~> 1.2)
    • FirebaseCoreDiagnosticsInterop (~> 1.2)
    • GoogleUtilities/Environment (~> 6.5)
    • GoogleUtilities/Logger (~> 6.5)
  • FirebaseCoreDiagnostics (1.2.2):
    • FirebaseCoreDiagnosticsInterop (~> 1.2)
    • GoogleDataTransportCCTSupport (~> 2.0)
    • GoogleUtilities/Environment (~> 6.5)
    • GoogleUtilities/Logger (~> 6.5)
    • nanopb (~> 0.3.901)
  • FirebaseCoreDiagnosticsInterop (1.2.0)
  • FirebaseInstallations (1.1.1):
    • FirebaseCore (~> 6.6)
    • GoogleUtilities/UserDefaults (~> 6.5)
    • PromisesObjC (~> 1.2)
  • GoogleAppMeasurement (6.4.0):
    • GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    • GoogleUtilities/MethodSwizzler (~> 6.0)
    • GoogleUtilities/Network (~> 6.0)
    • “GoogleUtilities/NSData+zlib (~> 6.0)”
    • nanopb (= 0.3.9011)
  • GoogleDataTransport (5.1.0)
  • GoogleDataTransportCCTSupport (2.0.1):
    • GoogleDataTransport (~> 5.1)
    • nanopb (~> 0.3.901)
  • GoogleUtilities/AppDelegateSwizzler (6.5.2):
    • GoogleUtilities/Environment
    • GoogleUtilities/Logger
    • GoogleUtilities/Network
  • GoogleUtilities/Environment (6.5.2)
  • GoogleUtilities/Logger (6.5.2):
    • GoogleUtilities/Environment
  • GoogleUtilities/MethodSwizzler (6.5.2):
    • GoogleUtilities/Logger
  • GoogleUtilities/Network (6.5.2):
    • GoogleUtilities/Logger
    • “GoogleUtilities/NSData+zlib”
    • GoogleUtilities/Reachability
  • “GoogleUtilities/NSData+zlib (6.5.2)”
  • GoogleUtilities/Reachability (6.5.2):
    • GoogleUtilities/Logger
  • GoogleUtilities/UserDefaults (6.5.2):
    • GoogleUtilities/Logger
  • HTMLString (5.0.0)
  • libxlsxwriter (0.9.4)
  • nanopb (0.3.9011):
    • nanopb/decode (= 0.3.9011)
    • nanopb/encode (= 0.3.9011)
  • nanopb/decode (0.3.9011)
  • nanopb/encode (0.3.9011)
  • PromisesObjC (1.2.8)
  • Starscream (3.0.6)

Is this reproducible on 6.21.0? iirc Analytics had a few sqlite crash fixes in the releases between 6.9.0 and now.