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

Exceeding an object's damage threshold causes exception #1492

Closed
SoulSloth opened this issue Jul 26, 2020 · 2 comments
Closed

Exceeding an object's damage threshold causes exception #1492

SoulSloth opened this issue Jul 26, 2020 · 2 comments
Assignees
Labels
T: Bugfix Type: Bugs and/or bugfixes

Comments

@SoulSloth
Copy link
Contributor

SoulSloth commented Jul 26, 2020

Reproduction steps:

  • Hit a fuel tank, table wall, with your fists or a tool that isn't the welding torch until the damage threshold is exceeded
  • Observe DebugAssertException: Tried to get component on a deleted entity

This is probably due to the fact that the audio system tries to get the object's location after it's marked as deleted.

Robust.Shared.Utility.DebugAssertException: Tried to get component on a deleted entity.
  at Robust.Shared.Utility.DebugTools.Assert(Boolean condition, String message) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\Utility\DebugTools.cs:48
  at Robust.Shared.GameObjects.Entity.TryGetComponent[T](T& component) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Entity.cs:291
  at Robust.Shared.GameObjects.Components.Transform.TransformComponent.get_GridID() in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Components\Transform\TransformComponent.cs:67
  at Robust.Shared.GameObjects.Components.Transform.TransformComponent.get_GridPosition() in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\Components\Transform\TransformComponent.cs:198
  at Robust.Server.GameObjects.EntitySystems.AudioSystem.PlayFromEntity(String filename, IEntity entity, Nullable`1 audioParams, Int32 range) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Server\GameObjects\EntitySystems\AudioSystem.cs:118
  at Content.Server.GameObjects.Components.Weapon.Melee.MeleeWeaponComponent.Content.Shared.Interfaces.GameObjects.Components.IAttack.Attack(AttackEventArgs eventArgs) in C:\projects\ss14\space-station-14\Content.Server\GameObjects\Components\Weapon\Melee\MeleeWeaponComponent.cs:120
  at Content.Server.GameObjects.EntitySystems.Click.InteractionSystem.DoAttack(IEntity player, GridCoordinates coordinates) in C:\projects\ss14\space-station-14\Content.Server\GameObjects\EntitySystems\Click\InteractionSystem.cs:748
  at Content.Server.GameObjects.EntitySystems.Click.InteractionSystem.HandleWideAttack(ICommonSession session, GridCoordinates coords, EntityUid uid) in C:\projects\ss14\space-station-14\Content.Server\GameObjects\EntitySystems\Click\InteractionSystem.cs:166
  at Robust.Shared.Input.Binding.PointerInputCmdHandler.<>c__DisplayClass2_0.<.ctor>b__0(PointerInputCmdArgs& args) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\Input\Binding\InputCmdHandler.cs:92
  at Robust.Shared.Input.Binding.PointerInputCmdHandler.HandleCmdMessage(ICommonSession session, InputCmdMessage message) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\Input\Binding\InputCmdHandler.cs:112
  at Robust.Server.GameObjects.EntitySystems.InputSystem.InputMessageHandler(InputCmdMessage message, EntitySessionEventArgs eventArgs) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Server\GameObjects\EntitySystems\InputSystem.cs:65
  at Robust.Shared.GameObjects.EventBusExt.HandlerWrapper`1.Invoke(EntitySessionMessage`1 msg) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EventBusExt.cs:23
  at Robust.Shared.GameObjects.EntityEventBus.<>c__DisplayClass7_0`1.<SubscribeEvent>b__0(Object ev) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:151
  at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEvent(EventSource source, Object eventArgs) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:285
  at Robust.Shared.GameObjects.EntityEventBus.RaiseEvent(EventSource source, Object toRaise) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityEventBus.cs:201
  at Robust.Shared.GameObjects.EntityManager.<Initialize>b__22_1(Object sender, Object systemMsg) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\GameObjects\EntityManager.cs:64
  at Robust.Server.GameObjects.ServerEntityNetworkManager.DispatchEntityNetworkMessage(MsgEntity message) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityNetworkManager.cs:161
  at Robust.Server.GameObjects.ServerEntityNetworkManager.HandleEntityNetworkMessage(MsgEntity message) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Server\GameObjects\ServerEntityNetworkManager.cs:126
  at Robust.Shared.Network.NetManager.<>c__DisplayClass85_0`1.<RegisterNetMessage>b__0(NetMessage msg) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\Network\NetManager.cs:879
  at Robust.Shared.Network.NetManager.DispatchNetMessage(NetIncomingMessage msg) in C:\projects\ss14\space-station-14\RobustToolbox\Robust.Shared\Network\NetManager.cs:826
@SoulSloth SoulSloth changed the title Exceeding a fuel tank's damage threshold causes exception Exceeding an object's damage threshold causes exception Jul 26, 2020
@SoulSloth
Copy link
Contributor Author

SoulSloth commented Jul 26, 2020

Moved the audio playing logic before the damage calculation in MeleeComponent, however objects are deleted on the client before they can play the audio when they're destroyed.

@DrSmugleaf
Copy link
Member

Fixed by #1494

rbertoche pushed a commit to rbertoche/space-station-14 that referenced this issue Apr 22, 2023
Morb0 pushed a commit to Morb0/space-station-14 that referenced this issue Oct 24, 2023
rbertoche pushed a commit to rbertoche/space-station-14 that referenced this issue Jun 24, 2024
* Fix Mechs

* Update Content.Server/Mech/Systems/MechSystem.cs

Was

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>

* Update Content.Server/Mech/Systems/MechSystem.cs

Sure

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>

* Update Content.Shared/Mech/EntitySystems/SharedMechSystem.cs

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>

---------

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
Erisfiregamer1 pushed a commit to The-Arcadis-Team/arc-station-14 that referenced this issue Jan 11, 2025
…pace-wizards#1492)

<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->

# Description

<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Adds incompatibility to ensure that someone cannot take negative visual
traits while having cyber-eyes systems, and likewise cannot take
redundant negative visual traits.

Should resolve [this
issue](Simple-Station/Einstein-Engines#1327).

---

<!--
This is default collapsed, readers click to expand it and see all your
media
The PR media section can get very large at times, so this is a good way
to keep it clean
The title is written using HTML tags
The title must be within the <summary> tags or you won't see it
-->

<details><summary><h1>Media</h1></summary>
<p>


![githubphotophobiaimage](https://github.com/user-attachments/assets/fd27ac82-d4b5-4c67-a4ad-35c6be9862b4)


</p>
</details>

---

# Changelog

<!--
You can add an author after the `:cl:` to change the name that appears
in the changelog (ex: `:cl: Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->

:cl:
- fix: You cannot take Photophobia while blind or you have cyber-eyes.
- fix: You cannot take nearsightedness while blind or while having
cyber-eyes.
- fix: You cannot be blind while nearsighted, photophobic, or while
having cyber-eyes.
Erisfiregamer1 pushed a commit to The-Arcadis-Team/arc-station-14 that referenced this issue Jan 11, 2025
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