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] Unity editor crashes on start #1053

Closed
Nyankoo opened this issue May 21, 2021 · 7 comments
Closed

[Bug] Unity editor crashes on start #1053

Nyankoo opened this issue May 21, 2021 · 7 comments
Assignees
Milestone

Comments

@Nyankoo
Copy link

Nyankoo commented May 21, 2021

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.9f1
  • Firebase Unity SDK version: 7.2.0
  • Source you installed the SDK: Unity Package Manager with tgz
  • Problematic Firebase Component: Firebase
  • Other Firebase Components in use: Auth, Firestore, Crashlytics, Remote Config
  • Additional SDKs you are using:
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

When starting our project in the Unity editor, the editor crashes. The error log shows

Stack Trace of Crashed Thread 24188:
ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FF7141C692A)
0x00007FF7141C692A (Unity) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FF713FFFCE7)
0x00007FF713FFFCE7 (Unity) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FF7175663B2)
0x00007FF7175663B2 (Unity) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FF71792EE29)
0x00007FF71792EE29 (Unity) (function-name not available)
ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FF717533F98)
0x00007FF717533F98 (Unity) (function-name not available)
0x00007FF8734B10FF (ntdll) _chkstk
0x00007FF87345B474 (ntdll) RtlRaiseException
0x00007FF8734AFC2E (ntdll) KiUserExceptionDispatcher
0x00007FFFFA5B83F3 (FirebaseCppApp-7_2_0) SWIGRegisterStringCallback_StorageInternal

We could narrow it down to the call
firestoreDB.Collection("l").Document(documentID).Collection("p"),
where documentID is null.

While this should be checked in our code that documentID isn't null before trying to access the document, the Firebase SDK should also handle this internally to not completely crash the editor.

We're not using the Storage SDK.

Steps to reproduce:

Relevant Code:

@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.

@Nyankoo
Copy link
Author

Nyankoo commented May 22, 2021

@dconeybe Updated the initial issue with more details what causes the editor crash. Pinging you because you tagged the issue with "storage", but this seems to be a general Firebase/Firestore issue.

@dconeybe
Copy link

Oh that information is helpful. The stack trace suggests that it's related to storage but that must be a red herring. I'll try to reproduce on Tuesday with your updated instructions.

@dconeybe
Copy link

If possible, could you attach the full logcat when the crash occurs? Or at least some of the additional logs leading up to the crash. For example, is it a SIGABRT that crashes the app?

@dconeybe
Copy link

I've taken a look at Firestore's section of the Unity SDK and found several places where specifying null to methods will cause the Unity Editor to crash. I'm going to work on fixing these since crashing is highly undesirable and I'll change the methods to instead throw ArgumentNullException.

I have no idea why SWIGRegisterStringCallback_StorageInternal showed up in the stack trace. That's very odd. So I'm going to ignore it for now and fix the methods to fail gracefully when given null arguments.

@dconeybe
Copy link

Update: The fix to add additional null checks to avoid crashes like this has been submitted and will be part of the next Unity SDK release (release date TBD). Note that it's not part of the Unity SDK 8.0.0 release. I'll reply back once the fix is released.

@vimanyu vimanyu added this to the 8.1.0 milestone Jun 21, 2021
@vimanyu
Copy link
Contributor

vimanyu commented Jun 21, 2021

Thanks @dconeybe for the fix. This should go out in 8.1.0.

@vimanyu vimanyu closed this as completed Jun 21, 2021
@firebase firebase locked and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants