Search Issue Tracker
Won't Fix
Won't Fix in 1.0.X
Votes
0
Found in [Package]
1.0.16 (Patch 4)
Issue ID
ECSB-738
Regression
No
Player crashes on Unity.Entities.EntityQueryImpl::Unity.Entities.EntityQueryImpl.GetSingleton<GameProperties> when opened
Reproduction steps:
1. Open the attached “ASDWQE” project
2. Build And Run
Expected result: The built Player is opened
Actual result: The built Player crashes after opening
Reproducible with: 1.0.16 (2022.3.11f1)
Could not test with: 1.0.8 (2022.3.11f1 (Multiple compilation errors)), 1.1.0-exp.1 (2022.3.11f1 (error CS0006: Metadata file 'Library/PackageCache/com.unity.ext.nunit@2.0.3/net35/unity-custom/nunit.framework.dll' could not be found))
Reproducible on: Intel macOS 14
Note: Tested with: IL2CPP and Mono scripting backends, Development Build enabled or disabled, Burst Compilation enabled or disabled
First few lines of the stack trace:
{noformat}#0 0x0000012b221cd9 in Unity.Entities.EntityQueryImpl, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.GetSingleton<GameProperties, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null>(Unity.Entities.EntityQueryImpl*, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null this) -> GameProperties, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null_11cb4154e83f194ffd065a1c2918a79e from Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
#1 0x0000012b2207af in EnemyDeleteSystem, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.OnUpdate(EnemyDeleteSystem*, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null this, Unity.Entities.SystemState&, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null state) -> System.Void, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089_11cb4154e83f194ffd065a1c2918a79e from Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
#2 0x0000012b3eadca in 1edce8a846f3680fc66c49edd7d586d8
#3 0x0000012b12c42f in Unity.Entities.WorldUnmanagedImpl+UnmanagedUpdate_00001351$BurstDirectCall, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.Invoke(System.Void*, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 pSystemState) -> System.Void, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089_11cb4154e83f194ffd065a1c2918a79e from Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
#4 0x0000012b3eb54a in 7bf3b3dc1c88cb657fd69b548232391d{noformat}
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
Resolution Note (1.0.X):
The cause of the crash is in the application code. EnemyDeleteSystem calls GetSingleton<GameProperties>(), but is missing a call to RequireForUpdate<GameProperties>(). Adding the following method to EnemyDeleteSystem fixes the crash and allows the build to run properly:
[BurstCompile] public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<GameProperties>();
}