Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try improve PVS exception tolerance a bit more #5454

Merged

Conversation

ElectroJr
Copy link
Member

@ElectroJr ElectroJr commented Sep 21, 2024

Instead of using the normal EntityTerminatingEvent system subscription, PVS system now uses a separate C# event that gets invoked before the normal system event. This might prevent some bugs caused by content code throwing exceptions while handling the event?

I don't know if thats what caused this, but smug just keeps discovering cursed PVS errors:

 at Robust.Shared.Utility.DebugTools.AssertNull(Object arg, String message) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/Utility/DebugTools.cs:line 250
   at Robust.Server.GameStates.PvsSystem.UpdatePosition(EntityUid uid, TransformComponent xform, MetaDataComponent meta, EntityUid oldParent) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Server/GameStates/PvsSystem.Entity.cs:line 38
   at Robust.Server.GameStates.PvsSystem.OnEntityMove(MoveEvent& ev) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Server/GameStates/PvsSystem.Entity.cs:line 14
   at Robust.Shared.GameObjects.SharedTransformSystem.RaiseMoveEvent(Entity`2 ent, EntityUid oldParent, Vector2 oldPosition, Angle oldRotation, Nullable`1 oldMap) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/Systems/SharedTransformSystem.cs:line 283
   at Robust.Shared.GameObjects.SharedTransformSystem.SetCoordinates(Entity`2 entity, EntityCoordinates value, Nullable`1 rotation, Boolean unanchor, TransformComponent newParent, TransformComponent oldParent) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/Systems/SharedTransformSystem.Component.cs:line 585
   at Robust.Shared.GameObjects.SharedTransformSystem.DetachEntityInternal(EntityUid uid, TransformComponent xform, MetaDataComponent meta, TransformComponent oldXform, Boolean terminating) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/Systems/SharedTransformSystem.Component.cs:line 1470
   at Robust.Shared.GameObjects.SharedTransformSystem.DetachEntity(EntityUid uid, TransformComponent xform, MetaDataComponent meta, TransformComponent oldXform, Boolean terminating) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/Systems/SharedTransformSystem.Component.cs:line 1399
   at Robust.Shared.GameObjects.EntityManager.RecursiveDeleteEntity(EntityUid uid, MetaDataComponent metadata, TransformComponent transform, TransformComponent parentXform) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 581
   at Robust.Shared.GameObjects.EntityManager.DeleteEntity(EntityUid e, MetaDataComponent meta, TransformComponent xform) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 535
   at Robust.Shared.GameObjects.EntityManager.DeleteEntity(Nullable`1 uid) in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 502
   at Content.IntegrationTests.Tests.EntityTest.<>c__DisplayClass5_0.<AllComponentsOneToOneDeleteTest>b__1() in /home/runner/work/RMC-14/RMC-14/Content.IntegrationTests/Tests/EntityTest.cs:line 409
   at NUnit.Framework.Assert.Multiple(TestDelegate testDelegate)
   at Content.IntegrationTests.Tests.EntityTest.<>c__DisplayClass5_0.<AllComponentsOneToOneDeleteTest>b__0() in /home/runner/work/RMC-14/RMC-14/Content.IntegrationTests/Tests/EntityTest.cs:line 375
   at Robust.UnitTesting.RobustIntegrationTest.IntegrationGameLoop.SingleThreadRunUntilEmpty() in /home/runner/work/RMC-14/RMC-14/RobustToolbox/Robust.UnitTesting/RobustIntegrationTest.cs:line 1097

@metalgearsloth metalgearsloth merged commit 41ec2dc into space-wizards:master Sep 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants