-
Notifications
You must be signed in to change notification settings - Fork 54
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
Cyberpunk: forced load libraries instead of RB #163
base: master
Are you sure you want to change the base?
Conversation
I've done some testing with this: The one weird thing I found is that if the game crashes, the crash handler then crashes itself, as it can't find My workaround for this is to make a symlink, eg, in the Cyber Engine Tweaks, going to I wonder if this behavior is the cause of folks thinking it was a flaky approach? |
So you create the symlink in the CET mod folder? That would mean the additional mapping created by MO into the game folder does get catched up by the crash reporter, but the path resolution for Since this is hard for me to reproduce, can you try to add an additional force load to your executable instead of the symlink:
If this does not work, I can probably add an additional (custom) mapping as an alternative. |
Yup
Yes and no, the mapping applies to any process created by the process you originally launch, or something like that? I'm not super familiar with Windows process group dynamics, but emperically seems to be the case -- I'm using REDprelauncher to launch the game, and of course the mappings get passed through to so when Cyberpunk2077.exe does load it's gets the DLLs I told it about. That the symlink fixes the CrashHandler.exe problem is a little weird to me, as yeah, either the VFS follows the symlink itself and makes CrashHandler.exe think version.dll is in its path, or it passes it through and CrashHandler.exe isn't have any problem reading "../version.dll". Which in either case raises the question of why it doesn't work without the symlink (seeing as it can clearly read the file through the VFS and it doesn't have this issue when manually installed). I can't consistently trigger crashes either, but I'm gonna make the changes you suggested to my Force Load Settings and see if the problem recurs the next time a crash does occur. That said, while thinking about this I found a new hypothesis as to why CrashHandler is crashing and why these changes may not help. And... what might actually help: So, let's ask this question: How can CrashHandler.exe even fail to load "version.dll"? This is an important question because it's a core windows system dll -- that's why CET can use a wrapper for it to get itself loaded into memory. If CrashHandler.exe was loading it normally, it'd get it from I think it was loading the DLL for stack trace purposes, and used the path that Cyberpunk2077.exe used. The injected DLL meant that it had no path, and so CrashHandler looked in its current path and found nothing. This'd also explain why it did not need a link to If the force load config change fails, I'm going to try putting in a drive-absolute path, first with VFS location (ie Hoping that when CrashLoader loads the crash dump from CyberPunk it'll get the full path in the list of loaded DLLs. |
Ok, I asked over on the modding discord about a way to crash the game on command and they came up with a CET command of Testing was done after I removed my symlink. I'd wait till I got to the main menu, then brought up the CET console and ran the command above. None of the forced load settings made any difference. I tried the following:
|
I wonder if it's possible to instruct MO2's VFS to provide version.dll in the CrashHandler folder without having to add an artifact to the installed mod? CrashHandler does not appear to need access to winmm.dll or other injected DLLs, for whatever reason. |
…with CET and RED4ext
I tried adding an additional custom mapping to I am not sure if we really want to add e.g. a symlink as a workaround just for this (and accept side effects like potential additional files created under CrashReporter - to be tested) or to just ignore it. Does the CrashReporter actually provide anything (like debug info) for the user? |
Ok, an even weirder followup:
(All my testing has been in mods that are deployed via VFS, along with the symlink variant.) So apparently CrashReporter insists that its version.dll is actually the same file as CET's, not merely a copy of the same file. |
Regarding the importance of CrashReporter -- It's output is only very rarely useful. It does include stack traces, and I have, once or twice, had that actually have something useful in it. (Exclusively from crashes happening during startup.) My only concern about leaving things as they are would be that user's don't read docs and there will be a bug report and support impact. TBH, if there's a way to disable CrashReporter I'd be inclined to advocate for that, with docs telling people how to enable it and ensure it continues working. |
Tested with a no-op exe (literally |
Apparently you can even just replace it with an empty file, there is even a mod which does it like that. |
da12f31
to
10dc0a5
Compare
@iarna disabling the CrashRepoter by adding a dummy mod with CET installed by default now. |
10dc0a5
to
fdce3f4
Compare
Remove RootBuilder support/requirement (for CET and RED4ext) in favor of forced load libraries:
CET and RED4ext will be installed normally via USVFS instead into
root
folder for RB.Here is a test release for the current MO v2.5.2.
This needs to be tested on larger mod lists for stability!
Additional discussion: CDPR-Modding-Documentation/Cyberpunk-Modding-Docs#37
TODO:
Extras (in separate PR?):