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
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
- [RenderingDebugger][InputSystemPackage] Ctrl+Backspace shortcut doesn't work to open the Rendering Debugger when New Input System is in use
- No option to skip video transcoding when launching a Project
- “ValidateSchema Error2” error is thrown in the Player when using IL2CPP Scripting Backend
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.