Page 1 of 1

Setting a CVar too many times freezes/crashes.

Posted: Wed Jan 01, 2020 7:02 pm
by Guest
Now, I know everything about the event handler screams [Don't do that], but bear with me here. I'm using code elsewhere where SetString/SetInt is called only 2 times per WorldThingDamaged call, and only under specific conditions, yet this still happens if multiple monsters are killed at the same time (though I have to use Russian Overkill for that).

How to reproduce using example below and what happens:
MAP01, UV: start game, type "kill monsters" in console, freeze. Potentially crash to desktop. If you don't crash, hit escape. You can hear the menu open/close sound.
E1M1, HMP: same as above, but phantombeta said this reliably crashes to desktop with error reporter. 8 monsters do, to be precise.

Example: https://drive.google.com/open?id=1dQ8v1 ... s1N7lHAnFS

P.S. Intially I got this error: "Tried to transmit to another node". Then I somehow got another error in the format "NetUpdate: Node %d missed too many tics".

Re: Setting a CVar too many times freezes/crashes.

Posted: Wed Jan 01, 2020 7:14 pm
by Guest
Whoops, forgot to mention I tested this on gzdoom-x64-g4.3pre-597-g60026ba4f. Sorry 'bout that.

Re: Setting a CVar too many times freezes/crashes.

Posted: Thu Jan 02, 2020 1:36 am
by Graf Zahl
Server CVARs require sending the change through the network interface. But for performance reasons that interface's buffer is static and has limited size. Your repeated changing of the CVAR means that the buffer simply overflows, and I'm sorry to say the code involved here is in a state where fixing such issues is not a trivial thing.

Re: Setting a CVar too many times freezes/crashes.

Posted: Thu Jan 02, 2020 4:45 am
by Guest
Good to know, thanks. I've worked around this issue and it no longers crashes now. My implementation was wrong.

Re: Setting a CVar too many times freezes/crashes.

Posted: Sun Jan 05, 2020 3:11 am
by Dylan Simpson
Hmm, thanks for the tip, it helped

Re: Setting a CVar too many times freezes/crashes.

Posted: Mon Jan 13, 2020 12:48 am
by m8f
Just linking here a thread that was closed as a duplicate of this: viewtopic.php?f=7&t=66943