Unity editor version:
Firebase Unity SDK version: 2019.3.3f1 (Windows)
Source you installed the SDK (.unitypackage or Unity Package Manager): UPM
Firebase plugins in use (Auth, Database, etc.): Database, Auth
Additional SDKs you are using (Facebook, AdMob, etc.): None
Platform you are using the Unity editor on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Android
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Unity Editor crashes every time SetValueAsync is called with a large string.
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Yes, open quickstarts-unity project, edit UIHandler.cs script:
Change line 156 from:
newScoreMap["score"] = score;
to
newScoreMap["score"] = INSERT_VERY_LONG_STRING HERE (see pastebin);
What's the issue repro rate? (eg 100%, 1/5 etc)
100%
This works as intended Android device but crashes inside Unity Editor.
Hi @Whyser,
I tried to reproduce locally but I could not. I was testing on macOS, Unity version 2019.3.14f1, in editor.
First I attempted to copy and paste a large part of your example string but my text editor crashed. So I attempted a smaller subset, still crashed. Finally I decided to make a loop to assemble a string of length 75k characters through concatenation. The transaction completes successfully and the score is retreived successfully.
Could this be a problem in the C# Unity runtime with the static string coming from source? Could you test a assembled string of the same length to see if it, too, crashes?
Hey Della, thanks for confirming!
I actually didn't have it as a static string initially (and it failed anyway). But I just restarted my computer and now it works as it should :S.
Really sorry to have wasted your time, but it truly did crash quickstart example and using short string did work as intended.
EDIT:
Nope, it still crashes, I just accidentaly got a much shorter string (and didnt double check). I receive this string by doing:
JsonConvert.SerializeObject(EncryptedPlayerPrefs.CachedPlayerPrefs, Formatting.None).ToBase64String();
Where EncryptedPlayerPrefs.CachedPlayerPrefs is of type: Dictionary<string, object>
Gonna ping you here @DellaBitta in case you missed that I opened it up again.
Duplicate of #517
Unfortunately we do not have a proper fix for this yet. But I'll try to escalate for this.
Most helpful comment
Duplicate of #517
Unfortunately we do not have a proper fix for this yet. But I'll try to escalate for this.