Crash due to EventController duplicate key exception
We have seen this exception several times a month. We have not been able to empirically prove the cause, but anecdotally, we think it is caused by welding a blueprint with Event Controllers. It does not seem to be reproducible, as rebuilding the BP does not cause the Exception.
I first started seeing these exceptions after the Core Systems Update (Nov 2025) on a different server, which makes me suspect it is not directly related to a mod or plugin.
It seems that when a BP is welded, the IDs in m_selectedBlocks are not being updated correctly. Either it is a conflict between old and updated IDs or duplicate IDs are being inserted.
This then leads to the Exception when the duplicate is added to the m_selectedBlocks Dictionary.
00:51:42.6111 [FATAL] Initializer: System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at SpaceEngineers.Game.Entities.Blocks.MyEventControllerBlock.ProcessSelectedBlocks()
at SpaceEngineers.Game.Entities.Blocks.MyEventControllerBlock.UpdateAfterSimulation10()
at Patched_Sandbox.Game.Entities.MyParallelEntityUpdateOrchestratorUpdateAfterSimulation10_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 319
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.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at SpaceEngineers.Game.Entities.Blocks.MyEventControllerBlock.ProcessSelectedBlocks()
at SpaceEngineers.Game.Entities.Blocks.MyEventControllerBlock.UpdateAfterSimulation10()
at Patched_Sandbox.Game.Entities.MyParallelEntityUpdateOrchestratorUpdateAfterSimulation10_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 319
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()
I have the same bug
Please ignore this bug.
Just after posting it, I found that the Multigrid Projector Plugin had been accidentally added to the server. The server had been stable after it was removed, and thinking it was not present made me assume it was a game bug.
Please ignore this bug.
Just after posting it, I found that the Multigrid Projector Plugin had been accidentally added to the server. The server had been stable after it was removed, and thinking it was not present made me assume it was a game bug.
Hello Engineer,
Thank you for reaching our forum.
Thank you as well for the update from your side.
Happy to hear that without the plugin, you are no longer experiencing this problem.
Since there is no more assistance needed from our side, I will close this thread now as requested.
Happy Engineering!
Kind Regards,
Keen Software House: QA Department
Hello Engineer,
Thank you for reaching our forum.
Thank you as well for the update from your side.
Happy to hear that without the plugin, you are no longer experiencing this problem.
Since there is no more assistance needed from our side, I will close this thread now as requested.
Happy Engineering!
Kind Regards,
Keen Software House: QA Department
Replies have been locked on this page!