Music Fade Crash
Most notoriously known as MusicChange crash, or just music crash, the game can occasionally crash when calling a music fade alongside a MusicChange hook. HOWEVER, recently it has come to my attention that this isn't inherently an issue with the MusicChange hook itself, and is rather an issue with any form of music fading, as the same crash can also occur when using front texture offsets to fade music with Linedef Type 413 - Change Music, meaning it isn't inherently a lua exclusive issue. This is also the true cause behind #826.
Copied from my comment on #826:
My own research on this issue has led me to believe it may possibly be some sort of memory leak, which would explain why a consistent means of reproduction has been so difficult. It is definitely related to music fading, which is why crashes occur when detransforming from super or immediately after killing a boss. It always occurs when any mod loaded uses the MusicChange hook, and becomes more common the more mods are loaded. MRCE uses a MusicChange hook for hyper music and S_ChangeMusic for the custom intermission, but the latter has a very high crash rate that grows exponentially when more mods are loaded, and never crashed at all before the prior was added (it would also almost always crash if other mods were loaded that used MusicChange hooks). It got so bad that I had to disable the musicchange, now the intermission just keeps playing the level music. But because it now has a MusicChange hook, it still crashes on occasion whenever a music fade occurs. Because it may possibly be a memory leak, consistent reproduction without a ton of mods seems nigh impossible, especially since it may be different between devices.
pasted from discord:
the worst part tho is that since it's (maybe) a memory leak, it almost never generates an RPT. Almost. 9 times in 10 the crash just looks like the game closing itself. Occasionally you'll see the game lag a ton right before this, sometimes you get really weird console errors. "WARNING: error in error handling" being the most common. iirc "WARNING: WARNING" can occur as well. Very rarely tho, it can trigger a normal sigsegv. When it does, it actually generates an RPT. But when it does sigsegv, it usually still hard crashes immediately, causing the application to close itself.
Linked here is an RPT with 4 crashes successfully reproducing the crash, performed in v2.2.11-pre1 from #prerelease-testing in the discord