Page 1 of 1

[4.14.1] GZDoom crash when loading map state with Visual Thinkers

Posted: Mon Apr 28, 2025 4:29 pm
by JaedenDuhreis
Hello, I have recently found a game-crashing bug, which (seemingly) happens when a map state containing visual thinkers is saved and reloaded (either through game save/load, or by revisiting a map in a hub).
This bug is present in GZDoom 4.14.1 and is NOT present in 4.12.2 or 4.13.2 (maybe something changed in the VisualThinker system and was not reflected in map state saving?).

I made a very simple ZScript wad that I replicate this bug with.
This wad, when run with Hexen IWAD, makes all crystal vial items emit green smoke (visibly consistently spawning visual thinkers).
vtcrash.wad
Simple ZScript WAD for replicating the bug.
(886 Bytes) Downloaded 7 times

Replication 1 (hub revisit):
- open the attached wad with Hexen IWAD
- start MAP01
- move around for a few seconds
- warp to MAP02 (through changemap command in console - moving within a hub)
- warp back to MAP01 (again through changemap - loads hub-saved map state)
- move around for a minute or just wait, game will crash

Replication 2 (savegame load):
- open the attached wad with Hexen IWAD
- start MAP01
- move around for a few seconds
- save game
- load saved game
- game then crashes for me instantly

The game crash happens either as instant very fatal error of access violation, or the game freezes for about a minute and then goes into fatal error that it failed to realocate several gigabytes of memory...

Re: [4.14.1] GZDoom crash when loading map state with Visual Thinkers

Posted: Mon Jun 30, 2025 2:59 am
by JaedenDuhreis
I previously hoped that this issue would be solved by https://github.com/ZDoom/gzdoom/commit/ ... e5502e3748 but unfortunately it was not.
I still reproduce these crashes in 4.15pre-303.

Re: [4.14.1] GZDoom crash when loading map state with Visual Thinkers

Posted: Sat Jul 05, 2025 3:38 pm
by Boondorl
Have hopefully found a fix for this. For some reason on load garbage visual thinkers kept finding their way into the render list.

Re: [4.14.1] GZDoom crash when loading map state with Visual Thinkers

Posted: Sun Jul 06, 2025 10:02 am
by JaedenDuhreis
Thank you, it seems to be working now - not getting anymore of those crashes in build 4.15pre-327.