Closed MrAlaux closed 1 year ago
@Dezaimasu could you download either of these automated builds and attempt to trigger the crash?
Looks like it fixed the issue. No crashes, and the HUD looks normal every time I open the automap, green HUD with glitchy sprites on it was the only consistent problem. I tried multiple maps, different settings, and every time it runs perfectly fine, while previous 2.0.0. version still crashes. Thanks.
Thank you for the report and for testing!
NUGHUD allows to draw any (?) patch available in the loaded WADs.
Some of these patches are, of course, graphics used by other parts of the game, and some of them are given the
PU_STATIC
tag when cached, and the code doesn't expect them to be purged upon e.g. ending a level. However, up until now, all patches cached by NUGHUD were given thePU_CACHE
tag, so they were purged rather often (including exiting of a level).This can be problem, for example, with the Status Bar graphics; these are normally cached only upon initializing the Status Bar, which only happens when (re)starting the screen. If NUGHUD were to use any of those graphics, though, it'd attempt to cache them again, giving them the
PU_CACHE
tag and therefore purging them upon exiting a level. NUGHUD may then cache those graphics again, but the Status Bar code won't, and the pointers it uses aren't updated, so a crash occurs.This potential fix addresses that by making the NUGHUD code cache patches with the
PU_STATIC
tag. They might be cached by other code later and given thePU_CACHE
tag, but NUGHUD can seemingly handle that.