More Mario crashes (Lua-related; possibly caused by MusicChange hook)
These crashes were brought to my attention by Adoochi on the MB, and I said I'd post it here for him. Here's the original post.
Proper explanation and crash logs are in this zip folder: SRB2_Mario_Bug_Report.zip
Excerpt from his explanation:
...the crash happened the same way regardless of what other addons I had installed;
Finishing an act while in the Super form had a chance of crashing the game before the results screen could appear. Sometimes it would create a SIGSEGV error, a lot of the time it would just crash to desktop without displaying an error at all.
It also felt like it didn't matter what act I finished; I got crashes on DSZ1, DSZ2, CEZ2, ACZ2, and RVZ. I never got crashes on boss levels, nor when I finished an act without currently being Super.
My current assumption is that it has to do with the music files, as the game always crashed before the custom results jingle could play.
This is reinforced by an error I got while playing: "Error: Music 0 could not be loaded: lump not found!"; specifically this was caused by dying while the "Death Jingle" option was turned on. The Death Jingle still plays, interestingly.
Dying while it's off, however, doesn't cause the error to occur, even if the game is freshly booted.
Switching the game to Midi (and telling it to prioritze Midi over Digital) will still cause the error if Death Jingle is on.
And an excerpt of one of the crash logs:
srb2win.exe caused an Access Violation at location 76338D4A in module msvcrt.dll Reading from location 33A66000.
Registers:
eax=3ba46478 ebx=33b28ea8 ecx=01ff811e edx=00000000 esi=33a66000 edi=1e63ac88
eip=76338d4a esp=0569f060 ebp=0569f068 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00210216
AddrPC Params
76338D4A 1E627D28 33A530A0 07FF33D8 msvcrt.dll!memcpy
0062351C 007F3C65 33AA0EA0 1E627D10 srb2win.exe!luaV_concat
006211DE 1D994300 00000001 00000005 srb2win.exe!luaS_newlstr
006112D9 1D994300 007F3C09 00000000 srb2win.exe!luaO_pushvfstring
0060813F 1D994300 007F3C49 0569F1C4 srb2win.exe!lua_pushlstring
006151EB 16EF91C8 1E0E91F8 007F40CA srb2win.exe!luaL_error
00621286 1D994300 007F3C49 00000001 srb2win.exe!luaS_newlstr
006152BF 00000000 00000000 00000000 srb2win.exe!luaL_argerror
00610DFF 00000000 00000000 00000000 srb2win.exe!luaM_realloc_
On my own side, I have a feeling these are actually MusicChange hook crashes that were somehow not resolved by !1671 (merged). It would make sense considering the game seems to crash only when he detransforms from super finishing a level or dies with the death jingle turned on, both of which involve music changes.