GDTCORStorage.m line 312 `-[GDTCORStorage encodeWithCoder:]`

  • Xcode version: 11.3 (11C29
  • Firebase SDK version: 6.13.0
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000e037cb690
-[GDTCORStorage encodeWithCoder:]

CoreUI: deallocating _CUIInternalLinkRendition 7600 /private/var/containers/Bundle/Application/84BEFDCB-5A0B-4345-B15B-FFE9E99C0CD2/MyApp.app/Assets.car

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x1a3ae0fb0 objc_msgSend + 16
1  Foundation                     0x1a418664c _encodeObject + 212
2  Foundation                     0x1a4105aec -[NSOrderedSet(NSOrderedSet) encodeWithCoder:] + 268
3  Foundation                     0x1a4186a34 _encodeObject + 1212
4  MyInternalAppCoreServices                0x10567f90c -[GDTCORStorage encodeWithCoder:] + 312 (GDTCORStorage.m:312)
5  Foundation                     0x1a4186a34 _encodeObject + 1212
6  Foundation                     0x1a4099e8c +[NSKeyedArchiver archivedDataWithRootObject:requiringSecureCoding:error:] + 116
7  MyInternalAppCoreServices                0x10567f554 -[GDTCORStorage appWillTerminate:] + 261 (GDTCORStorage.m:261)
8  MyInternalAppCoreServices                0x10567cb88 -[GDTCORLifecycle applicationWillTerminate:] + 109 (GDTCORLifecycle.m:109)
9  Foundation                     0x1a419706c __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 28
10 CoreFoundation                 0x1a3d2499c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
11 CoreFoundation                 0x1a3d249ec ___CFXRegistrationPost1_block_invoke + 68
12 CoreFoundation                 0x1a3d23ce4 _CFXRegistrationPost1 + 396
13 CoreFoundation                 0x1a3d2397c ___CFXNotificationPost_block_invoke + 108
14 CoreFoundation                 0x1a3c9c910 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1424
15 CoreFoundation                 0x1a3d232ac _CFXNotificationPost + 1268
16 Foundation                     0x1a4085bfc -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
17 MyInternalAppCoreServices                0x10567d158 -[GDTCORApplication iOSApplicationWillTerminate:] + 164 (GDTCORPlatform.m:164)
18 Foundation                     0x1a419706c __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 28
19 CoreFoundation                 0x1a3d2499c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
20 CoreFoundation                 0x1a3d249ec ___CFXRegistrationPost1_block_invoke + 68
21 CoreFoundation                 0x1a3d23ce4 _CFXRegistrationPost1 + 396
22 CoreFoundation                 0x1a3d2397c ___CFXNotificationPost_block_invoke + 108
23 CoreFoundation                 0x1a3c9c910 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1424
24 CoreFoundation                 0x1a3d232ac _CFXNotificationPost + 1268
25 Foundation                     0x1a4085bfc -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
26 UIKitCore                      0x1a7ec00d8 -[UIApplication _terminateWithStatus:] + 304
27 UIKitCore                      0x1a765183c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128
28 UIKitCore                      0x1a7651498 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 220
29 UIKitCore                      0x1a7eb62b4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 216
30 FrontBoardServices             0x1a8fa798c -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 88
31 FrontBoardServices             0x1a8fd5264 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2 + 80
32 FrontBoardServices             0x1a8fb9ef4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
33 FrontBoardServices             0x1a8fd51f0 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke + 140
34 libdispatch.dylib              0x1a3a71fd8 _dispatch_client_callout + 20
35 libdispatch.dylib              0x1a3a74d1c _dispatch_block_invoke_direct + 264
36 FrontBoardServices             0x1a8ffc254 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
37 FrontBoardServices             0x1a8ffbf00 -[FBSSerialQueue _queue_performNextIfPossible] + 432
38 FrontBoardServices             0x1a8ffc46c -[FBSSerialQueue _performNextFromRunLoopSource] + 32
39 CoreFoundation                 0x1a3d48108 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
40 CoreFoundation                 0x1a3d4805c __CFRunLoopDoSource0 + 84
41 CoreFoundation                 0x1a3d477c8 __CFRunLoopDoSources0 + 184
42 CoreFoundation                 0x1a3d42694 __CFRunLoopRun + 1068
43 CoreFoundation                 0x1a3d41f40 CFRunLoopRunSpecific + 480
44 GraphicsServices               0x1adfbf534 GSEventRunModal + 108
45 UIKitCore                      0x1a7ebaa60 UIApplicationMain + 1940
46 MyMyInternalApp                          0x10425f5fc main + 14 (LogoutResponder.swift:14)
47 libdyld.dylib                  0x1a3bc0e18 start + 4

Podfile.lock

PODS:
  - Alamofire (4.9.1)
  - Crashlytics (3.14.0):
    - Fabric (~> 1.10.2)
  - CryptoSwift (1.2.0)
  - DifferenceKit (1.1.4):
    - DifferenceKit/Core (= 1.1.4)
    - DifferenceKit/UIKitExtension (= 1.1.4)
  - DifferenceKit/Core (1.1.4)
  - DifferenceKit/UIKitExtension (1.1.4):
    - DifferenceKit/Core
  - Fabric (1.10.2)
  - Firebase/Core (6.13.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.1.6)
  - Firebase/CoreOnly (6.13.0):
    - FirebaseCore (= 6.4.0)
  - Firebase/Performance (6.13.0):
    - Firebase/CoreOnly
    - FirebasePerformance (~> 3.1.7)
  - Firebase/RemoteConfig (6.13.0):
    - Firebase/CoreOnly
    - FirebaseRemoteConfig (~> 4.4.5)
  - FirebaseABTesting (3.1.2):
    - FirebaseAnalyticsInterop (~> 1.3)
    - FirebaseCore (~> 6.1)
    - Protobuf (>= 3.9.2, ~> 3.9)
  - FirebaseAnalytics (6.1.6):
    - FirebaseCore (~> 6.4)
    - FirebaseInstanceID (~> 4.2)
    - GoogleAppMeasurement (= 6.1.6)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - FirebaseAnalyticsInterop (1.4.0)
  - FirebaseCore (6.4.0):
    - FirebaseCoreDiagnostics (~> 1.0)
    - FirebaseCoreDiagnosticsInterop (~> 1.0)
    - GoogleUtilities/Environment (~> 6.2)
    - GoogleUtilities/Logger (~> 6.2)
  - FirebaseCoreDiagnostics (1.1.2):
    - FirebaseCoreDiagnosticsInterop (~> 1.0)
    - GoogleDataTransportCCTSupport (~> 1.0)
    - GoogleUtilities/Environment (~> 6.2)
    - GoogleUtilities/Logger (~> 6.2)
    - nanopb (~> 0.3.901)
  - FirebaseCoreDiagnosticsInterop (1.1.0)
  - FirebaseInstanceID (4.2.7):
    - FirebaseCore (~> 6.0)
    - GoogleUtilities/Environment (~> 6.0)
    - GoogleUtilities/UserDefaults (~> 6.0)
  - FirebasePerformance (3.1.7):
    - FirebaseCore (~> 6.4)
    - FirebaseInstanceID (~> 4.2)
    - FirebaseRemoteConfig (~> 4.4)
    - GoogleToolboxForMac/Logger (~> 2.1)
    - "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
    - GoogleUtilities/Environment (~> 6.2)
    - GoogleUtilities/ISASwizzler (~> 6.2)
    - GoogleUtilities/MethodSwizzler (~> 6.2)
    - GTMSessionFetcher/Core (~> 1.1)
    - Protobuf (~> 3.9)
  - FirebaseRemoteConfig (4.4.5):
    - FirebaseABTesting (~> 3.1)
    - FirebaseAnalyticsInterop (~> 1.4)
    - FirebaseCore (~> 6.2)
    - FirebaseInstanceID (~> 4.2)
    - GoogleUtilities/Environment (~> 6.2)
    - "GoogleUtilities/NSData+zlib (~> 6.2)"
    - Protobuf (>= 3.9.2, ~> 3.9)
  - GoogleAnalytics (3.17.0)
  - GoogleAppMeasurement (6.1.6):
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - GoogleDataTransport (3.2.0)
  - GoogleDataTransportCCTSupport (1.2.2):
    - GoogleDataTransport (~> 3.2)
    - nanopb (~> 0.3.901)
  - GoogleSymbolUtilities (1.1.2)
  - GoogleTagManager (7.1.2):
    - FirebaseAnalytics (~> 6.0)
    - GoogleAnalytics (~> 3.17)
    - GoogleUtilitiesLegacy (~> 1.3)
  - GoogleToolboxForMac/Defines (2.2.2)
  - GoogleToolboxForMac/Logger (2.2.2):
    - GoogleToolboxForMac/Defines (= 2.2.2)
  - "GoogleToolboxForMac/NSData+zlib (2.2.2)":
    - GoogleToolboxForMac/Defines (= 2.2.2)
  - GoogleUtilities/AppDelegateSwizzler (6.3.2):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (6.3.2)
  - GoogleUtilities/ISASwizzler (6.3.2)
  - GoogleUtilities/Logger (6.3.2):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (6.3.2):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (6.3.2):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (6.3.2)"
  - GoogleUtilities/Reachability (6.3.2):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (6.3.2):
    - GoogleUtilities/Logger
  - GoogleUtilitiesLegacy (1.3.2):
    - GoogleSymbolUtilities (~> 1.1)
  - GTMSessionFetcher/Core (1.3.0)
  - MyInternalAppPaySDK (4.4.0):
    - Alamofire
    - CryptoSwift
  - iOSSnapshotTestCase (6.1.0):
    - iOSSnapshotTestCase/SwiftSupport (= 6.1.0)
  - iOSSnapshotTestCase/Core (6.1.0)
  - iOSSnapshotTestCase/SwiftSupport (6.1.0):
    - iOSSnapshotTestCase/Core
  - KeychainSwift (12.0.0)
  - Kingfisher (4.10.0)
  - lottie-ios (3.1.2)
  - nanopb (0.3.9011):
    - nanopb/decode (= 0.3.9011)
    - nanopb/encode (= 0.3.9011)
  - nanopb/decode (0.3.9011)
  - nanopb/encode (0.3.9011)
  - Protobuf (3.11.1)
  - RxSwift (5.0.1)
  - RxTest (5.0.1):
    - RxSwift (~> 5)
  - SwiftFormat/CLI (0.42.0)
  - SwiftLint (0.27.0)

DEPENDENCIES:
  - Crashlytics
  - DifferenceKit
  - Firebase/Core (~> 6.13.0)
  - Firebase/Performance (~> 6.13.0)
  - Firebase/RemoteConfig (~> 6.13.0)
  - GoogleTagManager
  - "MyInternalAppPaySDK (from `git@git.MyInternalApp.com:pos-dev/MyInternalAppPaySDK_iOS.git`, tag `4.4.0`)"
  - iOSSnapshotTestCase (from `https://github.com/Harmek/ios-snapshot-test-case.git`)
  - KeychainSwift (= 12.0.0)
  - Kingfisher (= 4.10.0)
  - lottie-ios (= 3.1.2)
  - RxSwift (~> 5.0.0)
  - RxTest
  - SwiftFormat/CLI
  - SwiftLint (= 0.27.0)

SPEC REPOS:
  https://github.com/cocoapods/specs.git:
    - Alamofire
    - Crashlytics
    - CryptoSwift
    - DifferenceKit
    - Fabric
    - Firebase
    - FirebaseABTesting
    - FirebaseAnalytics
    - FirebaseAnalyticsInterop
    - FirebaseCore
    - FirebaseCoreDiagnostics
    - FirebaseCoreDiagnosticsInterop
    - FirebaseInstanceID
    - FirebasePerformance
    - FirebaseRemoteConfig
    - GoogleAnalytics
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleDataTransportCCTSupport
    - GoogleSymbolUtilities
    - GoogleTagManager
    - GoogleToolboxForMac
    - GoogleUtilities
    - GoogleUtilitiesLegacy
    - GTMSessionFetcher
    - KeychainSwift
    - Kingfisher
    - lottie-ios
    - nanopb
    - Protobuf
    - RxSwift
    - RxTest
    - SwiftFormat
    - SwiftLint

EXTERNAL SOURCES:
  MyInternalAppPaySDK:
    :git: "git@git.MyInternalApp.com:pos-dev/MyInternalAppPaySDK_iOS.git"
    :tag: 4.4.0
  iOSSnapshotTestCase:
    :git: https://github.com/Harmek/ios-snapshot-test-case.git

CHECKOUT OPTIONS:
  MyInternalAppPaySDK:
    :git: "git@git.MyInternalApp.com:pos-dev/MyInternalAppPaySDK_iOS.git"
    :tag: 4.4.0
  iOSSnapshotTestCase:
    :commit: b608fdc7d672d3c732d0e0d5261332db0fba932d
    :git: https://github.com/Harmek/ios-snapshot-test-case.git

SPEC CHECKSUMS:
  Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
  Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df
  CryptoSwift: 40e374e45291d8dceedcb0d6184da94533eaabdf
  DifferenceKit: d7e8a7edd2ae706f1e1f05c8103d4cf858e04b78
  Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74
  Firebase: 458d109512200d1aca2e1b9b6cf7d68a869a4a46
  FirebaseABTesting: 0d10f3cdc3fa00f3f175b5b56c1003c8e888299f
  FirebaseAnalytics: 45f36d9c429fc91d206283900ab75390cd05ee8a
  FirebaseAnalyticsInterop: d48b6ab67bcf016a05e55b71fc39c61c0cb6b7f3
  FirebaseCore: 307ea2508df730c5865334e41965bd9ea344b0e5
  FirebaseCoreDiagnostics: 511f4f3ed7d440bb69127e8b97c2bc8befae639e
  FirebaseCoreDiagnosticsInterop: e9b1b023157e3a2fc6418b5cb601e79b9af7b3a0
  FirebaseInstanceID: ebd2ea79ee38db0cb5f5167b17a0d387e1cc7b6e
  FirebasePerformance: 22273a775eaed4cd3e072c9b88396a5e4b285c3f
  FirebaseRemoteConfig: 6ad68503c04701b8d9d709240711bc0bf6edaf94
  GoogleAnalytics: f42cc53a87a51fe94334821868d9c8481ff47a7b
  GoogleAppMeasurement: dfe55efa543e899d906309eaaac6ca26d249862f
  GoogleDataTransport: 8e9b210c97d55fbff306cc5468ff91b9cb32dcf5
  GoogleDataTransportCCTSupport: ef79a4728b864946a8aafdbab770d5294faf3b5f
  GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
  GoogleTagManager: 1821fef94a9648b63c6c3469077adcba4bff8dee
  GoogleToolboxForMac: 800648f8b3127618c1b59c7f97684427630c5ea3
  GoogleUtilities: 547a86735c6f0ee30ad17e94df4fc21f616b71cb
  GoogleUtilitiesLegacy: 5501bedec1646bd284286eb5fc9453f7e23a12f4
  GTMSessionFetcher: 43b8b64263023d4f32caa0b40f4c8bfa3c5f36d8
  MyInternalAppPaySDK: ef8dfd0cb2d64924b181a0f617eff6b9472a6219
  iOSSnapshotTestCase: 7de154eb02641691d553d832c66bcff9a45c4414
  KeychainSwift: d5e776578587ee5958ce36601df22f168f65138a
  Kingfisher: 43c4b802d8b5256cf1f4379e9cd10b329be6d3e2
  lottie-ios: 49cd85b1f24f61a7708ad7ec76a523ab2d0e3100
  nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
  Protobuf: 20d79da7f20b5928b80043b05080b816e802659e
  RxSwift: e2dc62b366a3adf6a0be44ba9f405efd4c94e0c4
  RxTest: 0132f952a61da82d5233abedaa559df91e5330e5
  SwiftFormat: 5faa819600268dfaa5c19f1359730883db151678
  SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073

PODFILE CHECKSUM: ca26942263baf055f72116e1ad2764308b6b778a

COCOAPODS: 1.7.5

Getting a very small number of reported crashes on this. Might be related to #4280.

1 possible answer(s) on “GDTCORStorage.m line 312 `-[GDTCORStorage encodeWithCoder:]`

  1. Doh, I was missing a dispatch_sync in appWillTerminate. Thanks for the test case, I’ll include it in a PR shortly. Double checked: all the other singletons have dispatch_syncs in them to finish work.