Phil25 / RTD

Roll The Dice SourceMod plugin for Team Fortress 2
GNU General Public License v3.0
56 stars 20 forks source link

Infinite loop by using forward RTD2_Removed if any of the players are still on Bad Sauce on round ends. #121

Open kelvinthh opened 3 months ago

kelvinthh commented 3 months ago

Bug description

Using forward RTD2_Removed causes infinite loop when someone is still on Bad Sauce and the round ends. Error: Not enough space on the stack 2024-06-10 at 00 07 44@2x The way I reproduce it: sm_forcertd badsauce on everyone then sm_slay one of the teams to end the round. The loop starts right before the new round starts.

Report checks

Please describe the bug in the section above, then post it and tick the correct boxes below.

I run a Freak Fortress 2 Rewrite server and I reapply some attribute changes when RTD effects wear off. Here's a snippet from the plugin calling the RTD2_Removed forward:

public void RTD2_Removed(int client, RTDPerk perk, RTDRemoveReason reason)
{
    if(reason == RTDRemove_WearOff)
    {
        SetEffect(client);     // The function that applies attribute changes to client, it calls TF2_RegeneratePlayer() somewhere.
    }
}

This seems to be something new after the TF2 64bit update. I didn't get back to game server hosting until the last couple of days. I stayed on 2.5.1 for a while before the update and never had any issue.

Required

Optional

Phil25 commented 2 weeks ago

I'll take a look at it, haven't tested at all on 64 bit servers yet.

kelvinthh commented 2 weeks ago

I'll take a look at it, haven't tested at all on 64 bit servers yet.

No, 64-bit TF2 server never works with SM. Everything reported is running in 32-bit mode (srcds.exe, not the the 64bit one).