Skip to content

GDTUploadCoordinator initWithCoder crash on 6.7.0 #3676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mars-lan opened this issue Aug 24, 2019 · 10 comments · Fixed by #3689
Closed

GDTUploadCoordinator initWithCoder crash on 6.7.0 #3676

mars-lan opened this issue Aug 24, 2019 · 10 comments · Fixed by #3689
Assignees

Comments

@mars-lan
Copy link

mars-lan commented Aug 24, 2019

Xcode version: 10.3
Firebase SDK version: 6.7.0
Firebase Component:
Using FirebaseAnalytics (6.1.1)
Using FirebaseAuth (6.2.3)
Using FirebaseCore (6.2.1)
Using FirebaseCoreDiagnostics (1.0.1)
Using FirebaseCoreDiagnosticsInterop (1.0.0)
Using Google-Mobile-Ads-SDK (7.49.0)
Using GoogleAppMeasurement (6.1.1)
Using GoogleDataTransport (1.1.2)
Using GoogleDataTransportCCTSupport (1.0.2)
Using GoogleUtilities (6.2.5)

Problem:
#3623 seems to be fixed after upgrading to firebase 6.7.0, but a new kind of crash starts appearing with the following stack trace. Seems to happen 100% of time in background.

Fatal Exception: NSInvalidArgumentException
*** -[NSDictionary initWithObjects:forKeys:]: count of objects (0) differs from count of keys (1)
0
CoreFoundation
__exceptionPreprocess
1
libobjc.A.dylib
objc_exception_throw
2
CoreFoundation
_CFArgv
3
CoreFoundation
-[NSDictionary initWithObjects:forKeys:]
4
Foundation
_decodeObjectBinary
5
Foundation
_decodeObject
6
Foundation
-[NSKeyedUnarchiver decodeObjectOfClasses:forKey:]
7
xxxxxxxx
-[GDTUploadCoordinator initWithCoder:]
8
Foundation
_decodeObjectBinary
9
Foundation
_decodeObject
10
Foundation
-[NSKeyedUnarchiver decodeObjectOfClasses:forKey:]
11
xxxxxxxx
__28-[GDTStorage initWithCoder:]_block_invoke
12
libdispatch.dylib
_dispatch_client_callout
13
libdispatch.dylib
_dispatch_queue_barrier_sync_invoke_and_complete
14
xxxxxxxx
-[GDTStorage initWithCoder:]
15
Foundation
_decodeObjectBinary
16
Foundation
_decodeObject
17
Foundation
-[NSKeyedUnarchiver decodeObjectOfClasses:forKey:]
18
Foundation
-[NSCoder(Exceptions) __tryDecodeObjectForKey:error:decodeBlock:]
19
Foundation
-[NSCoder decodeTopLevelObjectOfClasses:forKey:error:]
20
Foundation
+[NSKeyedUnarchiver(NSKeyedUnarchiverSecureInitializer) unarchivedObjectOfClass:fromData:error:]
21
xxxxxxxx
-[GDTStorage appWillForeground:]
22
xxxxxxxx
-[GDTLifecycle applicationWillEnterForeground:]
23
CoreFoundation
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
24
CoreFoundation
_CFXRegistrationPost
25
CoreFoundation
___CFXNotificationPost_block_invoke
26
CoreFoundation
-[_CFXNotificationRegistrar find:object:observer:enumerator:]
27
CoreFoundation
_CFXNotificationPost
28
Foundation
-[NSNotificationCenter postNotificationName:object:userInfo:]
29
xxxxxxxx
-[GDTApplication iOSApplicationWillEnterForeground:]
@paulb777
Copy link
Member

@mars-lan Thanks for the report. We'll investigate. Is there a pattern about iOS version for the crashes?

@mars-lan
Copy link
Author

@paulb777 good point! So far all iOS 11.

@mikehaney24
Copy link
Contributor

Any specific version of iOS 11? Or just any iOS 11 version?

@pepejeria
Copy link

Seeing this as well. Only iOS 11 users so far.

@mars-lan
Copy link
Author

@mikehaney24 Seeing crashes on both 11.1 & 11.2

@js
Copy link

js commented Aug 26, 2019

Seeing this as well, only on 11.2.6 & 11.1.1 so far

crash report

Fatal Exception: NSInvalidArgumentException
*** -[NSDictionary initWithObjects:forKeys:]: count of objects (0) differs from count of keys (1)

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x18342dd04 __exceptionPreprocess
1 libobjc.A.dylib 0x18267c528 objc_exception_throw
2 CoreFoundation 0x1833c6bd4 _CFArgv
3 CoreFoundation 0x18334fe88 -[NSDictionary initWithObjects:forKeys:]
4 Foundation 0x183d741b0 _decodeObjectBinary
5 Foundation 0x183d73948 _decodeObject
6 Foundation 0x183d7644c -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:]
7 Bysykkel 0x105455330 -[GDTUploadCoordinator initWithCoder:] + 167 (GDTUploadCoordinator.m:167)
8 Foundation 0x183d741b0 _decodeObjectBinary
9 Foundation 0x183d73948 _decodeObject
10 Foundation 0x183d7644c -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:]
11 Bysykkel 0x105453218 __28-[GDTStorage initWithCoder:]_block_invoke + 294 (GDTStorage.m:294)
12 libdispatch.dylib 0x182db1048 _dispatch_client_callout
13 libdispatch.dylib 0x182db9ae8 _dispatch_queue_barrier_sync_invoke_and_complete
14 Bysykkel 0x10545302c -[GDTStorage initWithCoder:] + 284 (GDTStorage.m:284)
15 Foundation 0x183d741b0 _decodeObjectBinary
16 Foundation 0x183d73948 _decodeObject
17 Foundation 0x183d7644c -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:]
18 Foundation 0x183da7f98 -[NSCoder(Exceptions) __tryDecodeObjectForKey:error:decodeBlock:]
19 Foundation 0x183da7b68 -[NSCoder decodeTopLevelObjectOfClasses:forKey:error:]
20 Foundation 0x183de9ee0 +[NSKeyedUnarchiver(NSKeyedUnarchiverSecureInitializer) unarchivedObjectOfClass:fromData:error:]
21 Bysykkel 0x105452b08 -[GDTStorage appWillForeground:] + 215 (GDTStorage.m:215)
22 Bysykkel 0x10544fff0 -[GDTLifecycle applicationWillEnterForeground:] + 93 (GDTLifecycle.m:93)
23 CoreFoundation 0x1833c00bc CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER
24 CoreFoundation 0x1833bf65c _CFXRegistrationPost
25 CoreFoundation 0x1833bf3c0 ___CFXNotificationPost_block_invoke
26 CoreFoundation 0x18343c9c4 -[_CFXNotificationRegistrar find:object:observer:enumerator:]
27 CoreFoundation 0x1832f60c0 _CFXNotificationPost
28 Foundation 0x183d17498 -[NSNotificationCenter postNotificationName:object:userInfo:]
29 Bysykkel 0x105450700 -[GDTApplication iOSApplicationWillEnterForeground:] + 156 (GDTPlatform.m:156)
30 CoreFoundation 0x1833c00bc CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER
31 CoreFoundation 0x1833bf65c _CFXRegistrationPost
32 CoreFoundation 0x1833bf3c0 ___CFXNotificationPost_block_invoke
33 CoreFoundation 0x18343c9c4 -[_CFXNotificationRegistrar find:object:observer:enumerator:]
34 CoreFoundation 0x1832f60c0 _CFXNotificationPost
35 Foundation 0x183d17498 -[NSNotificationCenter postNotificationName:object:userInfo:]
36 UIKit 0x18caa1b50 -[UIApplication _sendWillEnterForegroundCallbacks]
37 UIKit 0x18cd62fb0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:]
38 UIKit 0x18d4de4b8 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
39 UIKit 0x18d4de35c -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]
40 UIKit 0x18d250294 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
41 UIKit 0x18d3e70ac _performActionsWithDelayForTransitionContext
42 UIKit 0x18d250144 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
43 UIKit 0x18d0362d8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:]
44 UIKit 0x18ced8d68 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
45 FrontBoardServices 0x185ada20c __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.362
46 libdispatch.dylib 0x182db1048 _dispatch_client_callout
47 libdispatch.dylib 0x182db86c8 _dispatch_block_invoke_direct$VARIANT$mp
48 FrontBoardServices 0x185b0d9f4 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK
49 FrontBoardServices 0x185b0d698 -[FBSSerialQueue _performNext]
50 FrontBoardServices 0x185b0dc34 -[FBSSerialQueue _performNextFromRunLoopSource]
51 CoreFoundation 0x1833d62e8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
52 CoreFoundation 0x1833d6268 __CFRunLoopDoSource0
53 CoreFoundation 0x1833d5af0 __CFRunLoopDoSources0
54 CoreFoundation 0x1833d36c8 __CFRunLoopRun
55 CoreFoundation 0x1832f3fb8 CFRunLoopRunSpecific
56 GraphicsServices 0x18518bf84 GSEventRunModal
57 UIKit 0x18c8c82f4 UIApplicationMain
58 Bysykkel 0x104f57b74 main + 18 (main.swift:18)
59 libdyld.dylib 0x182e1656c start

@mikehaney24
Copy link
Contributor

Thanks for the detailed reports everyone! I hope to have the fix implemented today with an out-of-band update pushed out soon thereafter.

@mikehaney24
Copy link
Contributor

GoogleDataTransport 1.1.3 was just released, it should hopefully address this crash. Please open more issues or reopen this one if you encounter new issues or if this one isn't resolved!

@craigomac
Copy link

Is it correct that this still generates at least a runtime issue in the "undefined behaviour sanitiser"?

image

@paulb777
Copy link
Member

@craigomac Thanks! Fix PR at #3910

@firebase firebase locked and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants