Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.36f1
Issue ID
UUM-67374
Regression
No
"SaveGameStateToFileTask()" throws Assertion errors on changing the Game State when variables of type "Item" are Serialized in GameManager
How to reproduce:
1. Open the user-attached project “Test”
2. Open the “Main Scene” scene and enter the Play Mode
3. Click one time in the Game view to enter the game menu
4. Click on any hexagon with the picture
5. Observe the results
Expected results: The Game State changes without errors
Actual results: The Game State changes with hundreds of Assertion errors
Reproducible with: 2021.3.36f1
Not reproducible with: 2022.3.22f1
Can’t test with: 2023.2.15f1, 6000.0.0b13 (Unfixable compilation errors)
Reproducible on: Windows 11 Pro
Not reproducible on: No other environment tested
Notes:
-The messages don’t affect the functionality
-The messages are not spammed when “[NonSerialized]” is added to all public variables of type “Item” in GameManager
-Can’t find the fixed version due to complexity in upgrading and downgrading the project
Full error:
Assertion failed on expression: 'CurrentThreadIsMainThread()'
UnityEngine.JsonUtility:ToJson (object)
GameManager:SaveGamestateToFileTask () (at Assets/Scripts/GameManager.cs:2134)
GameManager:<SaveGamestate>b__203_0 () (at Assets/Scripts/GameManager.cs:2074)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Quest] Pitch Shifter causes audio degradation on Quest 2 devices when sped up
- "GUI Error: Invalid GUILayout" and "NullReferenceException" are thrown when adding Scenes to "Scenes in Baking Set" in Adaptive Probe Volumes
- Inspector window not updating when switching GameObjects in Play Mode while having a VR headset connected
- “UnityException: GetInvalidFilenameChars” errors are thrown, and the Overlay Save Preset button becomes unusable when entering Play Mode with a shortcut while Overlay Save Preset window is opened
- "UnityException: GetName can only be called from the main thread." erors are thrown when the Shortcuts window is opened and entering Play Mode with a shortcut
Resolution Note:
Thank you for reporting a bug to Unity.
We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.
Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.