Description | I noticed my server to crash 3-4 times within 30 minutes. According to watchdog log, it looks like it repeatedly happened when a specific player connected and spawned at his last location. I went to that location, but couldn't trigger any more crashes.
2021-06-18 02:22:07.743|Main Thread> Error: Caught exception in MyNetworkReader: 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 Medieval.Entities.Components.Grid.MyGridBuildingComponent.OnBeforeGridMerge(MyGridDataComponent finalGridData, MyGridDataComponent otherGridData, List`1 thisBlocks, List`1 otherBlocks)
at VRage.Components.Entity.CubeGrid.MyGridDataComponent.BeforeMergeDelegate.Invoke(MyGridDataComponent finalGridData, MyGridDataComponent otherGridData, List`1 thisBlocks, List`1 otherBlocks)
at VRage.Components.Entity.CubeGrid.MyGridDataComponent.Merge(MyGridDataComponent otherGridData)
at Medieval.GameSystems.Building.MyGridPlacer.PerformMerge(MyGridDataComponent gridData1, MyGridDataComponent gridData2)
at Medieval.GameSystems.Building.MyGridPlacer.DetermineGridMerges(List`1 createdScenes, Boolean autoMergeEnvironment, List`1 outputEntities)
at Medieval.GameSystems.Building.MyGridPlacer.Server_BuildRequest(MyBuildServerRequest buildRequest)
at lambda_method(Closure , MyGridPlacer , MyBuildServerRequest , DBNull , DBNull , DBNull , DBNull , DBNull )
at VRage.Network.CallSite`7.Invoke(BitStream stream, Object obj, Boolean validate)
at VRage.Network.MyReplicationLayer.Invoke(CallSite callSite, BitStream stream, Object obj, EndpointId source, MyClientStateBase clientState, Boolean validate)
at VRage.Network.MyReplicationServer.ProcessEvent(BitStream stream, CallSite site, Object obj, IMyNetObject sendAs, EndpointId source)
at VRage.Network.MyReplicationLayer.ProcessEvent(BitStream stream, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender)
at VRage.Network.MyReplicationLayer.ProcessEvent(BitStream stream, EndpointId sender)
at Sandbox.Engine.Multiplayer.MyTransportLayer.ProcessMessage(Byte[] data, Int32 dataSize, UInt64 sender, TimeSpan timestamp, TimeSpan receivedTimestamp)
at Sandbox.Engine.Multiplayer.MyTransportLayer.HandleMessage(Byte[] data, Int32 dataSize, UInt64 sender, TimeSpan timestamp, TimeSpan receivedTime)
at Sandbox.Engine.Networking.MyReceiveQueue.ProcessMessages(NetworkMessageDelegate handler, TimeSpan delay)
at Sandbox.Engine.Networking.MyReceiveQueue.Process(NetworkMessageDelegate handler, TimeSpan delay)
at Sandbox.Engine.Networking.MyNetworkReader.Process(TimeSpan lag)
2021-06-18 02:26:06.718|Main Thread> Exception occurred: 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 Medieval.Entities.Components.Grid.MyAdditionalBlocksGeneratorComponent.GenerateAdditionalBlocks(MyGridDataComponent gridData, List`1 blocks, Boolean blockAdded, MyBlock ignoreBlock)
at Medieval.GameSystems.Tools.MyBuilderToolBehavior.UpdateBlockIntegrity(MyPlayer buildingPlayer, GridBlockTuple block, Int32 integrityChange, Dictionary`2 items)
at Medieval.GameSystems.Tools.MyBuilderToolBehavior.PrimaryAction(MyBuilderToolBehaviorDefinition def, MyPlayer player)
at Medieval.GameSystems.Tools.MyBuilderToolBehavior.Hit()
at Sandbox.Game.EntityComponents.Character.MyToolBehaviorBase.ActionHit(Int64 deltaFrames)
at VRage.Components.MyUpdateScheduler.RunTimedUpdates()
at VRage.Components.MyUpdateScheduler.RunUpdates(TimeSpan currentTime)
at Sandbox.Game.World.MySession.UpdateComponents()
at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
at Sandbox.MySandboxGame.Update()
at Sandbox.Engine.Platform.Game.UpdateInternal()
at Sandbox.Engine.Platform.Game.RunSingleFrame()
at VRage.Components.MyUpdateScheduler.RunFixedUpdates()
at VRage.Components.MyUpdateScheduler.RunUpdates(TimeSpan currentTime)
at Sandbox.Engine.Platform.MySandboxUpdate.<RunLoop>b__18_0()
at VRage.Utils.FixedLoop.Run(Action tickCallback)
at Sandbox.Engine.Platform.MySandboxUpdate.RunLoop()
at VRage.Dedicated.DedicatedServer`1.RunInternal()
at VRage.Dedicated.DedicatedServer`1.RunMain(String instanceName, String customPath, Boolean isService, Boolean showConsole)
|
---|