halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[CS] game_player_equip HE grenade server crash

Open tyftler opened this issue 13 years ago • 5 comments

If a player triggers a game_player_equip and receives a HE grenade, but already has one, you can see a small HE model falling slowly down at the point where the player is standing for about 1 or 2 seconds. If this player now moves away and another one touches this model, the server will crash.

tyftler avatar Feb 05 '13 18:02 tyftler

is this not related to/a dupe of #1270 ?

alfred-valve avatar Feb 05 '13 19:02 alfred-valve

No, it's another issue and has nothing to do with that.

tyftler avatar Feb 05 '13 19:02 tyftler

@alfred-valve I also sent you crash dumps via email, and a map related to this crashing issue.

xPaw avatar Feb 05 '13 20:02 xPaw

[proposed code change] In void CBasePlayerItem::AttachToPlayer ( CBasePlayer *pPlayer ) change pev->nextthink = gpGlobals->time + .1; to pev->nextthink = 0; SetThink( NULL ); [/proposed code change] this will prevent further attempts to materialize item, which again assign Touch which triggers second AddToPlayer, which schedule item removal and then leads to delayed crash in GetWeaponData because item is deleted while still attached to player.

This is a bug in HLSDK. It is very similar to described in topic start. There is a map for HLDM named "endcamp" with destroyable crates. When you destroy them, weapon_satchel is spawned on a height of about 60 units. If player catch them in fly - server crashes.

LevShisterov avatar Feb 11 '13 06:02 LevShisterov

I tested this out using a map designed to have a bot receive grenades every second. The grenade falls through a clip brush so a player can touch the grenade. I am unable to pick up the grenade as it falls, even after it has touched the ground.

Picking up a grenade and then touching the other one produces no change in behavior.

afbeelding

Note that i tested this in Condition Zero, but i doubt there is any difference in code that could affect this. The code that i checked involving the spawning, falling and touching of grenades seems to be identical.

Perhaps it was fixed and the issue was never closed, or the crash was caused by a plugin? I recommend checking the commit history for the code in question to see if anything was changed.

SamVanheer avatar Apr 25 '19 17:04 SamVanheer