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.62k stars 3.27k forks source link

Electrocution exception #18460

Open ElectroJr opened 1 year ago

ElectroJr commented 1 year ago

From grafana

Can't resolve "Content.Server.Electrocution.ElectrifiedComponent" on entity 146816!
   at Content.Server.Electrocution.ElectrocutionSystem.PlayElectrocutionSound(EntityUid targetUid, EntityUid sourceUid, ElectrifiedComponent electrified) in /home/runner/work/space-station-14/space-station-14/Content.Server/Electrocution/ElectrocutionSystem.cs:line 494
   at Content.Server.Electrocution.ElectrocutionSystem.DoCommonElectrocution(EntityUid uid, Nullable`1 sourceUid, Nullable`1 shockDamage, TimeSpan time, Boolean refresh, Single siemensCoefficient, StatusEffectsComponent statusEffects) in /home/runner/work/space-station-14/space-station-14/Content.Server/Electrocution/ElectrocutionSystem.cs:line 438
   at Content.Server.Electrocution.ElectrocutionSystem.OnLightAttacked(EntityUid uid, PoweredLightComponent component, AttackedEvent args) in /home/runner/work/space-station-14/space-station-14/Content.Server/Electrocution/ElectrocutionSystem.cs:line 193
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEvent[TEvent](EntityUid uid, TEvent args, Boolean broadcast) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 182
   at Content.Shared.Weapons.Melee.SharedMeleeWeaponSystem.DoLightAttack(EntityUid user, LightAttackEvent ev, EntityUid meleeUid, MeleeWeaponComponent component, ICommonSession session) in /home/runner/work/space-station-14/space-station-14/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs:line 622
   at Content.Shared.Weapons.Melee.SharedMeleeWeaponSystem.AttemptAttack(EntityUid user, EntityUid weaponUid, MeleeWeaponComponent weapon, AttackEvent attack, ICommonSession session) in /home/runner/work/space-station-14/space-station-14/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs:line 518
   at Content.Shared.Weapons.Melee.SharedMeleeWeaponSystem.OnLightAttack(LightAttackEvent msg, EntitySessionEventArgs args) in /home/runner/work/space-station-14/space-station-14/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs:line 224
   at Robust.Shared.GameObjects.EventBusExt.HandlerWrapper`1.Invoke(EntitySessionMessage`1 msg) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/GameObjects/EventBusExt.cs:line 46
   at Robust.Shared.GameObjects.EntityEventBus.ProcessSingleEventCore(EventSource source, Unit& unitRef, EventData subs, Boolean byRef) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Broadcast.cs:line 324
   at Robust.Server.GameObjects.ServerEntityManager.DispatchEntityNetworkMessage(MsgEntity message) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/GameObjects/ServerEntityManager.cs:line 220
   at Robust.Shared.Network.NetManager.<>c__DisplayClass106_0`1.<RegisterNetMessage>b__0(NetMessage msg) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/Network/NetManager.cs:line 967
   at Robust.Shared.Network.NetManager.DispatchNetMessage(NetIncomingMessage msg) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/Network/NetManager.cs:line 916
   at Robust.Shared.Network.NetManager.ProcessPackets() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/Network/NetManager.cs:line 496
   at Robust.Server.BaseServer.Input(FrameEventArgs args) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/BaseServer.cs:line 678
   at Robust.Shared.Timing.GameLoop.Run() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Shared/Timing/GameLoop.cs:line 184
   at Robust.Server.BaseServer.MainLoop() in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/BaseServer.cs:line 557
   at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Program.cs:line 78
   at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Program.cs:line 46
   at Robust.Server.Program.Main(String[] args) in /home/runner/work/space-station-14/space-station-14/RobustToolbox/Robust.Server/Program.cs:line 25
Vordenburg commented 1 year ago

Looks like this was introduced by #18340. The entities with PoweredLight components will need an ElectrifiedComponent.

Errant-4 commented 1 year ago

Weh. I thought the way I coded it does not actually require electrifiedcomponent and got no warnings in testing then or now. Do we know how to repro this?