-
Notifications
You must be signed in to change notification settings - Fork 433
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
Accessing snapshot crashes iOS every time, Editor eventually #635
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Hi @aidanwolf, It looks like somehow the DataSnapshot is getting corrupted and passing garbage data around, which eventually causes the crash. I'm not sure what would be causing that though, so it would be helpful if we had a reproduction case. Can you show me a minimal, verifiable example that triggers this crash? |
Hi Alexames! I have discovered the source of the issue. If enumerating through a snapshot's children and attempting to access the enumerated child value later with any arbitrary delay, there's a chance it will have Nulled out. Not sure why it's doing this, but it definitely seems to be a bug. Bad Code
Working code
|
Hi @aidanwolf , Thanks for doing all this legwork! Would you mind throwing a quick example together built on the quickstart? I'll be able to throw that right into a bug report to start taking a look at the issue. Thanks! |
This will be fixed with the 8.1.0 release |
Please fill in the following fields:
Unity editor version: 2019.2.17f1
Firebase Unity SDK version: 6.13
Source you installed the SDK (.unitypackage or Unity Package Manager): .unitypackage
Firebase plugins in use (Auth, Database, etc.): Database, Storage, Auth, Analytics
Additional SDKs you are using (Facebook, AdMob, etc.): None
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS
Scripting Runtime (Mono, and/or IL2CPP):IL2CPP
Please describe the issue here:
This isn't for every snapshot, this is for an operation whereas I iterate over a snapshot of keys and get snapshots for those keys. Everything is async, running through Action callback. The crash seems to occur wherever the snapshot is accessed after whatever bug occurs, doesn't matter if its snapshot.HasChild, snapshot.Child().Value, or snapshot.Child().Exists.
`Obtained 6 stack frames.
#0 0x00000159763274 in firebase::database::internal::GetVariantValue(firebase::Variant const*)
#1 0x0000015975f888 in firebase::database::internal::VariantGetChild(firebase::Variant const*, firebase::Path const&)
#2 0x0000015974898a in firebase::database::internal::DataSnapshotInternal::HasChild(char const*) const
#3 0x000001596fdbb0 in Firebase_Database_CSharp_InternalDataSnapshot_HasChild__SWIG_0
#4 0x00000154419c33 in (wrapper managed-to-native) Firebase.Database.Internal.DatabaseInternalPINVOKE:InternalDataSnapshot_HasChild__SWIG_0 (System.Runtime.InteropServices.HandleRef,string) {0x7fd9358a6970} + 0x163 (0x154419ad0 0x154419db9) [0x17941bc80 - Unity Child Domain]
#5 0x007fd933934500 in (Unknown)
Launching bug reporter'
What's the issue repro rate? (eg 100%, 1/5 etc)
100% on iOS
The text was updated successfully, but these errors were encountered: