source-engine icon indicating copy to clipboard operation
source-engine copied to clipboard

Assertion failures (on debug builds) issue

Open LegendaryGuard opened this issue 3 years ago • 16 comments
trafficstars

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

assertionfailure


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.

LegendaryGuard avatar Oct 25 '22 16:10 LegendaryGuard

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.

vsdebughl2assertionsourcevrerrors

LegendaryGuard avatar Oct 25 '22 16:10 LegendaryGuard

Maybe there is a unique adaptation to AMD's CPU?

magisk666 avatar Oct 28 '22 14:10 magisk666

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.

LegendaryGuard avatar Oct 28 '22 16:10 LegendaryGuard

Ha ha, just kidding

magisk666 avatar Oct 28 '22 17:10 magisk666

Dumb question: should be labeled as "non-steam" to tag this kind of issue?

LegendaryGuard avatar Nov 02 '22 22:11 LegendaryGuard

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.

LegendaryGuard avatar Nov 03 '22 23:11 LegendaryGuard

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:

image

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.

image

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

image

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.

LegendaryGuard avatar Nov 04 '22 00:11 LegendaryGuard

Here the full log: engine.log

LegendaryGuard avatar Nov 04 '22 01:11 LegendaryGuard

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.

image

LegendaryGuard avatar Nov 04 '22 13:11 LegendaryGuard

Delete sourcevr.dll or comment out the part that loads it

EnderZip avatar Nov 05 '22 02:11 EnderZip

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.

LegendaryGuard avatar Nov 05 '22 09:11 LegendaryGuard

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:
image

tier1/utlbuffer.cpp : line 728:
image

game/server/baseentity.cpp : line 3371:
image

tier1/datamanager.cpp : line 203:
image




In the game console about game/server/baseentity.cpp has differents outputs (full log): engine.log

LegendaryGuard avatar Nov 05 '22 10:11 LegendaryGuard

There is literally no need to fix these asserts, they are harmless. If you don't want to see them compile on release.

EnderZip avatar Nov 05 '22 10:11 EnderZip

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.

LegendaryGuard avatar Nov 05 '22 10:11 LegendaryGuard

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.

LegendaryGuard avatar Nov 08 '22 23:11 LegendaryGuard

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.

LegendaryGuard avatar Nov 10 '22 11:11 LegendaryGuard