Space Engineers

Space Engineers

Planetary Asteroid Rings
Lt.Fenix 20 Jan, 2024 @ 4:48pm
Crash on Dedicated Server
I get this crash on my dedicated server, here are the relevant log entries.
If you could look into this, that'd be great.

18:45:29.3912 [FATAL] Initializer: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at Sandbox.ModAPI.MyEntitiesHelper_ModAPI.VRage.ModAPI.IMyEntities.GetTopMostEntitiesInBox(BoundingBoxD& boundingBox)
at SERingAsteroids.RingAsteroidsComponent.UpdateBeforeSimulation10()
at VRage.Game.Components.MyGameLogicComponent.VRage.Game.Entity.EntityComponents.Interfaces.IMyGameLogicComponent.UpdateBeforeSimulation10(Boolean entityUpdate)
at Patched_VRage.Game.Entity.MyGameLogic+<>c<UpdateBeforeSimulation>b__8_1_0(Object , MyGameLogicComponent )
at VRage.Collections.MyDistributedUpdater`2.Iterate(Action`1 p)
at VRage.Game.Entity.MyGameLogic.UpdateBeforeSimulation()
at Sandbox.Game.World.MySector.UpdateBeforeSimulation()
at Patched_Sandbox.Game.World.MySessionUpdateComponents_0(Object )
at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan )
at Sandbox.MySandboxGame.Update()
at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object )
at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object )
at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0<Run>b__0_0(Object )
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at Torch.VRageGame.DoStart() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 326
at Torch.VRageGame.Run() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 126
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at Sandbox.ModAPI.MyEntitiesHelper_ModAPI.VRage.ModAPI.IMyEntities.GetTopMostEntitiesInBox(BoundingBoxD& boundingBox)
at SERingAsteroids.RingAsteroidsComponent.UpdateBeforeSimulation10()
at VRage.Game.Components.MyGameLogicComponent.VRage.Game.Entity.EntityComponents.Interfaces.IMyGameLogicComponent.UpdateBeforeSimulation10(Boolean entityUpdate)
at Patched_VRage.Game.Entity.MyGameLogic+<>c<UpdateBeforeSimulation>b__8_1_0(Object , MyGameLogicComponent )
at VRage.Collections.MyDistributedUpdater`2.Iterate(Action`1 p)
at VRage.Game.Entity.MyGameLogic.UpdateBeforeSimulation()
at Sandbox.Game.World.MySector.UpdateBeforeSimulation()
at Patched_Sandbox.Game.World.MySessionUpdateComponents_0(Object )
at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan )
at Sandbox.MySandboxGame.Update()
at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object )
at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object )
at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0<Run>b__0_0(Object )
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at Torch.VRageGame.DoStart() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 326
at Torch.VRageGame.Run() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 126
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
< >
Showing 1-5 of 5 comments
Bravada Cadelanne  [developer] 15 Feb, 2024 @ 12:47am 
That exception seems to suggest that something created or deleted an entity on another thread, possibly by another mod?

I might have to catch and log any exceptions getting the entities etc.
Bravada Cadelanne  [developer] 16 Feb, 2024 @ 2:27am 
That exception should now be logged as a non-fatal exception if it occurs in this mod.
Lt.Fenix 17 Feb, 2024 @ 11:26am 
Great, thanks.

I do have MES mods on my server that probably place installations on asteroids and MES can clean those up.

Also, sometimes I will do a cleanup of the asteroids by using the Torch Essentials command "!voxels cleanup asteroids true" and also the ALE PCU Transferrer command "!seedcleanup all".
Lt.Fenix 25 Feb, 2024 @ 3:05pm 
I don't know if this is related to this mod, but I get a crash with these log entries now, which also refer to an enumeration operation. Do you think it might be related?

17:01:35.1378 [FATAL] Initializer: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()
at Patched_Sandbox.Game.Entities.MyParallelEntityUpdateOrchestratorUpdateAfterSimulation_0(Object )
at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.DispatchAfterSimulation()
at Sandbox.Game.Entities.MyEntities.UpdateAfterSimulation()
at Sandbox.Game.World.MySector.UpdateAfterSimulation()
at Patched_Sandbox.Game.World.MySessionUpdateComponents_0(Object )
at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan )
at Sandbox.MySandboxGame.Update()
at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object )
at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object )
at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0<Run>b__0_0(Object )
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at Torch.VRageGame.DoStart() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 326
at Torch.VRageGame.Run() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 126
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()
at Patched_Sandbox.Game.Entities.MyParallelEntityUpdateOrchestratorUpdateAfterSimulation_0(Object )
at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.DispatchAfterSimulation()
at Sandbox.Game.Entities.MyEntities.UpdateAfterSimulation()
at Sandbox.Game.World.MySector.UpdateAfterSimulation()
at Patched_Sandbox.Game.World.MySessionUpdateComponents_0(Object )
at Patched_Sandbox.Game.World.MySessionUpdate_0(Object , MyTimeSpan )
at Sandbox.MySandboxGame.Update()
at Patched_Sandbox.Engine.Platform.GameUpdateInternal_0(Object )
at Patched_Sandbox.Engine.Platform.GameRunSingleFrame_0(Object )
at Patched_Sandbox.Engine.Platform.FixedLoop+<>c__DisplayClass11_0<Run>b__0_0(Object )
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at Torch.VRageGame.DoStart() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 326
at Torch.VRageGame.Run() in C:\ProgramData\Jenkins\.jenkins\workspace\Torch_master\Torch\VRageGame.cs:line 126
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Bravada Cadelanne  [developer] 8 Mar, 2024 @ 9:14pm 
What other mods are you running?

Originally posted by Bravada Cadelanne:
That exception should now be logged as a non-fatal exception if it occurs in this mod.

Obviously if the exception occurs outside this mod then it'll still be fatal.
< >
Showing 1-5 of 5 comments
Per page: 1530 50