http://bugs.winehq.org/show_bug.cgi?id=22542
Summary: Trackmania quits when i want to go back to the main menu Product: Wine Version: 1.1.43 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: yoann.laissus@gmail.com CC: thunderbird2k@gmail.com
In a race, when I want to go back to the main menu or just improve my time, the game quits unexpectedly (it isn't a segfault).
Bisect result :
commit cda78c01e62bea533bcfdedee8a68663c67f2050 Author: Roderick Colenbrander thunderbird2k@gmail.com Date: Wed Apr 14 14:19:17 2010 +0200
wined3d: Move G16R16/R16G16F conversion to the formats table.
http://bugs.winehq.org/show_bug.cgi?id=22542
Yoann Laissus yoann.laissus@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #1 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-09 15:59:31 --- Could you make a +d3d_surface log? (So WINEDEBUG=+d3d_surface wine eve &> log) On a quick glance I don't see anything wrong in the patch itself but perhaps the code which calls the conversion function has a bug. I guess it is something pitch related.
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #2 from Wylda wylda@volny.cz 2010-05-09 16:14:42 --- Created an attachment (id=27839) --> (http://bugs.winehq.org/attachment.cgi?id=27839) BAD - console log from wine-1.1.44-19-gd2a0188 +d3d_surface
Confirming, happens wine-1.1.44-19-gd2a0188 and revering the commit cda78c01e62bea533bcfdedee8a68663c67f2050 on top of it makes that problem go a way, i.e. it's correctly bisected.
Adding requested log from wine-1.1.44-19-gd2a0188 aka BAD, followed by the same wine version with reverted commit aka GOOD.
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #3 from Wylda wylda@volny.cz 2010-05-09 16:15:59 --- Created an attachment (id=27840) --> (http://bugs.winehq.org/attachment.cgi?id=27840) GOOD - console log from wine-1.1.44-19-gd2a0188 with reverted commit
Just in case comparison would/could be useful...
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #4 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-09 16:42:19 --- (In reply to comment #2)
Created an attachment (id=27839)
--> (http://bugs.winehq.org/attachment.cgi?id=27839) [details]
BAD - console log from wine-1.1.44-19-gd2a0188 +d3d_surface
Confirming, happens wine-1.1.44-19-gd2a0188 and revering the commit cda78c01e62bea533bcfdedee8a68663c67f2050 on top of it makes that problem go a way, i.e. it's correctly bisected.
Adding requested log from wine-1.1.44-19-gd2a0188 aka BAD, followed by the same wine version with reverted commit aka GOOD.
You are as quick as usual ;)
The output of the log is not as informative as I had hoped. Perhaps you can add some printf-like lines to get some more info. Don't worry I will give hints on where to place them.
The surface conversion code is in dlls/wined3d/surface.c around line 4562 (you will see 'if(desc.convert) {'. The end of this block calls 'desc.convert(This->resource.allocatedMemory, mem, pitch, width, height);'. Try to print the values of pitch, outpitch, width and height. Also print the two pointers (allocMemory and mem).
The 'broken' function at some point is 'static void convert_r16g16(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height)' in utils.c (this is the function pointer desc.convert is set to). Play a bit with the function. Perhaps make sure it won't get called (or return at its start).
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #5 from Wylda wylda@volny.cz 2010-05-09 17:13:59 --- Created an attachment (id=27841) --> (http://bugs.winehq.org/attachment.cgi?id=27841) Printf debug info
You are as quick as usual ;)
Well, you know..., when i do not waste time with -02 :-D ...But you know how to slow me down. My coding skill are pretty bad even if it comes to printf(). Anyway: did i understood that correctly?
if (context) context_release(context); return WINED3DERR_OUTOFVIDEOMEMORY; } + + printf("pitch: %d, outpich: %d, width: %d, height %d, allocatedMemory: %08p, mem: %08p\n", pitch, outpitch, width, height, This->resource.allocatedMemory, mem); + desc.convert(This->resource.allocatedMemory, mem, pitch, width, height);
I attached normal console output without any extra DEBUG channels. Hopes that's OK. In next comment i try to do something with second part of your suggestions.
http://bugs.winehq.org/show_bug.cgi?id=22542
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #6 from Wylda wylda@volny.cz 2010-05-09 17:21:16 ---
Perhaps make sure it won't get called (or return at its start).
I did:
static void convert_r16g16(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height) { + + return; + unsigned int x, y;
and the game quits the same way like without this change. I'm going to sleep, so if you have another suggestion what to do next time with convert_r16g16() let me know.
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #7 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-13 14:47:38 --- Created an attachment (id=27937) --> (http://bugs.winehq.org/attachment.cgi?id=27937) Fix
Give this patch a try. It fixes the issues here.
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #8 from Wylda wylda@volny.cz 2010-05-13 14:54:17 ---
Give this patch a try. It fixes the issues here.
Perfect, it fixes the reported problem :-)
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #9 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-13 14:55:23 --- Damn, within 7 minutes!
http://bugs.winehq.org/show_bug.cgi?id=22542
--- Comment #10 from Wylda wylda@volny.cz 2010-05-13 14:59:02 --- (In reply to comment #9)
Damn, within 7 minutes!
Yee... I had to stop work on bug 22598, back up the work and fish out the trackmania ;)
http://bugs.winehq.org/show_bug.cgi?id=22542
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=22542
Roderick Colenbrander thunderbird2k@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #11 from Roderick Colenbrander thunderbird2k@gmail.com 2010-05-27 10:04:03 --- It is time to mark this bug as fixed. Commit f892003194ebe969c60020d796c8c570ea1a8045 fixed it.
http://bugs.winehq.org/show_bug.cgi?id=22542
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Alexandre Julliard julliard@winehq.org 2010-05-28 12:51:42 --- Closing bugs fixed in 1.2-rc2.