space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.com
MIT License
2.74k stars 3.49k forks source link

Server crashes in some cases at roundstart #17542

Open Valtosin opened 1 year ago

Valtosin commented 1 year ago

caught in grafana before server crashes

Caught exception in GameTicker
System.ArgumentException: An item with the same key has already been added. Key: 20586
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Content.Server.Administration.Logs.AdminLogManager.CacheNewRound() in /home/runner/work/ss14-new/ss14-new/Content.Server/Administration/Logs/AdminLogManager.Cache.cs:line 44
   at Content.Server.Administration.Logs.AdminLogManager.RoundStarting(Int32 id) in /home/runner/work/ss14-new/ss14-new/Content.Server/Administration/Logs/AdminLogManager.cs:line 223
   at Content.Server.Administration.Logs.AdminLogSystem.<Initialize>b__1_0(RoundStartingEvent ev) in /home/runner/work/ss14-new/ss14-new/Content.Server/Administration/Logs/AdminLogSystem.cs:line 18
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass4_0`1.<SubscribeEvent>b__0(Unit& ev) in /home/runner/work/ss14-new/ss14-new/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Broadcast.cs:line 169
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEventCore(EventSource source, Unit& unitRef, EventData subs, Boolean byRef) in /home/runner/work/ss14-new/ss14-new/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Broadcast.cs:line 321
   at Robust.Shared.GameObjects.EntityEventBus.RaiseEvent[T](EventSource source, T toRaise) in /home/runner/work/ss14-new/ss14-new/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Broadcast.cs:line 263
   at Content.Server.GameTicking.GameTicker.StartRound(Boolean force) in /home/runner/work/ss14-new/ss14-new/Content.Server/GameTicking/GameTicker.RoundFlow.cs:line 202
 Catcher=GameTicker Sawmill=runtime

context

7 servers working simultaneously with one db

more context

chrome_2023-06-22_05-09-43

misandrie commented 1 year ago

One of your maps is borked

Valtosin commented 1 year ago

so, it seems it's the case when map can't load, but it keep trying to add id to the dict, when it's already in it. I'll check what is wrong with maps anyway

UPD: nah, it's definitely not a map error

hobolyra commented 5 days ago

Same issue. Load a map for mapping, but if I try to save the same map, I get "An item with the same key has already been added" error as well. Map works fine otherwise, without any changes map never threw this error beforehand. Now it won't save at all.

Error only happened after rebuilding dev environment, and a few other maps now also can't be edited that once worked.

metalgearsloth commented 5 days ago

Same issue. Load a map for mapping, but if I try to save the same map, I get "An item with the same key has already been added" error as well. Map works fine otherwise, without any changes map never threw this error beforehand. Now it won't save at all.

Error only happened after rebuilding dev environment, and a few other maps now also can't be edited that once worked.

Your issue sounds completely different and needs more info.