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

Grenades inside item slots cause errors #32642

Open
slarticodefast opened this issue Oct 5, 2024 · 2 comments
Open

Grenades inside item slots cause errors #32642

slarticodefast opened this issue Oct 5, 2024 · 2 comments
Labels
T: Bugfix Type: Bugs and/or bugfixes

Comments

@slarticodefast
Copy link
Member

slarticodefast commented Oct 5, 2024

Reproduction
1.)

  • spawn plant pot
  • spawn a stinger grenade or incendiary grenade
  • activate the grenade and put it inside the plant pot or your pocket slot
  • get a ton of these errors:
[ERRO] resolve: Can't resolve "Robust.Shared.GameObjects.MetaDataComponent" on entity 2511!
   at System.Environment.get_StackTrace()
   at Robust.Shared.Containers.SharedContainerSystem.IsEntityOrParentInContainer(EntityUid uid, MetaDataComponent meta, TransformComponent xform) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Containers\SharedContainerSystem.cs:line 333
   at Content.Shared.Damage.Components.RequireProjectileTargetSystem.PreventCollide(Entity`1 ent, PreventCollideEvent& args) in D:\Code\SS14\space-station-14\Content.Shared\Damage\Systems\RequireProjectileTargetSystem.cs:line 37
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass57_0`2.<SubscribeLocalEvent>g__EventHandler|0(EntityUid uid, IComponent comp, TEvent& args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 324
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass67_0`1.<EntSubscribe>b__0(EntityUid uid, IComponent comp, Unit& ev) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 460
   at Robust.Shared.GameObjects.EntityEventBus.EntDispatch(EntityUid euid, Type eventType, Unit& args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 634
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEventCore(EntityUid uid, Unit& unitRef, Type type, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 240
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEvent[TEvent](EntityUid uid, TEvent& args, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 218
   at Robust.Shared.GameObjects.EntitySystem.RaiseLocalEvent[TEvent](EntityUid uid, TEvent& args, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntitySystem.cs:line 170
   at Robust.Shared.Physics.Systems.SharedPhysicsSystem.ShouldCollide(EntityUid uid, EntityUid other, PhysicsComponent body, PhysicsComponent otherBody, Fixture fixture, Fixture otherFixture, TransformComponent xform, TransformComponent otherXform) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Physics\Systems\SharedPhysicsSystem.Contacts.cs:line 740
   at Robust.Shared.Physics.Systems.SharedPhysicsSystem.AddPair(EntityUid uidA, EntityUid uidB, String fixtureAId, String fixtureBId, Fixture fixtureA, Int32 indexA, Fixture fixtureB, Int32 indexB, PhysicsComponent bodyA, PhysicsComponent bodyB, ContactFlags flags) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Physics\Systems\SharedPhysicsSystem.Contacts.cs:line 272
   at Robust.Shared.Physics.Systems.SharedPhysicsSystem.AddPair(String fixtureAId, String fixtureBId, FixtureProxy& proxyA, FixtureProxy& proxyB) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Physics\Systems\SharedPhysicsSystem.Contacts.cs:line 304
   at Robust.Shared.Physics.Systems.SharedBroadphaseSystem.FindNewContacts(PhysicsMapComponent component, MapId mapId) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Physics\Systems\SharedBroadphaseSystem.cs:line 228
   at Robust.Shared.Physics.Systems.SharedPhysicsSystem.SimulateWorld(Single deltaTime, Boolean prediction) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Physics\Systems\SharedPhysicsSystem.cs:line 295
   at Robust.Server.GameObjects.PhysicsSystem.Update(Single frameTime) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\EntitySystems\PhysicsSystem.cs:line 35
   at Robust.Shared.GameObjects.EntitySystemManager.TickUpdate(Single frameTime, Boolean noPredictions) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntitySystemManager.cs:line 306
   at Robust.Shared.GameObjects.EntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityManager.cs:line 273
   at Robust.Server.GameObjects.ServerEntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 196
   at Robust.Server.BaseServer.Update(FrameEventArgs frameEventArgs) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 731
   at Robust.Server.BaseServer.<SetupMainLoop>b__67_1(Object sender, FrameEventArgs args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 544
   at Robust.Shared.Timing.GameLoop.Run() in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Timing\GameLoop.cs:line 235
   at Robust.Server.BaseServer.MainLoop() in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 571
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 74
   at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 42
   at Robust.Server.ContentStart.Start(String[] args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\ContentStart.cs:line 10
   at Content.Server.Program.Main(String[] args) in D:\Code\SS14\space-station-14\Content.Server\Program.cs:line 9

2.)

  • do the same with a whitehole or supermatter grenade
  • get a debug assert
Exception has occurred: CLR/Robust.Shared.Utility.DebugAssertException
An unhandled exception of type 'Robust.Shared.Utility.DebugAssertException' occurred in Robust.Shared.dll: 'anchor is invalid'
   at Robust.Shared.Utility.DebugTools.Assert(Boolean condition, String message) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Utility\DebugTools.cs:line 196
   at Robust.Shared.Containers.SharedContainerSystem.Remove(Entity`2 toRemove, BaseContainer container, Boolean reparent, Boolean force, Nullable`1 destination, Nullable`1 localRotation) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Containers\SharedContainerSystem.Remove.cs:line 65
   at Robust.Shared.Containers.SharedContainerSystem.RemoveEntity(EntityUid uid, EntityUid toremove, ContainerManagerComponent containerManager, TransformComponent containedXform, MetaDataComponent containedMeta, Boolean reparent, Boolean force, Nullable`1 destination, Nullable`1 localRotation) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Containers\SharedContainerSystem.cs:line 257
   at Robust.Shared.Containers.SharedContainerSystem.OnParentChanged(EntParentChangedMessage& message) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Containers\SharedContainerSystem.cs:line 694
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass6_0`1.<SubscribeEvent>b__0(Unit& ev) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Broadcast.cs:line 195
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEventCore(EventSource source, Unit& unitRef, EventData subs) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Broadcast.cs:line 335
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEventCore(EntityUid uid, Unit& unitRef, Type type, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 244
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEvent[TEvent](EntityUid uid, TEvent& args, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 218
   at Robust.Shared.GameObjects.EntitySystem.RaiseLocalEvent[TEvent](EntityUid uid, TEvent& args, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntitySystem.cs:line 170
   at Robust.Shared.GameObjects.SharedTransformSystem.RaiseMoveEvent(Entity`2 ent, EntityUid oldParent, Vector2 oldPosition, Angle oldRotation, Nullable`1 oldMap) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedTransformSystem.cs:line 285
   at Robust.Shared.GameObjects.SharedTransformSystem.SetCoordinates(Entity`2 entity, EntityCoordinates value, Nullable`1 rotation, Boolean unanchor, TransformComponent newParent, TransformComponent oldParent) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedTransformSystem.Component.cs:line 595
   at Robust.Shared.GameObjects.SharedTransformSystem.AnchorEntity(Entity`1 entity, Entity`1 grid, Vector2i tileIndices) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedTransformSystem.Component.cs:line 99
   at Robust.Shared.GameObjects.SharedTransformSystem.AnchorEntity(Entity`1 entity, Nullable`1 grid) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedTransformSystem.Component.cs:line 132
   at Robust.Shared.GameObjects.SharedTransformSystem.AnchorEntity(EntityUid uid, TransformComponent xform) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Systems\SharedTransformSystem.Component.cs:line 117
   at Content.Server.Explosion.EntitySystems.TriggerSystem.OnAnchorTrigger(EntityUid uid, AnchorOnTriggerComponent component, TriggerEvent args) in D:\Code\SS14\space-station-14\Content.Server\Explosion\EntitySystems\TriggerSystem.cs:line 152
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass54_0`2.<SubscribeLocalEvent>g__EventHandler|0(EntityUid uid, IComponent comp, TEvent& args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 272
   at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass67_0`1.<EntSubscribe>b__0(EntityUid uid, IComponent comp, Unit& ev) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 460
   at Robust.Shared.GameObjects.EntityEventBus.EntDispatch(EntityUid euid, Type eventType, Unit& args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 634
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEventCore(EntityUid uid, Unit& unitRef, Type type, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 240
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEvent[TEvent](EntityUid uid, TEvent args, Boolean broadcast) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.Directed.cs:line 200
   at Content.Server.Explosion.EntitySystems.TriggerSystem.Trigger(EntityUid trigger, Nullable`1 user) in D:\Code\SS14\space-station-14\Content.Server\Explosion\EntitySystems\TriggerSystem.cs:line 279
   at Content.Server.Explosion.EntitySystems.TriggerSystem.UpdateTimer(Single frameTime) in D:\Code\SS14\space-station-14\Content.Server\Explosion\EntitySystems\TriggerSystem.cs:line 384
   at Content.Server.Explosion.EntitySystems.TriggerSystem.Update(Single frameTime) in D:\Code\SS14\space-station-14\Content.Server\Explosion\EntitySystems\TriggerSystem.cs:line 368
   at Robust.Shared.GameObjects.EntitySystemManager.TickUpdate(Single frameTime, Boolean noPredictions) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntitySystemManager.cs:line 306
   at Robust.Shared.GameObjects.EntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityManager.cs:line 273
   at Robust.Server.GameObjects.ServerEntityManager.TickUpdate(Single frameTime, Boolean noPredictions, Histogram histogram) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityManager.cs:line 196
   at Robust.Server.BaseServer.Update(FrameEventArgs frameEventArgs) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 731
   at Robust.Server.BaseServer.<SetupMainLoop>b__67_1(Object sender, FrameEventArgs args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 544
   at Robust.Shared.Timing.GameLoop.Run() in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Shared\Timing\GameLoop.cs:line 235
   at Robust.Server.BaseServer.MainLoop() in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\BaseServer.cs:line 571
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 74
   at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\Program.cs:line 42
   at Robust.Server.ContentStart.Start(String[] args) in D:\Code\SS14\space-station-14\RobustToolbox\Robust.Server\ContentStart.cs:line 10
   at Content.Server.Program.Main(String[] args) in D:\Code\SS14\space-station-14\Content.Server\Program.cs:line 9
@github-actions github-actions bot added the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Oct 5, 2024
@slarticodefast slarticodefast added T: Bugfix Type: Bugs and/or bugfixes and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Oct 5, 2024
@beck-thompson
Copy link
Contributor

beck-thompson commented Oct 5, 2024

Did some more testing, looks like #28961 is what caused this. I think its getting mad because the "shooter" doesn't exist if its a grenade (and has exploded) so it can't tell if its supposed to cancel it or not? Its weird how much lag it causes though... I think its just running those checks like a lot of times?

@beck-thompson
Copy link
Contributor

Did some more work on this, the "issue" with the warnings is easy to fix (Just check if the shooter was deleted) but the issue is that because you don't know if the shooter is inside the container or not (Its deleted), then the bullets will spawn outside of the container. Try putting a incendiary grenade in a locker and you'll see 😔

I can't really think of a solution besides having like a fake invisible grenade be in the container but that seems totally wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Bugfix Type: Bugs and/or bugfixes
Projects
None yet
Development

No branches or pull requests

2 participants