Hi Team,
I’m semi-occasionally experiencing a crash when I despawn all the units in my game. The burst error is from RVOSystem:AddAndRemoveAgentsFromSimulation and it fails at EntityQuery:ToComponentDataArray<Pathfinding.ECS.RVO.AgentIndex>
This was happening to me like 4 versions ago - updated to the most latest and unfortunately its still happening again.
Can you let me know what steps I can take to minimize crashes when removing units?
Thanks!
Would you be able to create reproduction steps for this crash? I’ll go ahead and try and recreate it on my end. Feel free to send a project over if you’re able to/want to.
My project is massive unfortunately. It’s hard to repro - happens only occasionally. I’m despawning enemies by deactivating their gameobjects now and the crash hasn’t happened yet. Before I was adding a Kill component through entitymanager to kill the entity.
This crash is unfortunately still haunting me intermittently. I can never get it to happen in editor time - always just on builds.
This is the excerpt from the crash dump.
0x00007FFF9B0E10A2 (lib_burst_generated) burst.initialize.statics.1465c30441706e2e1a8a5e3cb7a20bf9_avx2
0x00007FFF9B7432D0 (lib_burst_generated) d1a17804332547af66b392631a572d21
0x000001CF80058C3D (Mono JIT Code) (wrapper managed-to-native) Unity.Entities.ChunkIterationUtility/Unity.Entities.GatherComponentDataWithoutFilter_00000A54$BurstDirectCall:wrapper_native_indirect_000001D0FF5C8560 (intptr&,byte*,Unity.Entities.TypeIndex,Unity.Entities.UnsafeCachedChunkList&,Unity.Entities.UnsafeMatchingArchetypePtrList&)
0x000001CF8005892B (Mono JIT Code) Unity.Entities.ChunkIterationUtility/Unity.Entities.GatherComponentDataWithoutFilter_00000A54$BurstDirectCall:Invoke (byte*,Unity.Entities.TypeIndex,Unity.Entities.UnsafeCachedChunkList&,Unity.Entities.UnsafeMatchingArchetypePtrList&)
0x000001CF8005885B (Mono JIT Code) Unity.Entities.ChunkIterationUtility:GatherComponentDataWithoutFilter (byte*,Unity.Entities.TypeIndex,Unity.Entities.UnsafeCachedChunkList&,Unity.Entities.UnsafeMatchingArchetypePtrList&)
0x000001CF800583CB (Mono JIT Code) Unity.Entities.ChunkIterationUtility:CreateComponentDataArray<Pathfinding.ECS.RVO.AgentIndex> (Unity.Collections.AllocatorManager/AllocatorHandle,Unity.Entities.ComponentTypeHandle`1<Pathfinding.ECS.RVO.AgentIndex>&,int,Unity.Entities.EntityQuery)
0x000001CF800581F3 (Mono JIT Code) Unity.Entities.EntityQueryImpl:ToComponentDataArray<Pathfinding.ECS.RVO.AgentIndex> (Unity.Collections.AllocatorManager/AllocatorHandle,Unity.Entities.EntityQuery)
0x000001CF8005809B (Mono JIT Code) Unity.Entities.EntityQuery:ToComponentDataArray<Pathfinding.ECS.RVO.AgentIndex> (Unity.Collections.AllocatorManager/AllocatorHandle)
0x000001CF80057B03 (Mono JIT Code) Pathfinding.ECS.RVO.RVOSystem:AddAndRemoveAgentsFromSimulation (Unity.Entities.SystemState&,Pathfinding.RVO.SimulatorBurst)
0x000001CF56E55333 (Mono JIT Code) Pathfinding.ECS.RVO.RVOSystem:OnUpdate (Unity.Entities.SystemState&)
0x000001CF56E55163 (Mono JIT Code) Pathfinding.ECS.RVO.RVOSystem:codegen__OnUpdate (intptr,intptr)
0x000001CF56E296DD (Mono JIT Code) Unity.Entities.SystemBaseRegistry/<>c__DisplayClass9_0:b__0 (intptr,intptr)
0x000001CF315794CB (Mono JIT Code) (wrapper native-to-managed) Unity.Entities.SystemBaseRegistry/<>c__DisplayClass9_0:b__0 (intptr,intptr)
0x00007FFF9B1B31DE (lib_burst_generated) burst.initialize.statics.7bf3b3dc1c88cb657fd69b548232391d_avx2
0x00007FFF9B735F40 (lib_burst_generated) 7bf3b3dc1c88cb657fd69b548232391d
0x000001CF56E29670 (Mono JIT Code) (wrapper managed-to-native) Unity.Entities.WorldUnmanagedImpl/Unity.Entities.UnmanagedUpdate_0000145F$BurstDirectCall:wrapper_native_indirect_000001CF53B939D8 (intptr&,void*)
0x000001CF56E2923B (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl/Unity.Entities.UnmanagedUpdate_0000145F$BurstDirectCall:Invoke (void*)
0x000001CF56E2918B (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl:UnmanagedUpdate (void*)
0x000001CF56E28DF3 (Mono JIT Code) Unity.Entities.WorldUnmanagedImpl:UpdateSystem (Unity.Entities.SystemHandle)
0x000001CF56E25A43 (Mono JIT Code) Unity.Entities.ComponentSystemGroup:UpdateAllSystems ()
0x000001CF56E2548B (Mono JIT Code) Unity.Entities.ComponentSystemGroup:OnUpdate ()
0x000001CF56E529B3 (Mono JIT Code) Pathfinding.ECS.AIMovementSystemGroup:OnUpdate ()
0x000001CF56E24B2B (Mono JIT Code) Unity.Entities.SystemBase:Update ()
0x000001CF56E25CE2 (Mono JIT Code) Unity.Entities.ComponentSystemGroup:UpdateAllSystems ()
0x000001CF56E25473 (Mono JIT Code) Unity.Entities.ComponentSystemGroup:OnUpdate ()
0x000001CF56E24B2B (Mono JIT Code) Unity.Entities.SystemBase:Update ()
0x000001CF56E2493D (Mono JIT Code) Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate ()
0x000001CECB3EE728 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this (object,intptr,intptr,intptr)
Would appreciate any tips on how to avoid this.
Sorry for the delay, I’ve let Aron know about this. I thought I’d posted that above but must’ve never gotten posted.