Skip to content
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

[Bug] Error caught by debugger on each recompile when in play mode #1049

Open
tomkail opened this issue Jun 19, 2024 · 4 comments
Open

[Bug] Error caught by debugger on each recompile when in play mode #1049

tomkail opened this issue Jun 19, 2024 · 4 comments

Comments

@tomkail
Copy link

tomkail commented Jun 19, 2024

Description

When my debugger (Rider) is connected, each time Unity recompiles due to code being edited while Unity is running, the follow exception is thrown. This makes it very annoying to leave my debugger attached.

System.ArgumentNullException: "_p_firebase__firestore__csharp__TransactionManager" has been disposed
at Firebase.Firestore.TransactionManagerProxy.CppDispose () [0x00016] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/firestore/swig/Firebase.Firestore_fixed.cs:3644
at Firebase.Firestore.TransactionManager.Dispose () [0x0000d] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/firestore/src/TransactionManager.cs:63
at Firebase.Firestore.FirebaseFirestore.Dispose () [0x0004c] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/firestore/src/FirebaseFirestore.cs:96
at Firebase.Firestore.FirebaseFirestore.Finalize () [0x00002] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/firestore/src/FirebaseFirestore.cs:76

Reproducing the issue

Run your project, connect your debugger, change some code to force unity to compile.

Firebase Unity SDK Version

12

Unity editor version

2022.x.x

Installation Method

.unitypackage

Problematic Firebase Component(s)

Firestore

Other Firebase Component(s) in use

Firestore

Additional SDKs you are using

No response

Targeted Platform(s)

Apple Platforms

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

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

Relevant Log Output

System.ArgumentNullException: "_p_firebase__firestore__csharp__TransactionManager" has been disposed
  at Firebase.Firestore.TransactionManagerProxy.CppDispose () [0x00016] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/firestore/swig/Firebase.Firestore_fixed.cs:3644 
  at Firebase.Firestore.TransactionManager.Dispose () [0x0000d] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/firestore/src/TransactionManager.cs:63 
  at Firebase.Firestore.FirebaseFirestore.Dispose () [0x0004c] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/firestore/src/FirebaseFirestore.cs:96 
  at Firebase.Firestore.FirebaseFirestore.Finalize () [0x00002] in /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/firestore/src/FirebaseFirestore.cs:76

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

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
@tomkail tomkail added new New issue. type: bug labels Jun 19, 2024
@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.

@ehsannas
Copy link

Hey @tomkail , thanks for reporting. Does the issue occur consistently? Would you be able to give me a full log?

It looks as though there's a race condition and the code is trying to dispose of something that's already been disposed.

@ehsannas ehsannas self-assigned this Jun 21, 2024
@tomkail
Copy link
Author

tomkail commented Jun 24, 2024

Yeah, it's been happening fairly consistently since I've been using the package, over a year. I wrote in via the website (since that's where the downloads for Unity are hosted) but never heard back; I only realised this github existed recently. How can I get the full log?

@ehsannas
Copy link

Set FirebaseFirestore.LogLevel = LogLevel.Debug as early as possible in your application.
Reproduce the crash.
Depending on your environment you should be able to find the crash log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants