Skip to content
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

Crash on level start when using digital distribution versions #11

Open
jdmclark opened this issue May 14, 2019 · 6 comments
Open

Crash on level start when using digital distribution versions #11

jdmclark opened this issue May 14, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@jdmclark
Copy link
Owner

Currently, JkGfxMod does not work with the executables that ship with the Steam version. Root cause is currently unknown. This issue tracks investigation and development work related to the Steam version.

@jdmclark jdmclark added the bug Something isn't working label May 14, 2019
@jdmclark
Copy link
Owner Author

General note for switching between the Steam and CD-ROM versions:

Whenever Jedi Knight is launched from Steam, it will try to install a compatibility shim that affects all other Jedi Knight installations but not itself. I haven't dug into exactly what this compatibility shim is doing, but at minimum it's forcing some bad compat options (like requiring admin privileges). You can uninstall the shim by running this in an administrator command prompt from your Steam JK directory:

sdbinst -u JediKnightDarkForces2.sdb

jdmclark added a commit that referenced this issue May 14, 2019
The Steam version was modified to periodically call
ChangeDisplaySettingsA inside menu rendering functions. Ostensibly this
is to force the game to show the menu in fullscreen on modern computers,
but since JkGfxMod already handles this it is more annoying than
anything.

The call is just being suppressed for now.

This change also adds a configuration option, "log_path", which is
useful for turning on logging when it is inconvenient to change
environment variables.

Comment #11
@jdmclark
Copy link
Owner Author

Current status:

JkGfxMod can inject into the Steam version by the following process:

  • Rename JediKnight.exe to JediKnightTemp.exe
  • Rename inject.exe to JediKnight.exe
  • Set the command configuration option to JediKnightTemp.exe
  • Run Jedi Knight from Steam

The intro cutscene and main menu appear correctly. The Steam overlay notification appears, but won't pop over when Shift+Tab is pressed (does this even work in the native version?). Getting JkGfxMod working with the Steam version and overlay does seem possible, if not feasible.

The game crashes to desktop after loading a level. This happens shortly after Jedi Knight calls IDirect3D::Initialize with too few arguments, which is something that doesn't happen in the CD-ROM version of Jedi Knight. I'm not sure why they would have added this; IDirect3D::Initialize does nothing according to the SDK docs. The Steam version also seems to crash with an access violation when there's a debugger attached, so I'm not having much luck investigating this crash so far.

@jdmclark
Copy link
Owner Author

Steam can be used as a launcher by following these steps:

  • Copy the CD-ROM version of JK.exe to your Steam directory
  • Rename JK.exe to JediKnightTemp.exe
  • Rename inject.exe to JediKnight.exe
  • Set the command configuration option to JediKnightTemp.exe
  • Run Jedi Knight from Steam

This makes Jedi Knight run with JkGfxMod, with the Steam overlay fully working, and even with the Steam soundtrack fix.

This isn't a real solution, but at least it demonstrates the problem isn't Steam. I think there's something very wrong with the JediKnight.exe that Steam ships.

jdmclark added a commit that referenced this issue May 14, 2019
Steam automatically passes the -windowgui command line option as a
Windows compatibility workaround. If you're using JkGfxMod this really
isn't what you want, and it causes the game to behave poorly if you're
using a non-Steam executable launched under Steam.

inject.exe now filters out the -windowgui command line option if
fullscreen is enabled in the configuration file. I've been waffling
about this change for a while, since if non-Steam users do specify
-windowgui on the command line they are probably doing it for a good
reason. However, this is the cleanest workaround for the majority of
Jedi Knight players.

Comment #11
@Blackbird88
Copy link

Are those EXEs supported? I tested them, but it's hard to tell if they work.
http:https://jkdf2.net/index.php?page=ProjectDisplay&pid=96

@jdmclark
Copy link
Owner Author

Hello @Blackbird88

Unfortunately, I can't guarantee support for unofficial patches. There are too many of them. If they seem to work for you, though, then they're probably fine.

@jdmclark jdmclark changed the title Add support for Steam version Add support for Steam executable May 17, 2019
@jdmclark
Copy link
Owner Author

#39 suggests this bug may affect the GOG version as well.

@jdmclark jdmclark changed the title Add support for Steam executable Crash on level start when using digital distribution versions Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants