CKFDevPowered / CKF3Alpha

BSD 3-Clause "New" or "Revised" License
38 stars 19 forks source link

Unable to launch CKF3 #2

Closed brokenphilip closed 4 years ago

brokenphilip commented 4 years ago

image

Crashes both steam (newest, error above) & non-steam (Warzone, no errors - just closes) Half-Life versions on Windows 10 1809 64bit.

Here's the minidump file the non-steam version generated, if it helps: mdmp.zip

hzqst commented 4 years ago

see https://github.com/CKFDevPowered/CKF3Alpha/blob/deddd3c2d4c1532620dd01631eb1e733445d07bb/src_ckf/Audio/snd_hook.cpp#L29

You can find new sig with hex-ray IDA : decompile hw.dll with IDA search for xref to text "S_StartDynamicSound: %s volume > 255" then you can find S_LoadSound (the screenshot is for engine 6153, you have to find S_LoadSound for your 8308 engine, in the same way ). sss ssss sssss

selimnahimi commented 4 years ago

I have done the steps described above, however, even after replacing the hex code and compiling successfully, I get a different error message. Not really sure what this one is referring to. Error message

After some digging I figured it's referring to this in gl_hooks.cpp, although I have absolutely no idea where to find the hex code for it.

#define R_STUDIORENDERFINAL_SIG_NEW "\x55\x8B\xEC\x51\x6A\x00\x6A\x00\xC7\x05\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xC7\x05\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xE8"

yuxuanchiadm commented 4 years ago

Fixed 3 crashes with https://github.com/CKFDevPowered/CKF3Alpha/commit/290a1db3be70508e0780e80eb4e23b084d554f63. But there still other crashes.

yuxuanchiadm commented 4 years ago

@HUNcamper Can you check the latest version? "Could not found: SOMETHING" error should be fixed.

yuxuanchiadm commented 4 years ago

I have fixed all crashes. Please check https://github.com/CKFDevPowered/CKF3Alpha/commit/9bb42564c78ad99588009a0d2a1d4b7f01f2907f.

selimnahimi commented 4 years ago

@yuxuanchiadm

Even after:

The game does launch but crashes upon loading the main menu without any error. It gets this far, which is further than before: kép

yuxuanchiadm commented 4 years ago

@HUNcamper Need more information for further investigation. Minidump upon crashes will help.

selimnahimi commented 4 years ago

How can I get Half-Life to generate a minidump?

hzqst commented 4 years ago

check C:\Program Files (x86)\Steam\dumps\ and you will minidump files.

selimnahimi commented 4 years ago

Here it is: crash_hl.exe_20191212123724_1.dmp.zip

selimnahimi commented 4 years ago

Another weird occurence is when I launch the game in cmd (not through Steam) like this: hl.exe -game ckf3 The following happens: https://www.youtube.com/watch?v=DCb83uDuA0c

Can only navigate the main menu using the arrow keys, and it's obvious that in this state the game is using the CS base to run. Upon loading a map I can't do anything because the team/class selection menu instantly closes.

When launching using ckf3.exe, it gets to the loading screen but crashes as mentioned before. I have a feeling it has to do something with the exe.

brokenphilip commented 4 years ago

Another weird occurence is when I launch the game in cmd (not through Steam) like this: hl.exe -game ckf3 The following happens: https://www.youtube.com/watch?v=DCb83uDuA0c

Can only navigate the main menu using the arrow keys, and it's obvious that in this state the game is using the CS base to run. Upon loading a map I can't do anything because the team/class selection menu instantly closes.

When launching using ckf3.exe, it gets to the loading screen but crashes as mentioned before. I have a feeling it has to do something with the exe.

I remember having the exact same issue a while ago (the crash one as well), even before Half-Life got updated on Steam.

yuxuanchiadm commented 4 years ago

Another weird occurence is when I launch the game in cmd (not through Steam) like this: hl.exe -game ckf3 The following happens: https://www.youtube.com/watch?v=DCb83uDuA0c

Can only navigate the main menu using the arrow keys, and it's obvious that in this state the game is using the CS base to run. Upon loading a map I can't do anything because the team/class selection menu instantly closes.

When launching using ckf3.exe, it gets to the loading screen but crashes as mentioned before. I have a feeling it has to do something with the exe.

Game should launch with the -steam flag like: hl.exe -steam -game ckf3

selimnahimi commented 4 years ago

OK! I don't know what was wrong with my installation but after completely getting rid of the Half-Life folder from Steam and re-installing everything, then replacing the DLLs, it works! Hooray, something was wrong on my end. You can close the issue.

kép

yuxuanchiadm commented 4 years ago

OK! I don't know what was wrong with my installation but after completely getting rid of the Half-Life folder from Steam and re-installing everything, then replacing the DLLs, it works! Hooray, something was wrong on my end. You can close the issue.

kép

Then have fun! We got KOTH mode and some new maps recently😄

selimnahimi commented 4 years ago

Then have fun! We got KOTH mode and some new maps recently😄

Nice! Will you release the maps later on or are they available somewhere?

yuxuanchiadm commented 4 years ago

Then have fun! We got KOTH mode and some new maps recently😄

Nice! Will you release the maps later on or are they available somewhere?

Check latest commit https://github.com/CKFDevPowered/CKF3Alpha/commit/7884e93fffd1d67bc2bceffd2f73075ea16e3f52 All currently available maps has being uploaded.

brokenphilip commented 4 years ago

OK! I don't know what was wrong with my installation but after completely getting rid of the Half-Life folder from Steam and re-installing everything, then replacing the DLLs, it works! Hooray, something was wrong on my end. You can close the issue.

kép

Didn't work for me... Even after building & copying the DLLs after completely wiping my Half-Life folder from Steam I'm still having the same issue like in the video you sent. Tested both with ckf3.exe (not crashing for me) as well as hl.exe -steam -game ckf3, same results.

yuxuanchiadm commented 4 years ago

OK! I don't know what was wrong with my installation but after completely getting rid of the Half-Life folder from Steam and re-installing everything, then replacing the DLLs, it works! Hooray, something was wrong on my end. You can close the issue. kép

Didn't work for me... Even after building & copying the DLLs after completely wiping my Half-Life folder from Steam I'm still having the same issue like in the video you sent. Tested both with ckf3.exe (not crashing for me) as well as hl.exe -steam -game ckf3, same results.

Can you check if dlls is in correct location:

Half-Life\ckf3\Audio.dll
Half-Life\ckf3\CaptionMod.dll
Half-Life\ckf3\MetaHook.dll
Half-Life\ckf3\Renderer.dll
Half-Life\ckf3\dlls\mp.dll
Half-Life\ckf3\cl_dlls\client.dll
Half-Life\ckf3\MetaHook\CSBTE.dll
brokenphilip commented 4 years ago

I seem to be missing Half-Life\ckf3\CaptionMod.dll Half-Life\ckf3\Renderer.dll Half-Life\ckf3\MetaHook\CSBTE.dll

Any possible reasons why? While compiling I got a lot of errors saying: Cannot open include file: 'gl/glext.h': No such file or directory, could be that

hzqst commented 4 years ago

https://github.com/KhronosGroup/OpenGL-Registry/blob/master/api/GL/glext.h

brokenphilip commented 4 years ago

After downloading it and placing it in .\src\Interface\gl I was also missing KHR/khrplatform.h, which I downloaded from https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h

Then the build was successful and without errors (I checked and all the DLL files were in place) but when I launch the game I see the background for a split-second and then the game exits with this pop-up: image

yuxuanchiadm commented 4 years ago

After downloading it and placing it in .\src\Interface\gl I was also missing KHR/khrplatform.h, which I downloaded from https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h

Then the build was successful and without errors (I checked and all the DLL files were in place) but when I launch the game I see the background for a split-second and then the game exits with this pop-up: image

This happens when CaptionMod cannot find Renderer. You could check Renderer is compiled correctly and loaded correctly.

brokenphilip commented 4 years ago

After debugging I had noticed that the Renderer.dll loads, then shortly after unloads itself, as shown in the debug logs VS gave me here: https://pastebin.com/83n3nCr4

If it helps, I've noticed that the messagebox sent by CaptionMod\engfuncs.cpp upon game launch is the first one (hRenderer): image

At this point I feel like I reached a dead-end, I'm pretty new to compiling projects of this size so any tips would be appreciated :)

yuxuanchiadm commented 4 years ago

Place breakpoint at .\src\Renderer.cpp:72. Check the value of g_hRenderer returned by Sys_LoadModule. Use GetLastError to get errorcode if it returns NULL.

brokenphilip commented 4 years ago

I just got the notification, apologies for my inactivity.

I've been trying to find solutions for the past couple of days but with no results. The only thing that I found out from the debugger is that g_hRenderer indeed returns NULL with a GetLastError() result of 126, "The specified module could not be found."

I have checked the value of filepath as well and it returns "ckf3/Renderer.dll" which is where the file is indeed located from the executable's perspective.

I have tried running both executables as admin, setting up the folder and file permissions as well as even copying the dll to several places where it might get found without any luck.

yuxuanchiadm commented 4 years ago

@brokenphilip This may caused by missing DLL dependencies for Renderer.dll. You can use utility like "Dependency Walker" to find out which is missing. But I think probably it is "FreeImage.dll". You can try download and install it here: http://freeimage.sourceforge.net/download.html

brokenphilip commented 4 years ago

I have used the utility and I was indeed only missing FreeImage. After building the FreeImage project and moving the dll to the Half-Life folder the game launched and after playing for a few minutes worked just fine. Thank you so much for helping with my issue! :)