narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
925 stars 70 forks source link

Runtime error/crash on Windows 7 #55

Closed die4teoffenbarung closed 5 years ago

die4teoffenbarung commented 5 years ago

Hi, me again... :P so with latest commit https://github.com/narzoul/DDrawCompat/commit/d1cd6658c9668306fae3cc03ad3c6b6fd333b677 someones client is crashing/backscreening instantly at start. OS: Windows 7 Game: www.d4o.info We tried to install latest Redist just to be sure but no change at all. Possible you have an idea and can help.

ddraw_win7_crash.log

Best regards!

narzoul commented 5 years ago

Not sure about this, but I had an idea. Please check if latest experimental release fixes it.

die4teoffenbarung commented 5 years ago

Still missing something ddraw_win7_crash#2Try.log

narzoul commented 5 years ago

I can't really tell the exact source of the problem from the logs. It's probably throwing an exception from the driver's OpenAdapter function. I'd have to see where the exception is coming from exactly, for which it would be best to run it through a debugger. But I guess he does not have Visual Studio on his PC.

An alternative could be using WinDbg, which does not require as much stuff to install. Here's a lot of info on how to use it: https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg

But for now, it's enough to do the first step to install WinDbg (no need for the symbol setup in step 2). Run it from the start menu as administrator (right click on WinDbg (x86) and select "Run as administrator"). In WinDbg, select File / Open Executable and point it to the game's executable.

It will run into a breakpoint immediately, just type g and enter to continue. I'd guess the game should run into an exception at this point (probably an access violation) which should show up in the WinDbg window, including the following lines (and some more): "First chance exceptions are reported before any exception handling. This exception may be expected and handled"

If this is the case, then just create a crash dump from the game's process using Task Manager, compress and attach it. WinDbg can be closed after the dump is created.

die4teoffenbarung commented 5 years ago

Hi, it took a while but here his dump. :)

https://drive.google.com/file/d/1-GfXDr0vggz_9V7NTb4q8djiJSFAqjBx/view?usp=sharing

narzoul commented 5 years ago

Which version was this created with? None of my pdb files seem to match. Did you compile it yourself? Do you still have the pdb files for it?

die4teoffenbarung commented 5 years ago

Im not sure wich one he used but i attached both of them. Yes, self compiled

ReleaseDebugPdb.zip

narzoul commented 5 years ago

Hmm, neither of those are compatible either. When I try to use Load Symbols in Visual Studio, it's actually trying to load "d4odd.pdb" from the Release build directory. Do you have that also?

die4teoffenbarung commented 5 years ago

I hope its this one... d4odd.zip

narzoul commented 5 years ago

Yep, that works, thanks! Actually it's the exact same file as the ddraw.pdb you sent earlier, just with a different name. It looks like VS was just being picky about the file name.

die4teoffenbarung commented 5 years ago

Ill keep that in mind for the future. Need to backup the pdb... was just luck still had this one.

narzoul commented 5 years ago

Yes, you always need the matching pdb file from the exact same compilation. I think even if you just recompile the same version on the same system twice, it will generate pdbs that aren't interchangeable and only work with the binaries produced by that specific compilation. That is why I also started to attach them along with the binaries in the experimental release.

I have pushed another attempt at fixing this issue, please test it.

die4teoffenbarung commented 5 years ago

You did it again, for now it seems to work like it should.

Thanks alot!

Best regards.