Raised This Month: $ Target: $400
 0% 

Solved clients freeze when they execute a loop alias


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GerPunisher_
Junior Member
Join Date: Mar 2022
Old 02-27-2023 , 10:19   clients freeze when they execute a loop alias
Reply With Quote #1

my server players are complaining that their game freeze whem they try to execute a looped alias like this :

HTML Code:
alias disco "sm_light 255 0 0;wait 100;sm_light 0 255 0;wait 100;sm_light 0 0 255;wait 100;repeat"
alias repeat "wait 100;disco"
bind F12 disco
when they try to execute the disco command their game freeze and they have to restart their whole computer to get back into their operating system.

i tried myself to diagnostic the cause of the freeze, i moved my plugins folder to another place as a backup and i installed a fresh copy of sourcemod 1.11 with only the base plugins and the freeze still happens, then i started to disable the base plugins one by one to see which one is causing the freeze.

i found that basecommands is the plugin resposible of that freeze. when i disable it, the above disco loop alias works as intented without any freezes..

at first sight i thought that maybe there is a settings in sourcemod that prevent clients from executing multiple command at once, but i didnt find any config or cvar that is related to the delay between the commands that a client can execute, except that one located in sourcemod.cfg which is related to anti-flood :
Code:
sm_flood_time 0.75
i tried to change it to 0 but it doesnt make any change, the client game still freeze.

i dont want to disapoint my server players with the bad news that they cant use disco light anymore,because it is working in other servers and also it works before in my server a long time ago but i dont remember what sourcemod version or build i waas using at that time
if there is anything i can do or should i just pass the bad news

Last edited by GerPunisher_; 02-27-2023 at 21:10. Reason: grammar mistakes
GerPunisher_ is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-27-2023 , 13:51   Re: clients freeze when they execute a loop alias
Reply With Quote #2

maybe is some issue with logging actions, if the commands are logged to a file, it may become big or frequently updated causing "lag".

in the binding command example, your clients are calling sm_light running around 10x per second.

also should be better adding the "disco" option as a plugin feature instead.
__________________
Marttt is offline
AdRiAnIlloO
Member
Join Date: Jul 2015
Location: Spain
Old 02-27-2023 , 16:43   Re: clients freeze when they execute a loop alias
Reply With Quote #3

I'd say you have the value sv_allow_wait_command 0. This at least will cause infinite stack recursion with looping scripts.

Last edited by AdRiAnIlloO; 02-27-2023 at 16:45.
AdRiAnIlloO is offline
BeepIsla
Member
Join Date: Mar 2020
Location: Germany
Old 02-27-2023 , 16:46   Re: clients freeze when they execute a loop alias
Reply With Quote #4

What game? Some games have the wait command forcefully disabled like CSGO iirc. Depending on what the command does you can just rewrite the plugin logic to be automatic server-side
BeepIsla is offline
GerPunisher_
Junior Member
Join Date: Mar 2022
Old 02-27-2023 , 21:07   Re: clients freeze when they execute a loop alias
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
maybe is some issue with logging actions, if the commands are logged to a file, it may become big or frequently updated causing "lag".

in the binding command example, your clients are calling sm_light running around 10x per second.

also should be better adding the "disco" option as a plugin feature instead.
i just searched for the disco plugin and it looks good, i might use it as a solution. thank you
GerPunisher_ is offline
GerPunisher_
Junior Member
Join Date: Mar 2022
Old 02-27-2023 , 21:08   Re: clients freeze when they execute a loop alias
Reply With Quote #6

Quote:
Originally Posted by AdRiAnIlloO View Post
I'd say you have the value sv_allow_wait_command 0. This at least will cause infinite stack recursion with looping scripts.
yes it was set to 0 , i just set the cvar to "1" and tested it and it works no more freezes yaay!
thank you very much ♥!

Last edited by GerPunisher_; 02-27-2023 at 21:10.
GerPunisher_ is offline
GerPunisher_
Junior Member
Join Date: Mar 2022
Old 02-27-2023 , 21:09   Re: clients freeze when they execute a loop alias
Reply With Quote #7

Quote:
Originally Posted by BeepIsla View Post
What game? Some games have the wait command forcefully disabled like CSGO iirc. Depending on what the command does you can just rewrite the plugin logic to be automatic server-side
left 4 dead 1
GerPunisher_ is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode