Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.3.X - Entities
7000.0.0a1
Issue ID
ECSB-1295
Regression
No
Entites World serialization not deterministic
1. What happened
A Customer Upgraded to Unity 2022.3.26f1 and discovered that world serialization was not producing deterministic outputs as expected. They found discrepancies between serialized files of two simple world instances, each containing only two entities but differing significantly in their file content. Upon investigation, the team isolated the issue to the ChunksNodeType section of the files and specifically the Unity.Entities.Chunk header.
The Chunk structure in Unity includes several fields used during serialization, such as ArchetypeIndexForSerialization and CountForSerialization, which are meant to hold valid data only during serialization and have 4-byte paddings to keep the file format compatible.
Analyzing the structure revealed that differences in the serialized files were due to padding between fields not being consistent. This inconsistency was traced back to the Chunk structure not being memcleared when allocated, leading to non-deterministic padding data.
Consequently, the team applied a temporary hack to address the immediate issue but noticed other factors causing non-deterministic outputs. They observed additional non-deterministic behavior in scene conversions performed on different machines, with differences occurring at intervals of 16k bytes and near the file header.
2. How can we reproduce it using the example you attached
1- Create two identical worlds with the same input data (each containing only 2 entities).
2 -Serialize both worlds.
3 -Observe and compare the serialized files.
Observed Result: Serialized files differ.
Expected Result: Serialized files should be identical.
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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note:
There are no fixes planned for this Bug