[Bug 23621] New: DDraw surface reference counting doesn't match Windows (causes Recoil to fail)
http://bugs.winehq.org/show_bug.cgi?id=23621 Summary: DDraw surface reference counting doesn't match Windows (causes Recoil to fail) Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: directx-ddraw AssignedTo: wine-bugs(a)winehq.org ReportedBy: kazade(a)gmail.com I just realized there is no bug report covering this issue. DirectDraw surfaces (and other COM interfaces) maintain a reference count so that they are destroyed when they are no longer in use. The refcount is returned by the IUnknown_Release function. Unfortunately some games base logic on the value returned by IDirectDrawSurface_Release. Specifically they sometimes (wrongly) expect the return to be zero. Something like: if(IDirectDrawSurface_Release(surf)) { //Bail out } We can test this by forcing DDS_Release to return zero. One game that is affected is Recoil which complains about not being to set the video mode. The difference between Wine's implementation and the Windows implementation is Windows maintains a refcount for each surface interface version (1, 2, 3, 4 and 7) whereas Wine has one reference count across all versions. There are tests in dlls/ddraw/dsurface.c that confirm the Windows behaviour. To fix this issue the reference counting needs to be split, which requires a lot of changes (as versions 1, 2 and 3 all share the same thunks). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.2-rc7 --- Comment #1 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2010-07-12 04:49:42 --- Do you have a test case? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 --- Comment #2 from Luke Benstead <kazade(a)gmail.com> 2010-08-11 03:56:52 --- Sorry Dmitry I missed your comment. My tests were committed to Wine some time ago. They exist in /dlls/ddraw/tests/dsurface.c -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 Benjamin Debski <benjamin.debski(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |benjamin.debski(a)gmail.com --- Comment #3 from Benjamin Debski <benjamin.debski(a)gmail.com> 2011-01-14 18:09:11 CST --- Present in Wine 1.3.11 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 Ričardas Barkauskas <miegalius(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |miegalius(a)gmail.com --- Comment #4 from Ričardas Barkauskas <miegalius(a)gmail.com> 2011-06-30 14:31:25 CDT --- This should be fixed in latest git and I can run Recoil demo just fine. Please test if it works for you. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 Luke Benstead <kazade(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #5 from Luke Benstead <kazade(a)gmail.com> 2011-08-05 09:07:58 CDT --- Yep, all fixed. Nice work! Thanks to whoever took over from my failed attempt over a year ago :) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> 2011-08-05 12:39:19 CDT --- Closing bugs fixed in 1.3.26. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23621 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|directx-ddraw |directx-d3d -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org