-
Notifications
You must be signed in to change notification settings - Fork 69
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
Not working at all under Windows 7 #318
Comments
I have no idea, but it's definitely not a generic Windows 7 issue, because the hooking mechanism works even in a Windows 7 VM (I just double checked). Is there a dbghelp.dll or dbgeng.dll in his game directory? If yes, try removing those. If not, please check the version numbers of those files in C:\Windows\SysWOW64. Maybe I can reproduce it with whatever version he has there. |
There you go: |
Still crashing sadly |
Thanks, at least the extra logs provide a bit more insight. There are a number of suspicious modules loaded:
Is this issue present only with NFS games, or with every ddraw game in general? |
Good news: I managed to reproduce the issue after installing SilentPatch mentioned here: https://www.pcgamingwiki.com/wiki/Need_for_Speed:_High_Stakes#SilentPatch Looks like this is what provides the dinput.dll file mentioned above. The issue happens on Windows 7, but not on Windows 11. Anyway, this should at least make debugging it significantly easier. |
Nice! Yeah that's it, the dinput is ASILoader for his patch. We use a custom plug&play package of the game optimized for multiplayer in the RetroRacingPoint discord, I have it set to dx7+DDC by default and it runs flawlessly for the vast majority, except for him and some other Windows 7 user that just crash on boot. |
So, the problem is this dinput.dll statically links to dbghelp.dll, but dbghelp.dll's DllMain doesn't get called before ddraw.dll's DllMain. It's supposed to create a heap with HeapCreate, which is later used by HeapAlloc in SymInitializeW, which itself is invoked by dbgeng.dll from IDebugControl::WaitForEvent. But because DllMain and thus HeapCreate is not yet called, HeapAlloc ends up getting called with a null pointer as its first argument, which causes an access violation error that breaks the debugger engine. I don't see a good solution other than linking statically to dbgeng (which itself statically links to dbghelp), which should ensure that dbghelp is initialized before ddraw. But this solution has unfortunate downsides too. For example, some games, such as the GOG version of Settlers 4 has an outdated version of dbghelp next to the main executable, which now prevents the game from launching when DDrawCompat is used. I'm not sure how to work around that anymore. Anyway, here's the statically linked version, which seems to work on Windows 7 even with the SilentPatch installed: |
That did the trick! Worked first try for him. Thank you for looking into it! |
Fixed in v0.5.3 by removing the dbgeng.dll dependency. It's different than the fix that was posted here, but it should still work. |
A colleague of mine has been trying to get DDrawCompat working on his system for a while, but it never seems to work for him.
I asked him for a debug log and just by glancing at it I'm not entirely sure what's going on, but my bet is that he borked some important system files along the way and DDC is struggling to hook somehow.
Could you take a look at it? Thank you very much
OS: Windows 7
GPU: GTX 960
CPU: 3rd gen I5
ddraw log
The text was updated successfully, but these errors were encountered: