firebase-unity-sdk: [Bug] Unity crashes often when entering play mode due to the Firebase SDK
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.3.23f1
- Firebase Unity SDK version: 10.6.0
- Source you installed the SDK: Unity Package
- Problematic Firebase Component: FirebaseCppApp
- Other Firebase Components in use: Auth, Analytics, Functions, Crashalytics, RemoteConfig
- Additional SDKs you are using: IronSource and a bunch of assets from the Asset Store (but the crash is very clearly due to Firebase)
- Platform you are using the Unity editor on: Windows & Mac
- Platform you are targeting: iOS & Android
- Scripting Runtime: IL2CPP
- Pre-built SDK from the website or open-source from this repo: Website
[REQUIRED] Please describe the issue here:
Frequently when I make a change in my code and go back to Unity it starts the recompile but then fully crashes and has to restart the editor. The editor logs clearly show an issue related to FirebaseCppApp not being able to release an internal reference to the functions library.
Steps to reproduce:
It’s unclear what the real trigger is, it happens on macOS and Windows, targeting iOS and Android and it doesn’t matter whether the game was already in play mode or not. I simply change some code in Rider, switch back to Unity and it crashes. The crash happens roughly 5% of the time but it’s very disruptive to my workflow.
Crash log:
========== OUTPUTTING STACK TRACE ==================
0x00007FFD36264A06 (FirebaseCppApp-10_6_0) uWS::HttpSocket<0>::upgrade
0x00007FFD3624CF5B (FirebaseCppApp-10_6_0) uWS::HttpSocket<0>::upgrade
0x00007FFD3624E663 (FirebaseCppApp-10_6_0) uWS::HttpSocket<0>::upgrade
0x00007FFD3623FD78 (FirebaseCppApp-10_6_0) uWS::HttpSocket<0>::upgrade
0x00007FFD36206A14 (FirebaseCppApp-10_6_0) uWS::HttpSocket<0>::upgrade
0x00007FFD362045D1 (FirebaseCppApp-10_6_0) uWS::HttpSocket<0>::upgrade
0x00007FFD35D20BCB (FirebaseCppApp-10_6_0) uWS::WebSocket<0>::send
0x00007FFD35D1FC1C (FirebaseCppApp-10_6_0) uWS::WebSocket<0>::send
0x00007FFD35C4423D (FirebaseCppApp-10_6_0) uS::Socket::freeMessage
0x00007FFD35D1FEB0 (FirebaseCppApp-10_6_0) uWS::WebSocket<0>::send
0x00007FFD35D1FE29 (FirebaseCppApp-10_6_0) uWS::WebSocket<0>::send
0x00007FFD35C1F390 (FirebaseCppApp-10_6_0) SWIGRegisterStringCallback_FirestoreCpp
0x000001EC9904E1BC (Mono JIT Code) (wrapper managed-to-native) Firebase.Functions.FunctionsInternalPINVOKE:FirebaseFunctionsInternal_ReleaseReferenceInternal (System.Runtime.InteropServices.HandleRef)
0x000001EC9904DF2B (Mono JIT Code) Firebase.Functions.FirebaseFunctionsInternal:ReleaseReferenceInternal (Firebase.Functions.FirebaseFunctionsInternal)
0x000001EC9904DBAB (Mono JIT Code) Firebase.Functions.FirebaseFunctionsInternal:Dispose (bool)
0x000001EC9904D964 (Mono JIT Code) Firebase.Functions.FirebaseFunctionsInternal:Dispose ()
0x000001EC9904D5AB (Mono JIT Code) Firebase.Functions.FirebaseFunctions:Dispose ()
0x000001EC9904D173 (Mono JIT Code) Firebase.Functions.FirebaseFunctions:Finalize ()
0x000001EBE7FDF02C (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
0x00007FFD56310BA5 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\gc.c:383] mono_gc_run_finalize
0x00007FFD56311C5E (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\gc.c:944] finalize_domain_objects
0x00007FFD563121D3 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\gc.c:1036] finalizer_thread
0x00007FFD562AD2DB (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\threads.c:1268] start_wrapper_internal
0x00007FFD562AD4B6 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\threads.c:1344] start_wrapper
0x00007FFE0DBC7614 (KERNEL32) BaseThreadInitThunk
0x00007FFE0EAE26A1 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 48 (6 by maintainers)
@KSF000 Interesting, but I don’t think that’s my issue here, all my libraries have the same version (whenever I upgrade them I make sure to upgrade all of them to avoid any conflicts, takes a lot longer to do but eventually they’d need to be updated anyways so I just do it in one go)