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.io
MIT License
2.71k stars 3.43k forks source link

"restartround" often doesn't work #1285

Closed ike709 closed 4 years ago

ike709 commented 4 years ago

It works fine the first time, but then subsequent times the following error occurs:

There was an error while executing the command: System.Collections.Generic.KeyNotFoundException: Entity 6589 does not have a component of type Content.Server.GameObjects.StoreableComponent
   at Robust.Shared.GameObjects.ComponentManager.GetComponent(EntityUid uid, Type type) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\ComponentManager.cs:line 355
   at Robust.Shared.GameObjects.Entity.GetComponent[T]() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Entity.cs:line 269
   at Content.Server.GameObjects.ServerStorageComponent.HandleEntityMaybeRemoved(EntRemovedFromContainerMessage message) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameObjects\Components\Items\Storage\ServerStorageComponent.cs:line 87
   at Content.Server.GameObjects.EntitySystems.StorageSystem.HandleEntityRemovedFromContainer(EntRemovedFromContainerMessage message) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameObjects\EntitySystems\StorageSystem.cs:line 38
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEvent[T](EventSource source, T eventArgs) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:line 312
   at Robust.Shared.GameObjects.EntityEventBus.RaiseEvent[T](EventSource source, T toRaise) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:line 212
   at Robust.Server.GameObjects.Components.Container.BaseContainer.InternalRemove(IEntity toremove) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\Components\Container\Container.cs:line 204
   at Robust.Server.GameObjects.Components.Container.Container.InternalRemove(IEntity toremove) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\Components\Container\Container.cs:line 45
   at Robust.Server.GameObjects.Components.Container.BaseContainer.ForceRemove(IEntity toRemove) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\Components\Container\Container.cs:line 190
   at Robust.Server.GameObjects.Components.Container.ContainerManagerComponent.ForceRemove(IEntity entity) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\Components\Container\ContainerManagerComponent.cs:line 159
   at Robust.Server.GameObjects.EntitySystems.ContainerSystem.HandleParentChanged(EntParentChangedMessage message) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\EntitySystems\ContainerSystem.cs:line 24
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEvent[T](EventSource source, T eventArgs) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:line 312
   at Robust.Shared.GameObjects.EntityEventBus.RaiseEvent[T](EventSource source, T toRaise) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:line 212
   at Robust.Shared.GameObjects.Components.Transform.TransformComponent.DetachParentToNull() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Components\Transform\TransformComponent.cs:line 449
   at Robust.Shared.GameObjects.Components.Transform.TransformComponent.OnRemove() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Components\Transform\TransformComponent.cs:line 392
   at Robust.Shared.GameObjects.ComponentManager.RemoveComponentDeferred(Component component, Boolean removeProtected) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\ComponentManager.cs:line 247
   at Robust.Shared.GameObjects.ComponentManager.DisposeComponents(EntityUid uid) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\ComponentManager.cs:line 219
   at Robust.Shared.GameObjects.Entity.Shutdown() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Entity.cs:line 315
   at Robust.Shared.GameObjects.EntityManager.DeleteEntity(IEntity e) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityManager.cs:line 186
   at Robust.Server.GameObjects.ServerEntityManager.DeleteEntity(IEntity e) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 708
   at Robust.Shared.GameObjects.Entity.Delete() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Entity.cs:line 324
   at Content.Server.GameTicking.GameTicker._resettingCleanup() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameTicking\GameTicker.cs:line 602
   at Content.Server.GameTicking.GameTicker.RestartRound() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameTicking\GameTicker.cs:line 193
   at Content.Server.GameTicking.NewRoundCommand.Execute(IConsoleShell shell, IPlayerSession player, String[] args) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameTicking\GameTickerCommands.cs:line 106
   at Robust.Server.Console.ConsoleShell.ExecuteCommand(IPlayerSession session, String command) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Console\ConsoleShell.cs:line 147
> [INFO] ticker: Restarting round!
[WARN] con: [HOST]: ExecuteError - restartround
ike709 commented 4 years ago

UPDATE: This other exception occurred the first time I tried to run it.

[FATL] unhandled: System.Collections.Generic.KeyNotFoundException: The given key '2' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Robust.Shared.Map.MapManager.GetGrid(GridId gridID) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Map\MapManager.cs:line 496
   at Robust.Server.GameObjects.ServerEntityManager.CreateEntityUninitialized(String prototypeName, GridCoordinates coordinates) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 71
   at Robust.Server.GameObjects.ServerEntityManager.SpawnEntity(String protoName, GridCoordinates coordinates) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 121
   at Content.Server.GameObjects.Components.Mobs.MindComponent.<>c__DisplayClass14_0.<Shutdown>b__0() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameObjects\Components\Mobs\MindComponent.cs:line 101
   at Robust.Shared.Timers.Timer.Update(Single frameTime, IRuntimeLog runtimeLog) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Timers\Timer.cs:line 58
   at Robust.Shared.Timers.TimerManager.UpdateTimers(FrameEventArgs frameEventArgs) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Timers\TimerManager.cs:line 35
   at Robust.Server.BaseServer.Update(FrameEventArgs frameEventArgs) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 461
   at Robust.Server.BaseServer.<MainLoop>b__40_0(Object sender, FrameEventArgs args) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 335
   at Robust.Shared.Timing.GameLoop.Run() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Timing\GameLoop.cs:line 191
   at Robust.Server.BaseServer.MainLoop() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 343
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 89
   at Robust.Server.Program.<>c__DisplayClass2_0.<Start>b__0() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 54
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at Robust.Server.Program.Start(String[] args, Boolean contentStart) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 49
   at Robust.Server.Program.Main(String[] args) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 28
Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key '2' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Robust.Shared.Map.MapManager.GetGrid(GridId gridID) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Map\MapManager.cs:line 496
   at Robust.Server.GameObjects.ServerEntityManager.CreateEntityUninitialized(String prototypeName, GridCoordinates coordinates) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 71
   at Robust.Server.GameObjects.ServerEntityManager.SpawnEntity(String protoName, GridCoordinates coordinates) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 121
   at Content.Server.GameObjects.Components.Mobs.MindComponent.<>c__DisplayClass14_0.<Shutdown>b__0() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\Content.Server\GameObjects\Components\Mobs\MindComponent.cs:line 101
   at Robust.Shared.Timers.Timer.Update(Single frameTime, IRuntimeLog runtimeLog) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Timers\Timer.cs:line 58
   at Robust.Shared.Timers.TimerManager.UpdateTimers(FrameEventArgs frameEventArgs) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Timers\TimerManager.cs:line 35
   at Robust.Server.BaseServer.Update(FrameEventArgs frameEventArgs) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 461
   at Robust.Server.BaseServer.<MainLoop>b__40_0(Object sender, FrameEventArgs args) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 335
   at Robust.Shared.Timing.GameLoop.Run() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Shared\Timing\GameLoop.cs:line 191
   at Robust.Server.BaseServer.MainLoop() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 343
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 89
   at Robust.Server.Program.<>c__DisplayClass2_0.<Start>b__0() in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 54
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at Robust.Server.Program.Start(String[] args, Boolean contentStart) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 49
   at Robust.Server.Program.Main(String[] args) in C:\Users\Ike\Documents\GitHub\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 28
DrSmugleaf commented 4 years ago

Fixed by #1340