http://bugs.winehq.org/show_bug.cgi?id=27332
Summary: richedit EM_STREAMIN handler needs to return the number of characters read (Dirt3 installer shows error instead of EULA text) Product: Wine Version: 1.3.21 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
another bug while looking at "Dirt 3" game installer ...
When the installer is about to display the EULA, the whole EULA text can be seen a very short time only to be immediately replaced by the message "Could not read the EULA file <path>\EULA\English\EULA.txt."
The EULA is a plain text file.
--- snip --- 0009:Call KERNEL32.CreateFileW(004bfa40 L"Z:\mnt\iso\EULA\English\EULA.txt",80000000,00000001,00000000,00000003,00000000,00000000) ret=00403177 0009:Ret KERNEL32.CreateFileW() retval=00000078 ret=00403177 ... 0009:Call user32.SendMessageW(0003006a,00000449,00000001,0032f90c) ret=004031b9 0009:Call window proc 0x20027d11 (hwnd=0x3006a,msg=WM_USER+73,wp=00000001,lp=0032f90c) 0009:trace:richedit:RichEditWndProc_common enter hwnd 0x3006a msg 0449 (EM_STREAMIN) 1 32f90c, unicode 1 ... 0009:trace:richedit:ME_StreamIn stream==0x32f90c editor==0x5ca8e8 format==0x1 0009:trace:richedit:ME_StreamInText 00000001 0x32e0a0 0009:Call KERNEL32.ReadFile(00000078,0032e0ac,00001000,0032e0a4,00000000) ret=0040225c 0009:Ret KERNEL32.ReadFile() retval=00000001 ret=0040225c 0009:Call KERNEL32.MultiByteToWideChar(00000000,00000000,0032e0ac "THE CODEMASTERS SOFTWARE COMPANY LIMITED SOFTWARE LICENSE AGREEMENT\r\n\r\nIMPORTANT - READ CAREFULLY: THE ACCOMPANYING PROGRAM (WHICH INCLUDES COMPUTER SOFTWARE PROGRAM, THE MEDIA AND RELATED DOCUMENTATION IN PRINTED OR ELECTRONIC FORM) IS LICENSED TO YOU ON THE TERMS SET FORTH BELOW, WHICH CONSTIT"...,00001000,00329c8e,00001000) ret=2001ba68 0009:Ret KERNEL32.MultiByteToWideChar() retval=00001000 ret=2001ba68 ... 0009:trace:richedit:RichEditWndProc_common exit hwnd 0x3006a msg 0449 (EM_STREAMIN) 1 32f90c, unicode 1 -> 0 0009:Ret window proc 0x20027d11 (hwnd=0x3006a,msg=WM_USER+73,wp=00000001,lp=0032f90c) retval=00000000 0009:Ret user32.SendMessageW() retval=00000000 ret=004031b9 ... 0009:Call user32.SetWindowTextW(0003006a,004bfaf0 L"Could not read the EULA file Z:\mnt\iso\EULA\English\EULA.txt.") ret=00403219 0009:Call window proc 0x20027d11 (hwnd=0x3006a,msg=WM_SETTEXT,wp=00000000,lp=004bfaf0) 0009:trace:richedit:RichEditWndProc_common enter hwnd 0x3006a msg 000c () 0 4bfaf0, unicode 1 ... --- snip ---
Upon return of EM_STREAMIN message handler, the installer checks the return value and if zero it assumes the text file (EULA) wasn't properly read.
http://msdn.microsoft.com/en-us/library/bb774302.aspx
--- quote --- Return Value
This message returns the number of characters read. --- quote ---
If this is done, the EULA is correctly displayed in richedit control.
Currently ME_StreamIn -> ME_StreamInText unconditionally return zero, relying on the caller to look at inStream.editstream->dwError value.
Regards
http://bugs.winehq.org/show_bug.cgi?id=27332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer
--- Comment #1 from Anastasius Focht focht@gmx.net 2011-05-29 14:27:44 CDT --- Hello,
adding 'installer' keyword
Regards
http://bugs.winehq.org/show_bug.cgi?id=27332
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |dylan.ah.smith@gmail.com
--- Comment #2 from Dylan Smith dylan.ah.smith@gmail.com 2011-09-25 20:52:10 CDT --- Created attachment 36563 --> http://bugs.winehq.org/attachment.cgi?id=36563 richedit: Return number of bytes read for EM_STREAMIN with SF_TEXT.
Please test with the attached patch.
http://bugs.winehq.org/show_bug.cgi?id=27332
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36563|0 |1 is obsolete| |
--- Comment #3 from Dylan Smith dylan.ah.smith@gmail.com 2011-09-27 01:01:44 CDT --- Comment on attachment 36563 --> http://bugs.winehq.org/attachment.cgi?id=36563 richedit: Return number of bytes read for EM_STREAMIN with SF_TEXT.
Patch accepted as commit e060272de73d909fb39c7a8a1952a2fbd75141c0.
You can now test with the latest git checkout.
http://bugs.winehq.org/show_bug.cgi?id=27332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e060272de73d909fb39c7a8a195 | |2a2fbd75141c0 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Anastasius Focht focht@gmx.net 2011-10-11 15:50:26 CDT --- Hello,
--- quote --- Patch accepted as commit e060272de73d909fb39c7a8a1952a2fbd75141c0.
You can now test with the latest git checkout. --- quote ---
yep, thanks Dylan. Sorry for the delay ... I was away for a while ;-)
Regards
http://bugs.winehq.org/show_bug.cgi?id=27332
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2011-10-21 13:50:45 CDT --- Closing bugs fixed in 1.3.31.
https://bugs.winehq.org/show_bug.cgi?id=27332
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|dylan.ah.smith@gmail.com |wine-bugs@winehq.org