http://bugs.winehq.org/show_bug.cgi?id=27331
Summary: kernel32.GetLocaleInfoA/W needs to be more strict about invalid LCTYPE values (Dirt3 installer shows language selection with empty strings) Product: Wine Version: 1.3.21 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
encountered this while looking at "Dirt 3" game installer ... The installer enumerates install languages and builds a listbox filled with empty language strings.
For whatever reason the installer calls kernel32.GetLocaleInfoA/W with LCTYPE 0x73 which seems to be invalid (didn't find any info in MSDN/PDK)? Wine doesn't validate these "holes" and returns success:
--- snip --- 0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x73,0x32ea04,256) 0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x73,0x32ea04,256) returning 1 L"" 0009:trace:listbox:ListBoxWndProc_common [0x10068]: msg LB_ADDSTRING wp 00000000 lp 0032ee04 ... 0009:trace:listbox:LISTBOX_InsertString [0x10068]: added item 0 L"" 0009:trace:listbox:ListBoxWndProc_common [0x10068]: msg LB_SETITEMDATA wp 00000000 lp 00000409 --- snip ---
http://source.winehq.org/git/wine.git/blob/HEAD:/include/winnls.h#l296
--- snip include/winnls.h --- 296 #define LOCALE_IREADINGLAYOUT 0x0070 297 #define LOCALE_INEUTRAL 0x0071 298 #define LOCALE_INEGATIVEPERCENT 0x0074 --- snip include/winnls.h ---
If these holes are rejected (ERROR_INVALID_FLAGS), the installer gets it right and uses a proper way of retrieving language names:
--- snip --- 0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x4,0x32ea04,256) 0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x4,0x32ea04,256) returning 8 L"English" 0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x8,0x32ec04,256) 0009:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x8,0x32ec04,256) returning 14 L"United States" 0009:trace:listbox:ListBoxWndProc_common [0x10068]: msg LB_ADDSTRING wp 00000000 lp 0032ee04 ... 0009:trace:listbox:LISTBOX_InsertString [0x10068]: added item 0 L"English (United States)" ... --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=27331
--- Comment #1 from Anastasius Focht focht@gmx.net 2011-05-29 13:38:48 CDT --- Created an attachment (id=34954) --> (http://bugs.winehq.org/attachment.cgi?id=34954) Screenshot of installer language selection bug
Screenshot of installer language selection bug
http://bugs.winehq.org/show_bug.cgi?id=27331
--- Comment #2 from Anastasius Focht focht@gmx.net 2011-05-29 13:39:44 CDT --- Created an attachment (id=34955) --> (http://bugs.winehq.org/attachment.cgi?id=34955) Screenshot of installer language selection fixed
Screenshot of installer language selection with GetLocaleInfoW fixed (how it should look like).
http://bugs.winehq.org/show_bug.cgi?id=27331
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer
--- Comment #3 from Anastasius Focht focht@gmx.net 2011-05-29 13:40:19 CDT --- Hello,
adding keyword.
Regards
http://bugs.winehq.org/show_bug.cgi?id=27331
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2011-08-07 11:34:08 CDT --- Actually the real problem is that wine doesn't support LOCALE_SNATIVEDISPLAYNAME currently (yes, that's the 0x73).
So installer is about to be Win7 ready, when it can't get this data it uses a fallback path.
I'll prepare a patch.
http://bugs.winehq.org/show_bug.cgi?id=27331
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |bunglehead@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=27331
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com 2011-08-07 12:38:48 CDT --- Created an attachment (id=35865) --> (http://bugs.winehq.org/attachment.cgi?id=35865) patch
Could you try this one? It should display properly for ENU only.
http://bugs.winehq.org/show_bug.cgi?id=27331
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com 2011-08-24 14:47:27 CDT --- Should be fixed with be225af6685d74371675ae2c9d7c8ec6484a4e79 and d469d6d5b79c7f60687bffbf089019269e232477. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=27331
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |be225af6685d74371675ae2c9d7 | |c8ec6484a4e79
--- Comment #7 from Anastasius Focht focht@gmx.net 2011-10-11 15:47:26 CDT --- Hello,
--- quote --- Should be fixed with be225af6685d74371675ae2c9d7c8ec6484a4e79 and d469d6d5b79c7f60687bffbf089019269e232477. Please retest. --- quote ---
yep, thanks Nikolay. Sorry for the delay ... I was away for a while ;-)
Regards
http://bugs.winehq.org/show_bug.cgi?id=27331
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #8 from Anastasius Focht focht@gmx.net 2011-10-11 15:48:12 CDT --- ... and now really marking fixed.
Regards
http://bugs.winehq.org/show_bug.cgi?id=27331
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |be225af6685d74371675ae2c9d7 | |c8ec6484a4e79 Regression SHA1|be225af6685d74371675ae2c9d7 | |c8ec6484a4e79 |
http://bugs.winehq.org/show_bug.cgi?id=27331
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2011-10-21 13:50:56 CDT --- Closing bugs fixed in 1.3.31.
https://bugs.winehq.org/show_bug.cgi?id=27331
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bunglehead@gmail.com |wine-bugs@winehq.org