[4.14.1] GZDoom crash when loading map state with Visual Thinkers
Posted: Mon Apr 28, 2025 4:29 pm
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).
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...
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).
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...