space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
498 stars 377 forks source link

Cross-map contact throw #2963

Open metalgearsloth opened 2 years ago

metalgearsloth commented 2 years ago

On evac shuttle branch. I imagine when re-parenting old contacts aren't being cleared.

System.InvalidOperationException: The LinkedList node does not belong to current LinkedList.
   at System.Collections.Generic.LinkedList`1.ValidateNode(LinkedListNode`1 node)
   at System.Collections.Generic.LinkedList`1.Remove(LinkedListNode`1 node)
   at Robust.Shared.Physics.Dynamics.ContactManager.Destroy(Contact contact) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\Physics\Dynamics\ContactManager.cs:line 311
   at Robust.Shared.GameObjects.SharedPhysicsSystem.DestroyContacts(PhysicsComponent body, Nullable`1 mapId) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedPhysicsSystem.Components.cs:line 157
   at Robust.Shared.GameObjects.SharedPhysicsSystem.OnCollisionChange(CollisionChangeEvent& ev) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedPhysicsSystem.cs:line 97
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass6_0`1.<SubscribeEvent>b__0(Unit& ev) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Broadcast.cs:line 191
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEventCore(EventSource source, Unit& unitRef, EventData subs, Boolean byRef) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Broadcast.cs:line 324
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEvent(EventSource source, Unit& unitRef, Type eventType, Boolean byRef) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Broadcast.cs:line 309
   at Robust.Shared.GameObjects.EntityEventBus.RaiseEvent[T](EventSource source, T& toRaise) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Broadcast.cs:line 271
   at Robust.Shared.GameObjects.PhysicsComponent.set_CanCollide(Boolean value) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Components\Collidable\PhysicsComponent.Physics.cs:line 321
   at Content.Shared.Doors.Systems.SharedDoorSystem.SetCollidable(EntityUid uid, Boolean collidable, DoorComponent door, PhysicsComponent physics, OccluderComponent occluder) in C:\Programming\space-station-14\Content.Shared\Doors\Systems\SharedDoorSystem.cs:line 375
   at Content.Server.Doors.Systems.DoorSystem.SetCollidable(EntityUid uid, Boolean collidable, DoorComponent door, PhysicsComponent physics, OccluderComponent occluder) in C:\Programming\space-station-14\Content.Server\Doors\Systems\DoorSystem.cs:line 71
   at Content.Shared.Doors.Systems.SharedDoorSystem.OnPartialOpen(EntityUid uid, DoorComponent door) in C:\Programming\space-station-14\Content.Shared\Doors\Systems\SharedDoorSystem.cs:line 284
   at Content.Shared.Doors.Systems.SharedDoorSystem.NextState(DoorComponent door, TimeSpan time) in C:\Programming\space-station-14\Content.Shared\Doors\Systems\SharedDoorSystem.cs:line 576
   at Content.Shared.Doors.Systems.SharedDoorSystem.Update(Single frameTime) in C:\Programming\space-station-14\Content.Shared\Doors\Systems\SharedDoorSystem.cs:line 543
   at Robust.Shared.GameObjects.EntitySystemManager.TickUpdate(Single frameTime, Boolean noPredictions) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntitySystemManager.cs:line 302
   at Robust.Shared.GameObjects.EntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityManager.cs:line 129
   at Robust.Server.GameObjects.ServerEntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in C:\Programming\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 139
   at Robust.Server.BaseServer.Update(FrameEventArgs frameEventArgs) in C:\Programming\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 678
   at Robust.Server.BaseServer.<SetupMainLoop>b__56_1(Object sender, FrameEventArgs args) in C:\Programming\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 495
   at Robust.Shared.Timing.GameLoop.Run() in C:\Programming\space-station-14\RobustToolbox\Robust.Shared\Timing\GameLoop.cs:line 211
   at Robust.Server.BaseServer.MainLoop() in C:\Programming\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 522
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in C:\Programming\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 72
   at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in C:\Programming\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 43
   at Robust.Server.ContentStart.Start(String[] args) in C:\Programming\space-station-14\RobustToolbox\Robust.Server\ContentStart.cs:line 10
   at Content.Server.Program.Main(String[] args) in C:\Programming\space-station-14\Content.Server\Program.cs:line 9
metalgearsloth commented 2 years ago

Leaving the issue up as we need a much faster solution as grids moving between maps will already be slow.