[Duplicate] Calling CVar.SetString too often with big strings crashes.

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Calling CVar.SetString too often with big strings crashes.

Postby Frederick Climmleduck » Sun Jan 12, 2020 12:31 pm

Hi! CVar guy here with yet another CVar-related crash. Tested on g4.3pre-660-ge3eae62af (x64).

Load the example, start a new game, crash after 10 tics. One thing I want to mention is that in this case the string is just pointless revenant screaming, but I have a real scenario where the string contains the JSON of a dictionary and the string is about 8000 characters in length and it'll keep growing. In that scenario, changing the update time to be once every 3 seconds instead of 10 tics works fine for now, but in the case of this example it does nothing. It'll just crash anyway after that much time has passed.

Example: https://drive.google.com/open?id=1wXjtk ... aMHhPYyFYy
CrashReport.zip included in download.

P.S. It's possible to work around this by splitting the text into multiple strings with a length of 5000 chars each, but I'd rather see if this can get fixed engine-side first before I dedicate myself to such hax.
Frederick Climmleduck
 

Re: Calling CVar.SetString too often with big strings crashe

Postby Graf Zahl » Sun Jan 12, 2020 12:37 pm

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Calling CVar.SetString too often with big strings crashe

Postby Frederick Climmleduck » Sun Jan 12, 2020 12:54 pm

Hm, figured I should have named this thread differently. Thing is, this happens even if I set the CVar once in a long while. It occurs when the string passed to SetString is too long (in the example it's about 14K characters in length). Ultimately it could be the same bug in the engine, I don't know. Thought I'd mention this just in case.
Frederick Climmleduck
 

Re: Calling CVar.SetString too often with big strings crashe

Postby Graf Zahl » Sun Jan 12, 2020 1:07 pm

It's the same problem, i.e. the string's size makes the network buffer overflow.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests