Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] _restart crashes the game on Linux #140

Open
chinese-soup opened this issue Aug 1, 2021 · 3 comments
Open

[Linux] _restart crashes the game on Linux #140

chinese-soup opened this issue Aug 1, 2021 · 3 comments
Labels

Comments

@chinese-soup
Copy link
Contributor

chinese-soup commented Aug 1, 2021

We all know this happens, but let's not forget about it and maybe eventually fix it, since HL1 client DLL doesn't have this issue (discord integration related maybe?).

Pretty useless ST:

#1  0xf4b07d41 in Cvar_RegisterVariable (variable=0xf4ce5e60 <voice_loopback>) at ../engine/cvar.c:458
#2  0xf4bfa3bf in Voice_RegisterCvars () at ../engine/voice.cpp:338
#3  0xf4b181dd in Host_Init (parms=0xf536b984 <host_parms>) at ../engine/host.c:1810
#4  0xf4b42177 in Sys_InitGame (
    lpOrgCmdLine=0x9a0cb40 "/home/unko/.local/share/Steam/steamapps/common/Half-Life/hl_linux -steam -game ag -condebug -dev -console -novid 0 ", pBaseDir=0x804b220 <szBaseDir> "/home/unko/.local/share/Steam/steamapps/common/Half-Life", pwnd=0xf5361768 <g_Game+8>, 
    bIsDedicated=0) at ../engine/sys_dll2.cpp:803
#5  0xf4b44baa in CEngine::Load (this=0xf4d5eaa0 <g_Engine>, dedicated=false, 
    basedir=0x804b220 <szBaseDir> "/home/unko/.local/share/Steam/steamapps/common/Half-Life", 
    cmdline=0x9a0cb40 "/home/unko/.local/share/Steam/steamapps/common/Half-Life/hl_linux -steam -game ag -condebug -dev -console -novid 0 ") at ../engine/sys_engine.cpp:193
#6  0xf4b42570 in RunListenServer (instance=0x0, basedir=0x804b220 <szBaseDir> "/home/unko/.local/share/Steam/steamapps/common/Half-Life", 
    cmdline=0x9a0cb40 "/home/unko/.local/share/Steam/steamapps/common/Half-Life/hl_linux -steam -game ag -condebug -dev -console -novid 0 ", postRestartCmdLineArgs=0x804d360 <main::szNewCommandParams> "", launcherFactory=0x8049350 <CreateInterfaceLocal(char const*, int*)>, 
    filesystemFactory=0xf5d7fd40 <CreateInterface(char const*, int*)>) at ../engine/sys_dll2.cpp:934
#7  0x08048d67 in main (argc=8, argv=0xfff3bc64) at ../launcher/launcher.cpp:439
@tmp64
Copy link
Contributor

tmp64 commented Aug 2, 2021

Same crash with same stack trace with BugfixedHL. Probably not caused by discord-rpc directly.

Maybe dlclose(client module) call doesn't actually unload the client library, so after engine restart it reuses previously loaded library?

@YaLTeR YaLTeR added the bug label Nov 24, 2021
@chinese-soup
Copy link
Contributor Author

Hm, different stack trace 🤔

hl_linux: /home/unko/repos/OpenAG/pm_shared/pm_shared.c:3364: PM_Init: Assertion `!pm_shared_initialized' failed.

#0  0xf7eea549 in __kernel_vsyscall ()
#1  0xf7ae66e8 in raise () from /usr/lib32/libc.so.6
#2  0xf7acf407 in abort () from /usr/lib32/libc.so.6
#3  0xf7acf2d9 in __assert_fail_base.cold () from /usr/lib32/libc.so.6
#4  0xf7ade9bd in __assert_fail () from /usr/lib32/libc.so.6
#5  0xc9a24b9b in PM_Init (ppmove=0xf6db4b60 <g_clmove>) at /home/unko/repos/OpenAG/pm_shared/pm_shared.c:3364
#6  0xc9980ac1 in HUD_PlayerMoveInit (ppmove=0xf6db4b60 <g_clmove>) at /home/unko/repos/OpenAG/cl_dll/cdll_int.cpp:137
#7  0xf636fcfa in ClientDLL_ClientMoveInit (ppmove=<optimized out>) at ../engine/cdll_int.c:967
#8  ClientDLL_Init () at ../engine/cdll_int.c:462
#9  0xf62d13f0 in Host_Init (parms=0xf6b24984 <host_parms>) at ../engine/host.c:1917
#10 0xf62fb177 in Sys_InitGame (lpOrgCmdLine=0x9a622c0 "./hl_linux -steam -game ag -novid 0 ", pBaseDir=0x804b220 <szBaseDir> ".", pwnd=0xf6b1a768 <g_Game+8>, bIsDedicated=0) at ../engine/sys_dll2.cpp:803
#11 0xf62fdbaa in CEngine::Load (this=0xf6517aa0 <g_Engine>, dedicated=false, basedir=0x804b220 <szBaseDir> ".", cmdline=0x9a622c0 "./hl_linux -steam -game ag -novid 0 ") at ../engine/sys_engine.cpp:193
#12 0xf62fb570 in RunListenServer (instance=0x0, basedir=0x804b220 <szBaseDir> ".", cmdline=0x9a622c0 "./hl_linux -steam -game ag -novid 0 ", postRestartCmdLineArgs=0x804d360 <main::szNewCommandParams> "", launcherFactory=
    0x8049350 <CreateInterfaceLocal(char const*, int*)>, filesystemFactory=0xf7538d40 <CreateInterface(char const*, int*)>) at ../engine/sys_dll2.cpp:934
#13 0x08048d67 in main (argc=4, argv=0xff8f9ce4) at ../launcher/launcher.cpp:439

@tmp64
Copy link
Contributor

tmp64 commented Feb 24, 2022

Really looks like client.so wasn't unloaded so ClientDLL_Init triggered the assertion assert( !pm_shared_initialized );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants