http://bugs.winehq.org/show_bug.cgi?id=23201
Summary: Motocross Madness 2 crashes at start (d3d) Product: Wine Version: 1.1.30 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: wylda@volny.cz CC: hverbeet@gmail.com
I wanted to retest bug 17836, but my effort failed shortly. When mcm2 is run, it should test graphics capabilities and display classical window "Please choose a 3d card: 1. Software Rasterization / 2. DirectDraw HAL". But instead the game crashes.
1. I did a regression test between 1.1.29 and 1.1.30:
commit a5214c306fd82982ed10fd8221ac00230186c9a6 Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Sep 16 08:37:15 2009 +0200
wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
This prevents for example a d3d9 depth stencil from being destroyed when it has no external references but is still in use by the device/stateblock. A nice side effect is that it simplifies handling of "implicit" surfaces like the frontbuffer and backbuffers, as well as the forwarding of reference counts for surfaces that are part of a texture.
:040000 040000 24e610b0502bc1b177c2cdec22035c38a2581cc1 3e211f4bc9744d63bb0676c3b94c70a92126d152 M dlls :040000 040000 77d1ddb78de3dd7f4a0a4c507bb1aa8eb1c5485e a1eb37aef7e2858a84da6ef9ac043f97d0d85108 M include
2. No other bug report suffers from this commit.
3. Revert of this patch after git checkout makes that problem go away.
--private keyword: bisected
http://bugs.winehq.org/show_bug.cgi?id=23201
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Blocks| |17836
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #1 from Wylda wylda@volny.cz 2010-06-15 12:40:53 --- Created an attachment (id=28868) --> (http://bugs.winehq.org/attachment.cgi?id=28868) console log from wine-1.2-rc3 (bad - game crashes)
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #2 from Wylda wylda@volny.cz 2010-06-15 12:43:51 --- Created an attachment (id=28869) --> (http://bugs.winehq.org/attachment.cgi?id=28869) console log from wine-1.1.29 (good - game displays window with 3d cards)
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #3 from Henri Verbeet hverbeet@gmail.com 2010-06-15 13:18:30 --- Is there a demo that is also affected?
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #4 from Wylda wylda@volny.cz 2010-06-15 13:40:34 --- (In reply to comment #3)
Is there a demo that is also affected?
Demo is available, but unfortunately demo is not affected :-( I can provide any log or ssh access...
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #5 from Henri Verbeet hverbeet@gmail.com 2010-06-15 14:00:35 --- Could you give me "+tid,+seh,+ddraw,+d3d7,+d3d,+d3d_surface"?
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #6 from Wylda wylda@volny.cz 2010-06-15 14:49:11 --- Created an attachment (id=28871) --> (http://bugs.winehq.org/attachment.cgi?id=28871) console log from wine-1.2-rc3-43-gba9ec15 +tid,+seh,+ddraw,+d3d7,+d3d,+d3d_surface
Unbelievably short for so many debug channels. Even no need to compress :-) Do you want the same trace from working version? (don't know if it could make things easier)
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #7 from Wylda wylda@volny.cz 2010-06-15 15:00:21 --- Created an attachment (id=28872) --> (http://bugs.winehq.org/attachment.cgi?id=28872) good console log from wine-1.1.29 +tid,+seh,+ddraw,+d3d7,+d3d,+d3d_surface
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #8 from Henri Verbeet hverbeet@gmail.com 2010-06-16 09:42:00 ---
err:ddraw:DDRAW_Create RegisterClassA failed!
Was this message introduced by the same commit?
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #9 from Wylda wylda@volny.cz 2010-06-16 09:57:03 ---
err:ddraw:DDRAW_Create RegisterClassA failed!
Was this message introduced by the same commit?
Exactly, when i did git checkout this "err:" appeared, when reverted, "err:" gone. Shortly yes, introduced by a5214c306fd82982ed10fd8221ac00230186c9a6.
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #10 from Henri Verbeet hverbeet@gmail.com 2010-06-16 11:18:40 --- Created an attachment (id=28893) --> (http://bugs.winehq.org/attachment.cgi?id=28893) patch
Does this patch make any difference? I don't think it will fix the root of the problem, but that's a fairly ugly piece of code there, and it might make enough of a difference.
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #11 from Wylda wylda@volny.cz 2010-06-16 14:37:13 --- Created an attachment (id=28895) --> (http://bugs.winehq.org/attachment.cgi?id=28895) console log from _patched_ wine-1.2-rc3-84-g6456e14
Does this patch make any difference?
Yes, before backtrace didn't show nothing (well: Backtrace: =>0 0x5e0012d8 in blade (+0x12d8) (0x008c0348)), but now shows nice backtrace with function names and parameters... Also it's more verbose and shows much more "err:". Game still doesn't start, but that was "announced" beforehand.
PS: I maybe omit (didn't know) important info. The regression is only when winecfg is set to Win98 (old Win95 game). Sorry if this miss confuse you somehow.
http://bugs.winehq.org/show_bug.cgi?id=23201
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #28893|0 |1 is obsolete| |
--- Comment #12 from Henri Verbeet hverbeet@gmail.com 2010-06-17 07:36:37 --- Created an attachment (id=28913) --> (http://bugs.winehq.org/attachment.cgi?id=28913) patch
Actually, that's my fault, use this patch instead.
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #13 from Wylda wylda@volny.cz 2010-06-17 10:47:26 --- (In reply to comment #12)
Created an attachment (id=28913)
--> (http://bugs.winehq.org/attachment.cgi?id=28913) [details]
patch
Actually, that's my fault, use this patch instead.
Perfect! Fixed! Great! :-) Now MCM2 starts again even under winecfg's Win98.
Applied on top of wine-1.2-rc3-84-g6456e14.
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #14 from Wylda wylda@volny.cz 2010-06-17 11:31:46 --- Created an attachment (id=28917) --> (http://bugs.winehq.org/attachment.cgi?id=28917) good console log from wine-1.2-rc3-84-g6456e14
Maybe just a one more note. The console gives one "err:" but game works as expected... So only to let you know...
err:d3d:IWineD3DDeviceImpl_Release Context array not freed!
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #15 from Henri Verbeet hverbeet@gmail.com 2010-06-17 11:55:58 --- Created an attachment (id=28918) --> (http://bugs.winehq.org/attachment.cgi?id=28918) another patch
Yeah, ddraw's wined3d device cleanup is a bit broken for ddraw 1 & 2. Could you give this patch a try to see if it helps?
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #16 from Wylda wylda@volny.cz 2010-06-17 12:38:12 --- (In reply to comment #15)
Created an attachment (id=28918)
--> (http://bugs.winehq.org/attachment.cgi?id=28918) [details]
another patch
Yeah, ddraw's wined3d device cleanup is a bit broken for ddraw 1 & 2. Could you give this patch a try to see if it helps?
Nice patch, removes following three "fixme" and one "err" from comment #14. And best thing, everything still works :-D
fixme:d3d:IWineD3DDeviceImpl_Release (0x155168) Device released with resources still bound, acceptable but unexpected
fixme:d3d:IWineD3DDeviceImpl_Release Leftover resource 0x16d7e0 with type WINED3DRTYPE_SURFACE (0x1).
fixme:d3d:IWineD3DDeviceImpl_Release Leftover resource 0x150e60 with type WINED3DRTYPE_SURFACE (0x1).
err:d3d:IWineD3DDeviceImpl_Release Context array not freed!
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #17 from Henri Verbeet hverbeet@gmail.com 2010-06-21 08:56:05 --- This should be more or less fixed by e4a4065bbd7ea0ea4e06c26df5ac07974ee34bc2. The FIXMEs and ERRs probably won't go away for 1.2.
http://bugs.winehq.org/show_bug.cgi?id=23201
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #18 from Wylda wylda@volny.cz 2010-06-21 16:33:55 ---
Confirming, FIXED in wine-1.2-rc4-48-g58a6988.
Particular commit (wine-1.2-rc3-113-ge4a4065): http://source.winehq.org/git/wine.git/?a=commit;h=e4a4065bbd7ea0ea4e06c26df5...
Thank you Henri!
The FIXMEs and ERRs probably won't go away for 1.2.
I thought that now is the right time for code cleanup, moving piece of code into different files etc. These things after 1.2 makes bisecting/revert testing hard and drives me crazy sometime ;)
http://bugs.winehq.org/show_bug.cgi?id=23201
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org 2010-06-25 12:41:44 --- Closing bugs fixed in 1.2-rc5.
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #20 from Wylda wylda@volny.cz 2010-08-28 21:31:13 CDT ---
Hi Henri, this was in just a short time before 1.2 and you posted here in comment #15 cleanup patch, which had positive effect - comment #16. The patch was meant to be postponed after 1.2.
I did a recheck in wine-1.3.1-267-g7ab48e8 and this cleanup patch isn't applicable anymore and the "err:" and "fixmes" remains.
http://bugs.winehq.org/show_bug.cgi?id=23201
--- Comment #21 from Henri Verbeet hverbeet@gmail.com 2010-08-29 08:54:45 CDT --- (In reply to comment #20)
Hi Henri, this was in just a short time before 1.2 and you posted here in comment #15 cleanup patch, which had positive effect - comment #16. The patch was meant to be postponed after 1.2.
There are some deeper problems with ddraw. I'll try to fix those, but it may take a while.
http://bugs.winehq.org/show_bug.cgi?id=23201
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e4a4065bbd7ea0ea4e06c26df5a | |c07974ee34bc2 Regression SHA1| |a5214c306fd82982ed10fd8221a | |c00230186c9a6