Novum / vkQuake

Vulkan Quake port based on QuakeSpasm
GNU General Public License v2.0
1.8k stars 220 forks source link

map 'A day like no other' can crash on map load and load savegame #709

Closed j4reporting closed 2 months ago

j4reporting commented 2 months ago

this map has def. a few issues

map maj
Mod_LoadTexinfo: 34 texture(s) missing from BSP file

but quite often map maj or loading a savegame can crash the application

Exception thrown at 0x00007FF68E349A23 in vkQuake.exe: 0xC0000005: Access violation reading location 0x000002002301002C.

vkQuake.exe!ResampleSfx(sfx_s sfx, int inrate, int inwidth, unsigned char data) Line 73 C vkQuake.exe!S_LoadSound(sfx_s s) Line 159 C vkQuake.exe!S_PrecacheSound(const char name) Line 348 C vkQuake.exe!CL_ParseServerInfo() Line 1033 C vkQuake.exe!CL_ParseServerMessage() Line 1840 C vkQuake.exe!CL_ReadFromServer() Line 950 C vkQuake.exe!_Host_Frame(double time) Line 957 C vkQuake.exe!Host_Frame(double time) Line 1003 C vkQuake.exe!SDL_main(int argc, char argv) Line 122 C vkQuake.exe!SV_movestep() C vkQuake.exe!invoke_main() Line 107 C++ vkQuake.exe!__scrt_common_main_seh() Line 288 C++ vkQuake.exe!scrt_common_main() Line 331 C++ vkQuake.exe!WinMainCRTStartup(void * formal) Line 17 C++ kernel32.dll!00007ffd02fa7374() Unknown ntdll.dll!00007ffd0491cc91() Unknown

the sound file seems to be always gram1.wav

vsonnier commented 2 months ago

Resample can overflow with such big .wav. Poke @sezero @Shpoike @andrei-drexler, same problem in all other QS derivatives.

vsonnier commented 2 months ago

Thanks @j4reporting for reporting this !

j4reporting commented 2 months ago

It looks like the author of the map concatenated a clip multiple times instead of creating a loop.

I have noticed that other QS derivates also crash, but so far l have not managed to crash the old ironwail 0.7.0 release from March 2023. It seems that this is the only quake engine the map has been tested with.

sezero commented 2 months ago

so far l have not managed to crash the old ironwail 0.7.0 release from March 2023

It can only be due to some dumb luck.

sezero commented 2 months ago

Patch applied to qs as https://github.com/sezero/quakespasm/commit/2e6c7d769454e4456026ed052a6596d70fe33553

andrei-drexler commented 2 months ago

Thanks for the heads up!