FWGS / xash3d-fwgs

Xash3D FWGS engine.
1.47k stars 224 forks source link

Random crashing when pressing up/down in console #720

Open Velaron opened 2 years ago

Velaron commented 2 years ago

Maybe something introduced with https://github.com/FWGS/xash3d-fwgs/commit/f0073748669b54e17056dfc4a5926610d29a775a

a1batross commented 2 years ago

It would be nice to have stacktrace.

I never encountered crashes with it.

Velaron commented 2 years ago

Can't reproduce it yet, but the crash was on this line, value was out of range iirc https://github.com/FWGS/xash3d-fwgs/blob/947b94d29f0c87a4fd20c6ff3998ed6aea9c721a/engine/client/console.c#L1654

Velaron commented 2 years ago

I found one reproducible example of this crash, but it's not exactly the same actions as I did previously

  1. Type a long string so the console starts scrolling to the side, stupid example: alias test "wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait"
  2. Press Home
xash.dll!__report_securityfailure(unsigned long failure_code) Line 465 (d:\a01\_work\5\s\src\vctools\crt\vcstartup\src\gs\gs_report.c:465)
xash.dll!__report_rangecheckfailure(...) Line 557 (d:\a01\_work\5\s\src\vctools\crt\vcstartup\src\gs\gs_report.c:557)
xash.dll!Field_DrawInputLine(int x, int y, field_t * edit) Line 1654 (d:\Coding\Projects\xash3d-fwgs\engine\client\console.c:1654)
xash.dll!Con_DrawInput(int lines) Line 1978 (d:\Coding\Projects\xash3d-fwgs\engine\client\console.c:1978)
xash.dll!Con_DrawSolidConsole(int lines) Line 2238 (d:\Coding\Projects\xash3d-fwgs\engine\client\console.c:2238)
xash.dll!Con_DrawConsole() Line 2283 (d:\Coding\Projects\xash3d-fwgs\engine\client\console.c:2283)
xash.dll!V_PostRender() Line 486 (d:\Coding\Projects\xash3d-fwgs\engine\client\cl_view.c:486)
xash.dll!SCR_UpdateScreen() Line 579 (d:\Coding\Projects\xash3d-fwgs\engine\client\cl_scrn.c:579)
xash.dll!Host_ClientFrame() Line 3049 (d:\Coding\Projects\xash3d-fwgs\engine\client\cl_main.c:3049)
xash.dll!Host_Frame(float time) Line 681 (d:\Coding\Projects\xash3d-fwgs\engine\common\host.c:681)
xash.dll!Host_RunFrame(float time) Line 144 (d:\Coding\Projects\xash3d-fwgs\engine\common\host_state.c:144)
xash.dll!COM_Frame(float time) Line 194 (d:\Coding\Projects\xash3d-fwgs\engine\common\host_state.c:194)
xash.dll!Host_Main(int argc, char * * argv, const char * progname, int bChangeGame, void(*)(const char *) func) Line 1185 (d:\Coding\Projects\xash3d-fwgs\engine\common\host.c:1185)
xash3d.exe!Sys_Start() Line 146 (d:\Coding\Projects\xash3d-fwgs\game_launch\game.cpp:146)
xash3d.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrevInst, char * cmdLine, int nShow) Line 181 (d:\Coding\Projects\xash3d-fwgs\game_launch\game.cpp:181)
[Inline Frame] xash3d.exe!invoke_main() Line 102 (d:\a01\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:102)
xash3d.exe!__scrt_common_main_seh() Line 288 (d:\a01\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
kernel32.dll!75d46739() (Unknown Source:0)
kernel32.dll![Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] (Unknown Source:0)
ntdll.dll!77378aff() (Unknown Source:0)
a1batross commented 2 years ago

One of possible crashes fixed in 4ae60891.

Try to reproduce another. It's fine on my side.