(2.2.9) Setting `InterScreen` to `INTERSCR` in a level header can causes crashes after clearing the level
Basically, if your level has a level header with InterScreen
set to INTERSCR
, and you beat the level and wait until intermission ends, there's a chance that the game might crash or give you an error message. This is what Glaber was getting with his mod as it turns out.
Turns out that, because the game already uses INTERSCR
for another purpose (as a backup screen in case a screenshot could not be taken at intermission), plus the fact that Y_UnloadData
actually frees the intermission patches unlike in 2.2.8, this can result in the game trying to free the INTERSCR
patch twice. This leads either to a Z_Free: wrong id
I_Error message, or a SIGSEGV elsewhere like from HWR_FreeTextureColormaps
, because by the time the game tries to free the patch a second time it's all garbage in memory.
Luckily this only happens in custom mods, and even then you can easily work around the bug: simply do not use INTERSCR
as a value for InterScreen
directly. If you really wanted that graphic though, make a copy of it and give it a different name. That way the game can't try to free the same patch twice.