Recently I got fed up with this bug, and put GZDoom through a debugger. This showed almost much nothing, aside from the fact that it was crashing due to apparently accesses to freed memory.
While trying to figure it out, I realized that maybe it was something with the garbage collection... And apparently it is.
Here's an example PK3.
There's two ways to trigger this bug, one is through the shop menu and one is through the weapon assignment menu.
Common steps:
- Load the PK3.
- Start the game.
- Do "GC PAUSE 1", "GC STEPMUL 1000000" and "GC NOW" in the console. (In this order)
- Bind the "Buy Menu" command and activate it or do "S7_LuciusShop" in the console.
- Click around on the items in the list on the left side of the screen.
Weapon assignment menu:
- Give yourself all items
- Bind the "Weap assign menu" command and activate it or do "S7_WeapMenu" in the console.
- Click on an empty/unused, non-blocked spot in the binds grid. This may or may not crash GZDoom.
- Click on a weapon in the list on the bottom of the screen.
(Note: This also happens without messing around with the GC command. The only reason you're supposed to do it for this test PK3 is because it makes it much easier to reproduce the bug. Without doing that, it requires some luck to trigger the bug.)