http://bugs.winehq.org/show_bug.cgi?id=10043
Summary: Babas Chess version 3.6 Product: Wine Version: 0.9.46. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: test AssignedTo: wine-bugs@winehq.org ReportedBy: mikos@esc.net.au
With wine version 0.9.46 all chat produces an "application error" message box (does not quit application, only stops messages being sent).
Steps to reproduce: type "tell %USERNAME% message" or type in chat window when playing.
This did NOT occur with wine versions 0.9.45 and previous.
http://bugs.winehq.org/show_bug.cgi?id=10043
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox_xerox2000@yahoo.co.uk URL| |http://www.babaschess.net/ Component|test |wine-richedit Keywords| |download, regression
--- Comment #1 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-10-15 13:08:05 --- Hi, could you try what happens using native riched20?
I don't have a password/account, and i used version 4.0, so i just tried to type some text, and i also see the error messagebox. I just typed "qqqqq". Now with native riched20 i see in the log:
0009:Call KERNEL32.WideCharToMultiByte(00000000,00000000,0033e17c L"qqqqq",00000006,00000000,00000000,00000000,00000000) ret =00ea694c 0009:Ret KERNEL32.WideCharToMultiByte() retval=00000006 ret=00ea694c
Looks ok to me.
With builtin riched20 i see:
0009:Call KERNEL32.WideCharToMultiByte(00000000,00000000,01047228 L"qqqqq\r\n",ffffffff,00f09c00,00000007,00000000,00000000) ret=61779a3c 0009:Ret KERNEL32.WideCharToMultiByte() retval=00000000 ret=61779a3c
and shortly after it "crashes". I guess the problem is the "string" is mistakenly translated into "string\r\n" by riched20. Maybe some richedit guru could comment on this?
http://bugs.winehq.org/show_bug.cgi?id=10043
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-10-15 13:08:34 --- forgot confirming
http://bugs.winehq.org/show_bug.cgi?id=10043
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |a_villacis@palosanto.com
--- Comment #3 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-10-15 13:18:05 --- A quick search through the cvs can be quicker then regression test: i reversed this patch:
http://www.winehq.org/pipermail/wine-cvs/2007-September/036411.html
And the error messagebox is gone. (I do get a messagebox that i'm not connected to a server, but that seems logical)
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #4 from Alex Villacís Lasso a_villacis@palosanto.com 2007-10-16 10:33:46 --- I am the author of the patch at issue.
It is strange, since tests on WinXP-SP2 (provided in a previous patch) indicated that \r to \r\n transformation by WM_GETTEXT is indeed the correct behavior for riched20. Maybe this transformation should not be done in a corner case that BabasChess is triggering. Or maybe this patch, by fixing one behavior, has uncovered another bug somewhere else - it wouldn't be the first time.
The problem is that I am having trouble running the application at all. My attempts fail because of a call to an unimplemented stub in gdiplus.dll, before reaching any edit box. This means that the submitter of the bug is probably running with a native gdiplus.dll. I am still looking for a suitable native gdiplus.dll, since my installation of WinXP-SP2 does not provide it.
Could the author of the bug please run the app with builtin riched20, *without* reversing the riched20 patch, and with WINEDEBUG=+seh,+riched20, and post the resulting trace?
What happens with a clean installation of Wine? Does the application run at all? (It does *not* in my case...)
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #5 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-10-16 10:48:52 --- Hi Alex, i'm not the reporter of the bug, but for me it runs just fine without native gdiplus. I used version 4.0 however: http://www.babaschess.net/download/SetupBabasChess_4_0_XP.exe
but i guess it behaves more or less the same as version 3.6. Could you try the application from the link above, and see if you can get it started. Regards
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #6 from Alex Villacís Lasso a_villacis@palosanto.com 2007-10-16 11:01:01 --- (In reply to comment #5)
Hi Alex, i'm not the reporter of the bug, but for me it runs just fine without native gdiplus. I used version 4.0 however: http://www.babaschess.net/download/SetupBabasChess_4_0_XP.exe
but i guess it behaves more or less the same as version 3.6. Could you try the application from the link above, and see if you can get it started. Regards
Nope, still no luck. That was the version I tried myself:
[alex@srv64 BabasChess]$ ls BabasChess.chm BabasChess.exe BabasChess_NLD.MLF Data BabasChess_CRO.MLF BabasChess_FIN.MLF BabasChess_POL.MLF DefLayouts BabasChess_DEU.MLF BabasChess_FRA.MLF BabasChess_POR.MLF Engines BabasChess_ENG.MLF BabasChess_HUN.MLF BabasCrashReport.exe Themes BabasChess_ESP.MLF BabasChess_ITA.MLF CustomCmd timeseal.exe [alex@srv64 BabasChess]$ ./BabasChess.exe ALSA lib conf.c:3949:(snd_config_expand) Unknown parameters 0 ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL default:0 fixme:richedit:RichEditWndProc_common WM_STYLECHANGING: stub fixme:richedit:RichEditWndProc_common WM_STYLECHANGED: stub fixme:richedit:RichEditWndProc_common WM_STYLECHANGING: stub fixme:richedit:RichEditWndProc_common WM_STYLECHANGED: stub fixme:richedit:RichEditWndProc_common WM_STYLECHANGING: stub fixme:richedit:RichEditWndProc_common WM_STYLECHANGED: stub fixme:richedit:RichEditWndProc_common ECO_AUTOWORDSELECTION not implemented yet! fixme:richedit:RichEditWndProc_common ECO_AUTOVSCROLL not implemented yet! fixme:richedit:RichEditWndProc_common ECO_NOHIDESEL not implemented yet! fixme:richedit:RichEditWndProc_common EM_SETTARGETDEVICE: stub wine: Call from 0x7b840ab0 to unimplemented function gdiplus.dll.GdipDrawImageRectRectI, aborting
All done with current git, brand new .wine (deleted previous .wine && wineprefixcreate). No other configuration performed after wineprefixcreate except run setup of BabasChess, then attempt to run the app itself. Crash happens right after answering dialog about creating personalized directory (left at default path).
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #7 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-10-16 11:19:08 --- yeah, you are right, guess i had a native gdiplus lying in system32 somewhere
You could try 'wget http://kegel.com/wine/winetricks && sh winetricks gdiplus'
that should get you around that problem
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #8 from Alex Villacís Lasso a_villacis@palosanto.com 2007-10-18 10:55:49 --- Created an attachment (id=8643) --> (http://bugs.winehq.org/attachment.cgi?id=8643) Patch to fix behavior of VK_RETURN in single-line richedit control
As I thought, this is a case of a bugfix uncovering another bug.
The problematic controls are single-line richedit controls at the bottom of the application window. The user is supposed to type text and hit RETURN (WM_CHAR = VK_RETURN) in order to send a message. The application sends a WM_GETTEXT message in order to retrieve the text the user just entered, and process it.
The behavior of the single-line richedit control in builtin was never right to begin with. For the sake of example, let's say the user types "qqq", then presses ENTER. On a single-line richedit control, native riched20 returns "qqq" without any \r or \n tacked on. This indicates that the control refuses to insert carriage returns into the text of a single-line richedit control. On the same scenario, the old code in builtin riched20 returned "qqq\r", which is already wrong (the hidden bug). However, this was not enough (yet) to break BabasChess.
The new code in builtin returns "qqq\r\n", because (as demonstrated by tests), any carriage returns must be converted to \r\n pairs when retrieved via WM_GETTEXT. However, since this is a single-line richedit control, there was not supposed to be any carriage returns in the first place. With the extra \n added, BabasChess broke, as experienced by the submitter of the bug.
The attached patch fixes this by enforcing the rule that WM_CHAR may not insert carriage returns (VK_RETURN) into the text of a single-line richedit control, and by adding a test to check for this behavior. This patch will shortly be sent to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #9 from Alex Villacís Lasso a_villacis@palosanto.com 2007-12-03 11:58:31 --- Patch has been committed to current git. Please confirm whether bug has been resolved.
http://bugs.winehq.org/show_bug.cgi?id=10043
mikos@esc.net.au changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #10 from mikos@esc.net.au 2007-12-03 18:54:58 --- Sorry it took so long to mark as fixed. The patch works here.
http://bugs.winehq.org/show_bug.cgi?id=10043
--- Comment #11 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-12-04 10:23:27 --- so it;s fixed
http://bugs.winehq.org/show_bug.cgi?id=10043
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-12-04 10:23:47 --- closing