source-engine
source-engine copied to clipboard
Assertion failures (on debug builds) issue
EDIT: I tried on some Windows PCs using HL2 non-steam version, the game isn't loading, checking in the Task Manager, when trying to launch, in a matter of milliseconds, the process status is suspended and after suddenly closes.
The other issues were a bit related to setup the game base correctly and due to the lack of knowledge about how the game base should work. Also about the debug build files while assertion errors are displayed (it isn't really troublesome, it's used for debugging checks, I think).
OLD ISSUE EDIT: Full edit. More info: https://github.com/nillerusr/source-engine/issues/131#issuecomment-1302824791
I tried with HL2 non steam version one. No matter how many times you replace the compiled dlls and hl2_launcher.exe files, using with this symlink:
C:\Users\user\Desktop\backup_hl2_nosteam_nillerusr\hl2.exe -nosteam -insecure -console -windowed -w 1280 -h 720 -allowdebug +developer 5 +net_graph 2
The same HL2 non steam version using debug build pop-ups an assertion failure:
Assertion Failed: ctx.m_eAction == k_ECatchAndWriteMiniDumpAbort

Assertion failures happen with debug builds, these message errors can be pretty annoying for some user who wants to debug the engine.
ATTENTION!!
IMPORTANT NOTE: In Windows, don't use the compiled SDL.dll from lib/win32/amd64, looks corrupted and the game won't load! Use the compiled SDL.dll from lib/win32/x86.
More info. I debugged with Visual Studio 2022 IDE in this another Windows PC with Intel Core i5. Doing the following:
Select Debug > Attach to Process (or press Ctrl+Alt+P in VS) > use the Attach to Process dialog to attach the debugger to the process (in that case select the "launcher.exe" or "hl2_launcher.exe". That's it, the compiled exe from the project).
Reference: https://github.com/nillerusr/source-engine/issues/87#issuecomment-1198674361
It's telling something in materialsystem/cmaterialsystem.cpp, not sure about the exception here though.

Maybe there is a unique adaptation to AMD's CPU?
Maybe there is a unique adaptation to AMD's CPU?
P.D. This isn't CPU issue. Worked when I was playing without the compiled dlls and launcher.exe files and using the downloaded non steam ones on this another Windows PC.
Worked fine in some PCs with non steam version.
Ha ha, just kidding
Dumb question: should be labeled as "non-steam" to tag this kind of issue?
I just checked deeply, non steam version still doesn't seem to work using the compiled files. Gonna to re-edit the issue, it isn't related to different Windows PCs, that happens all PCs. By the other hand, I used other experimental project about non steam version, I'm talking about other repositories, "cool source engine" and "Quiver Source Engine 2007", worked as expected. I don't know how worked for non steam version and without assertion failures.
In the following test, I used with waf.bat configure -T debug and waf.bat install.
After sourcevr.dll error window 3 times pop-up, appears this window:

This indicates the Assert tells what is happening with the source code file at that line. If you press "Ignore All Asserts", the game will continue as if nothing had happened.
I modified code outputs to compare my compiled files to the other ones. I know that this cvar and this customized "Unknown command" message don't exist in the repository, I added just to test.

Curiously, during the gameplay, any achievement can be obtained legally (works as should):

I can't believe that after assertion failures, the game works pretty well, although there are assertion errors in the console messages from left corner (red ones). This should be fixed for sake, nonetheless.
Here the full log: engine.log
Update: when using waf.bat configure -T release and waf.bat install (compiling a release build),
only appears the sourcevr.dll error window popping up 3 times, after that (pressing OK 3 times to these error windows), the game loads quickly without assertion failures. No assertion errors are displayed in the console and left corner messages.
I update the description above, assertion failures happens with debug builds, that should be fixed as I said before, these message errors can be pretty annoying for some user who wants to debug the engine.

Delete sourcevr.dll or comment out the part that loads it
Delete sourcevr.dll or comment out the part that loads it
Done. Works and doesn't display that error. That sourcevr.dll isn't from nillerusr repository compiled files, it's downloaded from that non-steam version game.
I'll modify the description to remove about that and leave assertion errors info.
Collecting all assertion errors using the debug build, also note, these are the same displaying errors in the game console output:
filesystem/filetracker.cpp : line 103:

tier1/utlbuffer.cpp : line 728:

game/server/baseentity.cpp : line 3371:

tier1/datamanager.cpp : line 203:

In the game console about game/server/baseentity.cpp has differents outputs (full log):
engine.log
There is literally no need to fix these asserts, they are harmless. If you don't want to see them compile on release.
I've to warn that the wrong compiled SDL.dll (from lib/win32/amd64) won't load the game on Windows. Use the compiled SDL.dll from lib/win32/x86 instead!
IIRC, the amd64 (64-bits) version on Windows still isn't available as HappyDOGE and others told.
Gotta rename the issue instead creating a new one. There's a problem when trying to run into different PCs. I'll need a full check, not easy as I think though.
I've come to the conclusion that this issue will be like a pending task. It should work without steam, even if you prefer with / without.