Page 1 of 1

[??-gd9da513f7]Use after free with HUDMessages and DoomRPG

PostPosted: Sun May 26, 2019 8:46 am
by Edward-san
Sometimes it happens that during my gameplay with DoomRPG SE, if I use the address sanitizer, I get this crash to the desktop:


Moreover, it seems to happen either when multiple events are triggered (which means more HUD messages), or either while doing shopping in the DoomRPG menu. It's really hard to reproduce reliably, so I leave this for now (I won't be able to get a stack trace till tomorrow) (see later).

I got this with Ubuntu 18.04 x64, I don't know if it happens on OSX, I can try later. and also with OSX (makefile + clang + address sanitizer).

Also I got this stack trace (I really miss the 'backtrace full' from gdb):


I reproduced this way: just run `gzdoom -iwad freedoom2.wad -file DoomRPG/DoomRPG` (provided you extracted the zip from github and renamed the folder from DoomRPG-master to DoomRPG), then start a new game and play for some time.

I'll try to make a suitable save file which should allow for easy reproduction of the bug. Managed to do it. See the attached save file.

When you load it, you should start from map01 of freedoom2, with the player having some cheats (god2 + notarget + infinite ammo) and a lot of summoned cyberdemons you'll need to kill them. During the process, in a way or in another, you'll get the crash. If it doesn't happen, try again.

Re: [??-gd9da513f7]Use after free with HUDMessages and DoomR

PostPosted: Fri May 31, 2019 7:09 am
by _mental_
PR with the fix. It's garbage collection in conjunction with linker lists, i.e. usual things, nothing special.

Re: [??-gd9da513f7]Use after free with HUDMessages and DoomR

PostPosted: Thu Jun 06, 2019 12:56 am
by _mental_
It was fixed in 5b32c5b.