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
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
Resolution Note:
There are no fixes planned for this Bug