narzoul / DDrawCompat

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

SurfaceRepository::getWindowedSrc crashes in v0.5.2 on integrated GPUs #315

Open CookiePLMonster opened 1 month ago

CookiePLMonster commented 1 month ago

We're encountering a regression in v0.5.2 compared to v0.5.1, where two PCs with integrated GPUs are now crashing on startup inside a SurfaceRepository::getWindowedSrc function. As far as I can tell, it's because this, and thus g_primaryRepository, is nullptr.

I received a crashdump from this issue. This session used a regular v0.5.2-Release build, so symbols will match: Buccaneer.exe.18456.dmp.zip

As far as I can tell, primary surface repository is something that has been added in v0.5.2, so perhaps this crash is indicative of a bug in this implementation.

narzoul commented 1 month ago

Sounds similar to another issue I've seen recently. See if this fixes it: https://github.com/narzoul/DDrawCompat/issues/299#issuecomment-2070885134

CookiePLMonster commented 1 month ago

Thank you! I forwarded this info to QA and also asked to include a DDrawCompat log together with the crash dump if this DLL doesn't help.

CookiePLMonster commented 1 month ago

@narzoul I got a confirmation from QA that this fix helps and it does not regress the other configurations previously unaffected by this bug, thank you 🙂

We are going to ship with a self-compiled v0.5.2 + this fix with an appropriate version bump to 0.5.2.1, since I need to also store the corresponding the PDB of this ddraw.dll and thus I can't just use your test DLL.

This can probably be closed as a duplicate or kept open until a new public release is out with this fix included.