Skip to content

[Bug] Constant Editor Crashing on Using Firebase #1199

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

Open
Moe-Baker opened this issue Mar 5, 2025 · 6 comments
Open

[Bug] Constant Editor Crashing on Using Firebase #1199

Moe-Baker opened this issue Mar 5, 2025 · 6 comments
Labels
api: core needs-info Need information for the developer

Comments

@Moe-Baker
Copy link

Description

For the past 4 months our project has been plagued by constant Unity editor crashes.
After opening the project, the first play mode launch works fine, but the possibility of crashing starts racking up after that. It used to crash after every 5-6 play modes, now it crashes after about 2-3, and sometimes while just compiling code.

Reproducing the issue

No response

Firebase Unity SDK Version

12.6.0

Unity editor version

6.0000.0.40f1

Installation Method

Unity Package Manager

Problematic Firebase Component(s)

Firestore, Functions, Messaging, Database, Authentication

Other Firebase Component(s) in use

No response

Additional SDKs you are using

GameAnalytics, Adjust, Unity Services (Cloud Content Delivery, In App Purchasing, Vivox)

Targeted Platform(s)

Desktop

Unity editor platform

Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

https://pastebin.com/7wdGJGgv

If using CocoaPods for Apple platforms, the project's Podfile.lock

No response

@Moe-Baker Moe-Baker added new New issue. type: bug labels Mar 5, 2025
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@argzdev
Copy link

argzdev commented Mar 5, 2025

Hey @Moe-Baker, thanks for reaching out. For runtime crashes, I'm guessing that the instantiation of multiple SDKs using async/await could potentially introduce race conditions if ever any call to its functions is made before finishing initialization. As for compilation crashes, this is very rare, and could mean a bug within our SDK or an issue with the integration setup.

That said, are you able to reproduce the same behavior with an MCVE? If so, any chance you could share this with us? It'll help us investigate this issue further.

@argzdev argzdev added the needs-info Need information for the developer label Mar 5, 2025
@Moe-Baker
Copy link
Author

I can't really validate it with a minimal project; it's a very random crash.
I'll investigate the async SDK usage.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Mar 6, 2025
@TeorikDeli
Copy link

TeorikDeli commented Mar 25, 2025

This crashes usually happening when we disable domain reloading while entering play mode and making C# script changes while in play mode. FirebaseStorage.OnAppDisposed() is the reason I believe (I think it is triggered from Firebase.FirebaseApp:Finalize() -> Firebase.FirebaseApp:Dispose (bool)). All crash logs points to this. I had many crash logs when I created a bug report to Unity, but after the report I deleted them all. And Unity said "this is a third party issue".

Edit: This is happening Windows 11, 10 and macOS (both Intel & Apple Silicon). Unity 21 LTS and Unity 6

@argzdev argzdev added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels May 13, 2025
@google-oss-bot google-oss-bot added the stale Don't have recent activity label May 14, 2025
@google-oss-bot
Copy link

Hey @Moe-Baker. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@TeorikDeli
Copy link

TeorikDeli commented May 14, 2025

