Skip to content

Can't launch on Windows, hl2_launcher dies immediately, Access Violation #425

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

Open
eocorekuneho opened this issue Apr 1, 2025 · 0 comments

Comments

@eocorekuneho
Copy link

eocorekuneho commented Apr 1, 2025

Hey!

I'm now trying to build it on Windows 10 22H2 19045.5608, with Visual Studio 2017 15.9.71, MSVC 15.9 v14.16.27023 latest v141 tools, Windows 10 SDK 10.0.17763.0

I was following this: #356, my goal was just to build the engine and run Half-Life 2 with it.

It configures fine, builds and installs fine, though running hl2_launcher.exe does nothing seemingly.

Downloaded game files with DepotDownloader, -app 220 -depot 221 -manifest 3666218991449795038 (so a version that should work - and does work on an Arm linux build) and copied hl2 and platform folders.

I made a "-T debug" build as well and attaching a debugger revealed that it dies with AccessViolation, loading shaderapidx9.dll, or so do I think.

The error comes from cmaterialsystem.cpp from function CMaterialSystem::SetShaderAPI

m_ShaderAPIFactory = CreateShaderAPI( pShaderAPIDLL );

pShaderAPIDLL was "shaderapidx9.dll", tracking the whole thing back it seemed that in CMaterialSystem::CreateShaderAPI this Sys_LoadModule returns with NULL:

m_ShaderHInst = Sys_LoadModule( pShaderDLL );

In the Event Viewer, for these crash lines it said that the causing module was unknown. Exception code 0xc00000005, position of error 0x00000000.

But sometimes the causing module was tier0.dll. Don't know if that's a different case, though. Seems like the release build has "tier0.dll" there and the debug build has "unknown". Also, the above observations were made using the debug build. (The debug build threw me assortion errors so I had time to attach the debugger. The release build dies almost immediately, so apart from a "Access Violation" in the logs of VS, I got nothing more.)

So, maybe these are two separate issues, I'm honestly not sure.

Messing with the dll (removing, replacing it with one from the Steam version) revealed that it can and do find the DLL, because I was getting different errors. At least, I was getting some errors these times.

Now the weirdest part is that this exact build DOES run under Wine. On a different machine under Debian 12, running wine ./hl2_launcher.exe did started up the game (though fonts were missing and the graphics were broken too, but that's a completely different story.)

My (Windows builder) PC:

  • Intel Core i5-3570S, 64bit OS
  • GPU is what is integrated inside that.

Is it related to my machine that I'm trying to build on? Bad version of MSVC? (This is the latest I can get with Visual Studio Installer, for VS2017)

I may try to run it on a different Windows machine. The only one I have I use only for work... (but the Steam version of the game does run on it). Originally, I was doing this in a virtual machine which was a huge fail for different reasons, but if I remember correctly the same thing happened there too; launching hl2_launcher.exe does nothing. It loads something for a short time then the process dies.

I tried different launch parameters, changing resolution, using lower dxlevel, but nothing was different.

Thanks and have a nice day.

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

No branches or pull requests

1 participant