firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
226 stars 37 forks source link

[Bug] Unity Editor crashes intermittently due to Firebase Unity SDK #817

Open chriswalz opened 1 year ago

chriswalz commented 1 year ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

Unity Editor crashes intermittently due to Firebase Unity SDK

Steps to reproduce:

Use firebase sdk code. In this use Firebase Functions and stop and start Unity regularly and trigger a firebase function on load. Unity Crashing due to Firebase has always been a semi regular frustration with using Unity SDK. Typically I turn off all Unity Firebase SDK code to prevent Unity from crashing while developing other aspects of our game

Relevant Code:

Stacktrack from Editor.log


========== OUTPUTTING STACK TRACE ==================

0x00007FF8096C1186 (FirebaseCppApp-11_3_0) uWS::HttpSocket<0>::upgrade
0x00007FF8096AAA7B (FirebaseCppApp-11_3_0) uWS::HttpSocket<0>::upgrade
0x00007FF8096AC183 (FirebaseCppApp-11_3_0) uWS::HttpSocket<0>::upgrade
0x00007FF80969C2E8 (FirebaseCppApp-11_3_0) uWS::HttpSocket<0>::upgrade
0x00007FF80965F054 (FirebaseCppApp-11_3_0) uWS::HttpSocket<0>::upgrade
0x00007FF809660521 (FirebaseCppApp-11_3_0) uWS::HttpSocket<0>::upgrade
0x00007FF80910B93B (FirebaseCppApp-11_3_0) uWS::WebSocket<0>::send
0x00007FF80910ACFC (FirebaseCppApp-11_3_0) uWS::WebSocket<0>::send
0x00007FF80901D6AD (FirebaseCppApp-11_3_0) uS::Socket::freeMessage
0x00007FF80910AEA0 (FirebaseCppApp-11_3_0) uWS::WebSocket<0>::send
0x00007FF80910AE19 (FirebaseCppApp-11_3_0) uWS::WebSocket<0>::send
0x00007FF808FF6620 (FirebaseCppApp-11_3_0) SWIGRegisterStringCallback_FirestoreCpp
0x0000025C48C428DB (Mono JIT Code) (wrapper managed-to-native) Firebase.Functions.FunctionsInternalPINVOKE:FirebaseFunctionsInternal_ReleaseReferenceInternal (System.Runtime.InteropServices.HandleRef)
0x0000025C48C427B3 (Mono JIT Code) Firebase.Functions.FirebaseFunctionsInternal:ReleaseReferenceInternal (Firebase.Functions.FirebaseFunctionsInternal)
0x0000025C48C4261B (Mono JIT Code) Firebase.Functions.FirebaseFunctionsInternal:Dispose (bool)
0x0000025C48C4255A (Mono JIT Code) Firebase.Functions.FirebaseFunctionsInternal:Dispose ()
0x0000025C48C42383 (Mono JIT Code) Firebase.Functions.FirebaseFunctions:Dispose ()
0x0000025C48C421CB (Mono JIT Code) Firebase.Functions.FirebaseFunctions:Finalize ()
0x0000025B8D36E58C (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
0x00007FF824950855 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\gc.c:383] mono_gc_run_finalize 
0x00007FF82495190E (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\gc.c:944] finalize_domain_objects 
0x00007FF824951E83 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\gc.c:1036] finalizer_thread 
0x00007FF8248ECF7B (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\threads.c:1268] start_wrapper_internal 
0x00007FF8248ED156 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\threads.c:1344] start_wrapper 
0x00007FF8BD4626AD (KERNEL32) BaseThreadInitThunk
0x00007FF8BF2AAA68 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========
chriswalz commented 1 year ago

Same error happened again

chriswalz commented 1 year ago

Any thoughts or updates? Is this being investigated?

a-maurice commented 1 year ago

Sorry for the lack of update. We are looking into this, but haven't been able to determine the underlying problem yet. Unfortunately the callstacks do not make much sense, for example WebSockets should only be used within Database, and don't really indicate what the problem might be.

cometa93 commented 1 year ago

https://github.com/firebase/firebase-unity-sdk/issues/777

chriswalz commented 10 months ago

Crashing continues to happen a lot. Here's yet another example (not counting the many times it does happen without sharing) image

triplumix commented 8 months ago

Same problem. Can't use Firestore because Unity crashes