Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4.22f1
2020.3.3f1
2021.1.0b7
2021.2.0a4
Issue ID
1327513
Regression
Yes
JSON deserialization produces different results when comparing to other conversion methods
Reproduction steps:
1. Open attached project "JsonUtilityCorruption.zip"
2. In Test Runner window, run tests for "ReproduceCorruptionTest"
3. Observe the tests
Expected result: The tests pass
Actual result: The tests fail with "Expected: <WWTK.Stickers.StickerInstanceManagerState> But was: <WWTK.Stickers.StickerInstanceManagerState>" error
Reproducible with: 2019.4.22f1, 2019.4.24f1, 2020.3.3f1, 2020.3.4f1, 2021.1.0b7, 2021.1.1f1, 2021.2.0a4, 2021.2.0a12
Not reproducible with: 2019.4.21f1, 2020.3.2f1, 2021.1.0b6, 2021.2.0a3
Could not test with: 2018.4.30f1 (console errors break project)
Notes:
Also reproduced on macOS
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
- The Up, Down and other Buttons in a Style Sheet's Inspector unselect items when they are clicked while they are disabled
- Virtual Player remains active and still launches when removed from Additional Editor Instances from a custom Play Mode Scenario
- UI Toolkit Editor Window Creator becomes not interactable and greyed out when a long name is entered
- [Web][iOS] Web Player keeps restarting on launch when Native C/C++ Multithreading is enabled
- "Add Scene to Scenes in Build" pop-up reappears after Scene has already been added and another Multiplayer Editor Instance is loaded
Resolution Note:
The order that OnAfterDeserialization will be called on nested objects is not guaranteed, so an object should not assume that OnAfterDeserialization has already been called on a different object when doing its own initialization. A recent fix guarantees that SerializeReference fields will be fully initialized by the time OnAfterDeserialization is called. And it is also guaranteed that OnAfterDeserialization on the outer object would be called last. It is our recommended to trigger any initialization code that needs to span across nested objects to be triggered from the main object's OnAfterDeserialization callback, that is a safe way to avoid fragile dependencies on the order of callback execution.