https://bugs.winehq.org/show_bug.cgi?id=47419
Bug ID: 47419 Summary: Regression in 4.11, Dune 2000 crashes on mission start Product: Wine Version: 4.11 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: o.dierick@piezo-forte.be Distribution: ---
Created attachment 64765 --> https://bugs.winehq.org/attachment.cgi?id=64765 Dune 2000 crash at mission start, wine 4.11 terminal output
Hello,
Dune 2000 crashes when starting a mission since wine 4.11.
Regression test revealed that reverting the following commit on top of wine 4.11 works around the regression:
Module: wine Branch: master Commit: 50dfd232a4f2052b767a96e7dd8ec186d15fbe69 URL: https://source.winehq.org/git/wine.git/?a=commit;h=50dfd232a4f2052b767a96e7d...
Author: Michael Muller <michael at fds-team.de> Date: Mon Jun 10 23:54:22 2019 +0430
ddraw: Properly set DDCAPS.ddsOldCaps in ddraw7_GetCaps().
Signed-off-by: David Adam <david.adam.cnrs at gmail.com> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com> Signed-off-by: Alexandre Julliard <julliard at winehq.org>
Notes: - Virtual desktop is enabled to 640x400 (retail game resolution is fixed). - DirectDrawRenderer is set to "gdi" in registry. - Game is patched to version 1.06.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=47419
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Debian Regression SHA1| |50dfd232a4f2052b767a96e7dd8 | |ec186d15fbe69 Keywords| |regression Hardware|x86 |x86-64
https://bugs.winehq.org/show_bug.cgi?id=47419
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |47410
https://bugs.winehq.org/show_bug.cgi?id=47419
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED
--- Comment #1 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Removing DirectDrawRenderer override from the registry fixes the regression.
'gdi' rendering was necessary years ago to avoid a crash. It doesn't seem required anymore. Default renderer works fine.
Resolving INVALID.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=47419 Bug 47419 depends on bug 47410, which changed state.
Bug 47410 Summary: Regression in 4.10, Dune 2000 installer crashes in winevdm https://bugs.winehq.org/show_bug.cgi?id=47410
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #2 from Henri Verbeet hverbeet@gmail.com --- (In reply to Olivier F. R. Dierick from comment #1)
Resolving INVALID.
Probably, but if you're up for it, it may still be interesting to figure out what the issue with the gdi/no3d renderer is. In particular, I guess the application doesn't like one of the caps set in "caps.ddsOldCaps.dwCaps". If you can figure out which one(s), perhaps we can just make sure they aren't set with the gdi/no3d renderer.
https://bugs.winehq.org/show_bug.cgi?id=47419
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |--- Status|RESOLVED |REOPENED
--- Comment #3 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- (In reply to Henri Verbeet from comment #2)
(In reply to Olivier F. R. Dierick from comment #1)
Resolving INVALID.
Probably, but if you're up for it, it may still be interesting to figure out what the issue with the gdi/no3d renderer is. In particular, I guess the application doesn't like one of the caps set in "caps.ddsOldCaps.dwCaps". If you can figure out which one(s), perhaps we can just make sure they aren't set with the gdi/no3d renderer.
Hello,
With a debugging FIXME and filtering the caps one by one the dwCaps that causes trouble to the gdi/no3d renderer is identified as DDCAPS_ALIGNSIZESRC.
With this debugging patch the application fails:
--- diff --- + FIXME("caps.ddsOldCaps.dwCaps was %#x.\n", caps.ddsOldCaps.dwCaps); caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps; + FIXME("caps.ddsOldCaps.dwCaps wants %#x.\n", caps.ddsOldCaps.dwCaps); + caps.ddsOldCaps.dwCaps &= ~DDCAPS_PALETTE; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_OVERLAY; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_BLTSTRETCH; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_BLTFOURCC; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_BLT; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_ALIGNSTRIDE; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_ALIGNSIZEDEST; + caps.ddsOldCaps.dwCaps &= ~DDCAPS_ALIGNBOUNDARYDEST; + FIXME("caps.ddsOldCaps.dwCaps got %#x.\n", caps.ddsOldCaps.dwCaps); --- end of diff ---
--- output --- (...) 002d:fixme:ddraw:ddraw7_GetCaps caps.ddsOldCaps.dwCaps was 0. 002d:fixme:ddraw:ddraw7_GetCaps caps.ddsOldCaps.dwCaps wants 0x8b76. 002d:fixme:ddraw:ddraw7_GetCaps caps.ddsOldCaps.dwCaps got 0x10. (...) 002d:trace:ddraw:ddraw_surface1_Blt iface 0x15a760, dst_rect (0,0)-(640,400), src_surface (nil), src_rect (null), flags 0x1000400, fx 0xacfb00. 002d:trace:ddraw:ddraw_surface7_Blt iface 0x15a750, dst_rect (0,0)-(640,400), src_surface (nil), src_rect (null), flags 0x1000400, fx 0xacfb00. wine: Unhandled page fault on read access to 0x00000014 at address 0x44c5cc (thread 002d), starting debugger... Unhandled exception: page fault on read access to 0x00000014 in 32-bit code (0x0044c5cc). (...) --- end of output ---
With this debugging patch the application works:
--- diff --- + FIXME("caps.ddsOldCaps.dwCaps was %#x.\n", caps.ddsOldCaps.dwCaps); caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps; + FIXME("caps.ddsOldCaps.dwCaps wants %#x.\n", caps.ddsOldCaps.dwCaps); + caps.ddsOldCaps.dwCaps &= ~DDCAPS_ALIGNSIZESRC; + FIXME("caps.ddsOldCaps.dwCaps got %#x.\n", caps.ddsOldCaps.dwCaps); --- end of diff ---
--- output --- (...) 002d:fixme:ddraw:ddraw7_GetCaps caps.ddsOldCaps.dwCaps was 0. 002d:fixme:ddraw:ddraw7_GetCaps caps.ddsOldCaps.dwCaps wants 0x8b76. 002d:fixme:ddraw:ddraw7_GetCaps caps.ddsOldCaps.dwCaps got 0x8b66. (...) 002d:trace:ddraw:ddraw_surface1_Blt iface 0x2d8a890, dst_rect (0,0)-(640,400), src_surface (nil), src_rect (null), flags 0x1000400, fx 0xacfb00. 002d:trace:ddraw:ddraw_surface7_Blt iface 0x2d8a880, dst_rect (0,0)-(640,400), src_surface (nil), src_rect (null), flags 0x1000400, fx 0xacfb00. 002d:trace:ddraw:ddraw_surface1_Restore iface 0x2d8a890. 002d:trace:ddraw:ddraw_surface7_Restore iface 0x2d8a880. (...) --- end of output ---
Regards.
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #4 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 64771 --> https://bugs.winehq.org/attachment.cgi?id=64771 WINEDEBUG=+ddraw full terminal output.
This is the full terminal output with WINEDEBUG=+ddraw and the debugging patch that filters all caps but DDCAPS_ALIGNSIZESRC.
5.9MB uncompressed.
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #5 from Henri Verbeet hverbeet@gmail.com --- Created attachment 64772 --> https://bugs.winehq.org/attachment.cgi?id=64772 patch
Actually, that's DDSCAPS_FLIP. In theory the attached patch should work. Perhaps it makes sense to commit that, I still have to check what native software devices return.
https://bugs.winehq.org/show_bug.cgi?id=47419
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #6 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- (In reply to Henri Verbeet from comment #5)
Created attachment 64772 [details] patch
Actually, that's DDSCAPS_FLIP. In theory the attached patch should work. Perhaps it makes sense to commit that, I still have to check what native software devices return.
Hello,
The attached patch works for Dune 2000 with GDI renderer.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=47419
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/wined3d-unset-fl | |ip-gdi Status|REOPENED |STAGED
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #7 from Henri Verbeet hverbeet@gmail.com --- Created attachment 64872 --> https://bugs.winehq.org/attachment.cgi?id=64872 different patch
It turns out that the previous patch doesn't quite line up with the caps that Windows reports. This patch should be closer, does it also work?
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #8 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 64880 --> https://bugs.winehq.org/attachment.cgi?id=64880 Dune 2000 still crashes unless WINEDDSCAPS_FLIP is filtered.
(In reply to Henri Verbeet from comment #7)
Created attachment 64872 [details] different patch
It turns out that the previous patch doesn't quite line up with the caps that Windows reports. This patch should be closer, does it also work?
Hello,
The game still crashes with the second patch unless the attached patch is applied on top of it. Other than that, it has no negative effect.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=47419
--- Comment #9 from Henri Verbeet hverbeet@gmail.com --- (In reply to Olivier F. R. Dierick from comment #8)
The game still crashes with the second patch unless the attached patch is applied on top of it. Other than that, it has no negative effect.
That's unfortunate. Tests on Windows show that WINEDDSCAPS_FLIP always seems to be included.
https://bugs.winehq.org/show_bug.cgi?id=47419
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
--- Comment #10 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Code has been merged which might fix this issue, can you please try again with plain wine?
https://bugs.winehq.org/show_bug.cgi?id=47419
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #64771|0 |1 is obsolete| |
--- Comment #11 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 65039 --> https://bugs.winehq.org/attachment.cgi?id=65039 WINEDEBUG=+ddraw full terminal output.
(In reply to Alistair Leslie-Hughes from comment #10)
Code has been merged which might fix this issue, can you please try again with plain wine?
Hello,
Tested with current GIT (commit cf5ccf2), still crashing with GDI rendering.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=47419
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #12 from Zebediah Figura z.figura12@gmail.com --- Is there really a reason to keep this patch around?
Is there something that's actually broken in Wine? Do we expect the no3d backend to work? (Does the game work without a functional 3d driver on Windows?)