Skip to content

Firebase messaging caused iOS Unity app crash on startup (4.0.2, not always, rendering) #104

@sigono-chao3

Description

@sigono-chao3

Hello, we installed Firebase 4.0.2 to our Unity game. And it works quite well. However, when we try to send our game for Apple review, the reviewer said our game crashed on startup. The call stack shows the app crashed somewhere in Unity Metal code, and we ended up forcing our game running on OpenGL ES3. Today we got it reproduced in house and it seems related to how Firebase invokes Unity rendering API and I would like to report it:

Unity version: 5.6.3f1 (macOS 10.12.5)
Device: iPhone5 A1429

Device log:

Aug 22 11:52:33 Sigono-de-iPhone heaven01(Foundation)[679] <Notice>: *** Assertion failure in -[UnityAppController renderingAPI], /Users/sigono/workspace/workspace/Heaven_iOS/Builds/iOS/Classes/UnityAppController+Rendering.mm:138 Aug 22 11:52:33 Sigono-de-iPhone heaven01[679] <Notice>: Uncaught exception: NSInternalInconsistencyException: [UnityAppController renderingAPI] called before [UnityAppController selectRenderingApi] 

Symbolicated main thread call stack

Hardware Model: iPhone5,2 OS Version: iPhone OS 10.2 (14C92) Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Application Specific Information: abort() called Filtered syslog: None found Last Exception Backtrace: 0 CoreFoundation	0x1cc5cdf2 __exceptionPreprocess + 126 1 libobjc.A.dylib	0x1bebf072 objc_exception_throw + 34 2 CoreFoundation	0x1cc5cccc +[NSException raise:format:arguments:] + 92 3 Foundation	0x1d55792c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 88 4 heaven01	0x000cdb04 -[UnityAppController(Rendering) renderingAPI] (UnityAppController+Rendering.mm:138) 5 heaven01	0x000df6b4 -[UnityAppController application:didFinishLaunchingWithOptions:] (UnityAppController.mm:247) 6 heaven01	0x015ed6ee firebase::messaging::AppDelegateApplicationDidFinishLaunchingWithOptions(objc_object*, objc_selector*, UIApplication*, NSDictionary*) + 398 7 UIKit	0x21d7a72e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 394 8 UIKit	0x21f86e24 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3740 9 UIKit	0x21f8c442 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1708 10 UIKit	0x21f9f12c __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3141 + 36 11 UIKit	0x21f89828 -[UIApplication workspaceDidEndTransaction:] + 142 12 FrontBoardServices	0x1e5529ae __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 14 13 FrontBoardServices	0x1e552868 -[FBSSerialQueue _performNext] + 216 14 FrontBoardServices	0x1e552b52 -[FBSSerialQueue _performNextFromRunLoopSource] + 40 15 CoreFoundation	0x1cc18716 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8 16 CoreFoundation	0x1cc18220 __CFRunLoopDoSources0 + 434 17 CoreFoundation	0x1cc164f6 __CFRunLoopRun + 758 18 CoreFoundation	0x1cb6552e CFRunLoopRunSpecific + 482 19 CoreFoundation	0x1cb6533c CFRunLoopRunInMode + 100 20 UIKit	0x21d73ebc -[UIApplication _run] + 724 21 UIKit	0x21d6e54c UIApplicationMain + 146 22 heaven01	0x000c55ea main (main.mm:33) 23 libdyld.dylib	0x1c32f506 _dyld_process_info_notify_release + 24 

Thank you very much for your help

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions