ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.55k stars 594 forks source link

[Linux] [CS1.6] couldn't exec maps/de_dust2_load.cfg #3738

Open nphalem opened 4 months ago

nphalem commented 4 months ago

Recently, I tried to view a demo using viewdemo command and each time I try it, the game crashes. While trying to fix the issue, as per someones suggestion, I tried to first load the map on which the demo was played and then load the demo.

Then, I noticed that I can't even load the maps properly. I entered the following into the console:

map de_dust2

and I got this error in the console couldn't exec maps/de_dust2_load.cfg.

This file doesn't exist. This happens with every other map I tried, just different _load.cfg file. When the map is loaded, most of the hud is missing and I don't have any weapons by default. I can buy them from shop and then use them though.

Can someone please help me resolve this issue? I will provide any information that is needed.

nphalem commented 4 months ago

Tried Verify integrity of game files which didn't helped.

Also for launch options I only use mesa_glthread=true

SamVanheer commented 4 months ago

Try setting maxplayers to 32 before trying to load the map or demo.

nphalem commented 4 months ago

Try setting maxplayers to 32 before trying to load the map or demo.

This fixes map loading. However, I'm still unable to viewdemo. The game just crashes. Should I open a new issue for this?

I don't get any error message or nothing and game just crashes. How can I collect some logs to provide you with more information?

SamVanheer commented 4 months ago

Which version of the game was this demo recorded with? Only demos recorded with the current version can be properly played.

Providing the demo file should allow a Valve developer to debug the issue by running the game with a debugger attached but that's not something us modders can do.

nphalem commented 4 months ago

I don't think it's a specific demo issue since it's recently recorded (a day ago) and any other demo is not working as well. Just calling the viewdemo command crashes the game.

But here is a demo as well:

later.zip

nphalem commented 3 months ago

Any update on this? Is there more info needed? Issue still persists.

0Ky commented 3 months ago
couldn't exec maps/de_dust2_unload.cfg
couldn't exec maps/de_dust2_load.cfg

@nphalem Those warning messages are normal, you can ignore them as it has nothing to do with the issue you're facing. Try deathmatch 1;maxplayers 32 before you use the map command.

nphalem commented 3 months ago
couldn't exec maps/de_dust2_unload.cfg
couldn't exec maps/de_dust2_load.cfg

@nphalem Those warning messages are normal, you can ignore them as it has nothing to do with the issue you're facing. Try deathmatch 1;maxplayers 32 before you use the map command.

@0Ky I'm able to load the map if I set the maxplayers but the executing viewdemo crashes the game each time. Is there something else I can do to help you figure out what's causing this bug?

0Ky commented 3 months ago

@nphalem Before opening the game use the following launch options: -dev +developer 2 +fs_perf_warnings 1 -condebug -console -debug

Then find the qconsole.log in the Half-Life directory and post the contents. You also might want to look at the core dump and get the stack trace.

In your https://github.com/ValveSoftware/halflife/issues/3738#issuecomment-1876700542 you've posted a demo which works fine using the playdemo command and based on https://github.com/ValveSoftware/halflife/issues/3551#issuecomment-1852495039 I believe viewdemo is already known to be broken.

0Ky commented 3 months ago

The issue appears to be related to VGUI, particularly the part of the system that handles the demo player dialog, specifically when the game attempts to apply scheme settings to the DemoPlayerDialog. This suggests there might be a problem with the UI elements or resources.

Here's the stack trace when running only the command viewdemo without a demo file:

#0  0xcb2d019f in CDemoPlayerDialog::ApplySchemeSettings (this=0x857ebb0, pScheme=0x87da700) at ../GameUI/DemoPlayerDialog.cpp:139
#1  0xcb346c43 in vgui2::Panel::PerformApplySchemeSettings (this=0x857ebb0) at ../vgui2/controls/Panel.cpp:1871
#2  0xf47c6524 in BaseUISurface::InternalSchemeSettingsTraverse (this=this@entry=0xf4f45660 <g_BaseUISurface>, panel=panel@entry=142933280, forceApplySchemeSettings=forceApplySchemeSettings@entry=false)
    at ../engine/vgui2/BaseUISurface.cpp:1379
#3  0xf47c6524 in BaseUISurface::InternalSchemeSettingsTraverse (this=this@entry=0xf4f45660 <g_BaseUISurface>, panel=panel@entry=142700224, forceApplySchemeSettings=forceApplySchemeSettings@entry=false)
    at ../engine/vgui2/BaseUISurface.cpp:1379
#4  0xf47c6524 in BaseUISurface::InternalSchemeSettingsTraverse (this=this@entry=0xf4f45660 <g_BaseUISurface>, panel=panel@entry=142690080, forceApplySchemeSettings=forceApplySchemeSettings@entry=false)
    at ../engine/vgui2/BaseUISurface.cpp:1379
#5  0xf47c6524 in BaseUISurface::InternalSchemeSettingsTraverse (this=this@entry=0xf4f45660 <g_BaseUISurface>, panel=panel@entry=142189456, forceApplySchemeSettings=forceApplySchemeSettings@entry=false)
    at ../engine/vgui2/BaseUISurface.cpp:1379
#6  0xf47c6558 in BaseUISurface::SolveTraverse (this=0xf4f45660 <g_BaseUISurface>, panel=142189456, forceApplySchemeSettings=forceApplySchemeSettings@entry=false) at ../engine/vgui2/BaseUISurface.cpp:1393
#7  0xd606235a in CVGui::RunFrame (this=0xd607a340 <g_VGui>) at ../vgui2/src/vgui.cpp:452
#8  0xf47c197e in CBaseUI::Paint (this=0xf4f455e0 <g_BaseUI>, x=636, y=280, right=1280, bottom=720) at ../engine/vgui2/BaseUI_Interface.cpp:624
#9  0xf47939e5 in VGuiWrap2_Paint () at ../engine/vgui_intwrap2.cpp:233
#10 0xf476b725 in SCR_UpdateScreen () at ../engine/gl_screen.c:839
#11 0xf476ba22 in SCR_UpdateScreen () at ../engine/gl_screen.c:864
#12 0xf46a9135 in Host_UpdateScreen () at ../engine/host.c:1264
#13 _Host_Frame (time=time@entry=0.000307172013) at ../engine/host.c:1503
#14 0xf46a9278 in Host_Frame (time=0.000307172013, iState=1, stateInfo=stateInfo@entry=0xffd3441c) at ../engine/host.c:1549
#15 0xf46da3c4 in CEngine::Frame (this=0xf493cf40 <g_Engine>) at ../engine/sys_engine.cpp:245
#16 0xf46d7424 in RunListenServer (instance=0x0, basedir=0x804d120 <szBaseDir> "/home/user/.local/share/Steam/steamapps/common/Half-Life", 
    cmdline=0x807e550 "/home/user/.local/share/Steam/steamapps/common/Half-Life/hl_linux -steam -game cstrike -debug", postRestartCmdLineArgs=0x804f260 <main::szNewCommandParams> "", 
    launcherFactory=0x80497f0 <CreateInterface(char const*, int*)>, filesystemFactory=0xf617b450 <CreateInterface(char const*, int*)>) at ../engine/sys_dll2.cpp:968
#17 0x0804905b in main (argc=5, argv=0xffd34684) at ../launcher/launcher.cpp:469

@nphalem You may want to try using steam_legacy (right click game -> properties -> betas tab -> select steam_legacy) and then view the demo using the viewdemo command.

nphalem commented 3 months ago

@nphalem Before opening the game use the following launch options: -dev +developer 2 +fs_perf_warnings 1 -condebug -console -debug

Then find the qconsole.log in the Half-Life directory and post the contents. You also might want to look at the core dump and get the stack trace.

In your #3738 (comment) you've posted a demo which works fine using the playdemo command and based on #3551 (comment) I believe viewdemo is already known to be broken.

Thank you for the explanation and the time you took to help :)

Here is qconsole.log

nphalem commented 3 months ago

Replying to https://github.com/ValveSoftware/halflife/issues/3738#issuecomment-1913793666

Again, thank you for your time. Switching back to steam_legacy fixes the viewdemo issue.

GB-YellowJello commented 3 months ago

I'm still having issues loading any maps through the map cs_xyz command. This occurs on both pre-25th anniversary and modern builds. The error I get shows Host_Error: UserMsg: Not Present on Client 66 as well, though it switches between 66 and 67. Changing maxplayers to 32 and deathmatch 1 prior to opening the map did not fix the issue. I'm not trying to view demos, I'm just trying to open a map.

Here is my qconsole.log. I tried loading both cs_labyrinth and de_dust. I got as far as the skin selection screen on de_dust, which really shouldn't have popped at all considering I accessed the map via the map de_dust2 command.

Update: This issue seems to be map related. Currently I'm making a new map, and if I use the console command map so_and_so to certain maps (in this case the one I'm currently making), and THEN switch to one of the other maps that are crashing, the error does not occur. This isn't really a fix but it's currently working as a temporary workaround. If there's anyone that may have a solution it'd be greatly appreciated.

0Ky commented 3 months ago

@GB-YellowJello It seems like you are running metamod and amxmodx. Can you please follow the steps below and let me know how it goes.

Disable Addons:

  1. Temporarily rename your addons folder to _addons to ensure they're not interfering with the game. This is a precautionary step to rule out conflicts from third-party modifications.
  2. Do the same for cstrike_addon in Half-Life folder if it exists.

Configure Steam Settings:

  1. In your Steam library, right-click on the game and select 'Properties'.
  2. Under the Betas tab, ensure that None is selected for beta participation. This step ensures you're running the latest stable version of the game.
  3. Go to the Installed Files tab and click on Verify Integrity of game files. This process will check for any corrupted or missing files and replace them as needed.

In-Game Console Commands:

  1. Start the game, and before executing any map commands, open the console.
  2. Type deathmatch 1;maxplayers 32 and press Enter.
  3. Then type map de_dust2 to test if the game crashes.
0Ky commented 3 months ago

@GB-YellowJello If the issue persists after following the steps in my previous comment https://github.com/ValveSoftware/halflife/issues/3738#issuecomment-1938174778 you may want to create a new issue.