Obtained 54 stack frames.
#0 0x0000024b8344a0 in (Unknown)
#1 0x000003c47db37d in firebase::callback::CallbackValue1::Run()
#2 0x000003c47402e9 in firebase::callback::CallbackEntry::Execute()
#3 0x000003c473df7d in firebase::callback::CallbackDispatcher::DispatchCallbacks()
#4 0x000003c473dec1 in firebase::callback::PollCallbacks()
#5 0x000003c47c7f29 in Firebase_App_CSharp_PollCallbacks
#6 0x00000245a04a37 in (wrapper managed-to-native) Firebase.AppUtilPINVOKE:PollCallbacks () [{0x7f89d58786b0} + 0xa7] (0x245a04990 0x245a04ae4) [0x175383a80 - Unity Child Domain]
#7 0x0000018742695e in mono_jit_runtime_invoke
#8 0x000001875daadc in do_runtime_invoke
#9 0x000001875daa40 in mono_runtime_invoke
#10 0x00000102e4b087 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#11 0x00000102e20d68 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#12 0x00000102de1f61 in MonoBehaviour::CallMethodIfAvailable(int)
#13 0x00000102de1e0a in MonoBehaviour::CallUpdateMethod(int)
#14 0x0000010274167c in void BaseBehaviourManager::CommonUpdate()
#15 0x0000010274145d in BehaviourManager::Update()
#16 0x00000102a2c5b0 in InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdateRegistrator::Forward()
#17 0x000001029e8b10 in ExecutePlayerLoop(NativePlayerLoopSystem*)
#18 0x000001029e8b51 in ExecutePlayerLoop(NativePlayerLoopSystem*)
#19 0x000001029e8fbc in PlayerLoop()
#20 0x00000103c24303 in EditorPlayerLoop::Execute()
#21 0x00000103c27c92 in PlayerLoopController::InternalUpdateScene(bool, bool)
#22 0x00000103c28916 in PlayerLoopController::EnterPlayMode()
#23 0x00000103c27013 in PlayerLoopController::SetIsPlaying(bool)
#24 0x00000103c19d2e in Application::TickTimer()
#25 0x000001051c27dc in -[EditorApplication onEditorUpdatesTickTimer]
#26 0x007ff811c5f70f in __NSFireTimer
#27 0x007ff810bc663d in CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
#28 0x007ff810bc6228 in __CFRunLoopDoTimer
#29 0x007ff810bc5e46 in __CFRunLoopDoTimers
#30 0x007ff810badbc4 in __CFRunLoopRun
#31 0x007ff810baccb2 in CFRunLoopRunSpecific
#32 0x007ff81c5c90d4 in RunCurrentEventLoopInMode
#33 0x007ff81c5cbe60 in ReceiveNextEventCommon
#34 0x007ff81c75519a in _BlockUntilNextEventMatchingListInModeWithFilter
#35 0x007ff81455ee39 in _DPSNextEvent
#36 0x007ff814fec997 in -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#37 0x000001051c27a2 in -[EditorApplication onEditorUpdatesTickTimer]
#38 0x007ff811c5f70f in __NSFireTimer
#39 0x007ff810bc663d in CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
#40 0x007ff810bc6228 in __CFRunLoopDoTimer
#41 0x007ff810bc5e46 in __CFRunLoopDoTimers
#42 0x007ff810badbc4 in __CFRunLoopRun
#43 0x007ff810baccb2 in CFRunLoopRunSpecific
#44 0x007ff81c5c90d4 in RunCurrentEventLoopInMode
#45 0x007ff81c5cbe60 in ReceiveNextEventCommon
#46 0x007ff81c75519a in _BlockUntilNextEventMatchingListInModeWithFilter
#47 0x007ff81455ee39 in _DPSNextEvent
#48 0x007ff814fec997 in -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#49 0x007ff81454ff19 in -[NSApplication run]
#50 0x007ff814523085 in NSApplicationMain
#51 0x000001051d959b in EditorMain(int, char const**)
#52 0x000001051d98b9 in main
#53 0x007ff810721530 in start
Launching bug reporter
2025-05-14 12:43:50.370 UnityBugReporter[24685:6496929] apply_selection_policy_once: prefer use of removable GPUs (via com.unity3d.bugreporter:GPUSelectionPolicy->preferRemovable)
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
12:43:51.415 |E| --LOGLOG-- | WatchParentPid:81850:4 | System.Exception: Parent process PID:81850 has quit, killing ourselves via Process.Kill

Parent process PID:81850 has quit, killing ourselves via Process.Kill

--- EXCEPTION #1/1 [LoggerException]
Message = “Parent process PID:81850 has quit, killing ourselves via Process.Kill”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.LoggerBase.Log(LoggingLevel level, String message, Exception ex)
at JetBrains.Diagnostics.ProcessWatchdog.<>c__DisplayClass6_0.b__0()
at System.Threading.Thread.StartCallback()

�[40m�[32minfo�[39m�[22m�[49m: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
�[40m�[32minfo�[39m�[22m�[49m: Unity.ILPP.Runner.PostProcessingAssemblyLoadContext[0]
ALC ILPP context 2 is unloading

this is the log for me.

@google-oss-bot google-oss-bot removed the stale Don't have recent activity label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core needs-info Need information for the developer
Projects
None yet
Development

No branches or pull requests

4 participants