https://bugs.winehq.org/show_bug.cgi?id=51478
Bug ID: 51478 Summary: dinput:keyboard breaks user32:input's test_keyboard_layout_name() in some locales () Product: Wine Version: 6.10 Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
Created attachment 70313 --> https://bugs.winehq.org/attachment.cgi?id=70313 Add test_keyboard_layout_name() traces
The WineTest runs show the following test_keyboard_layout_name() failure in some locales:
https://test.winehq.org/data/patterns.html#user32:input
input.c:3169: Test failed: Could not find keyboard layout 0000000004110411 in preload list
This is 100% reproducible in the following configurations (only the keyboard layout id differs): win7_newtb-w7u-es win7_newtb-w7u-pt-PT win2004_newtb-w10pro64-ar-64 win2004_newtb-w10pro64-he-64 win2004_newtb-w10pro64-hi-64 win2004_newtb-w10pro64-ja-64 win2004_newtb-w10pro64-ko-64 win2004_newtb-w10pro64-pt-BR-64 win2004_newtb-w10pro64-ru-64 win2004_newtb-w10pro64-zh-CN-64
Notes: * Interestingly this means this failure does not happen in the English, French, German and Greek locales. * Also user32:input only fails on the first run that follows dinput:keyboard, and does not ever fail again, even if dinput:keyboard is run again.
In the w10pro64_pt_BR case, adding extra traces shows that the root of the issue is that GetKeyboardLayoutList() returns 10 instead of 13. As a result test_keyboard_layout_name() fails to retrieve all the Keyboard Layout\Preload values (there is 12 of these, not 10 or 13!).
Also the items are not in the same order in layouts_preload and layouts so this causes some entries to be missing.
More notes: * The ok() message is wrong: it is not layout we are looking for but layouts[i], aka klid.
* I don't know why the GetKeyboardLayoutList() return value changes in the first run that follows dinput:keyboard, but I'm not sure it makes sense to assume it matches the number of entries in the Preload key in the first place.
https://bugs.winehq.org/show_bug.cgi?id=51478
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=51478
--- Comment #1 from François Gouget fgouget@codeweavers.com --- Created attachment 70314 --> https://bugs.winehq.org/attachment.cgi?id=70314 Sucessful w10pro64_pt_BR user32:input run
https://bugs.winehq.org/show_bug.cgi?id=51478
--- Comment #2 from François Gouget fgouget@codeweavers.com --- Created attachment 70315 --> https://bugs.winehq.org/attachment.cgi?id=70315 Failed w10pro64_pt_BR user32:input run
https://bugs.winehq.org/show_bug.cgi?id=51478
--- Comment #3 from François Gouget fgouget@codeweavers.com --- Created attachment 70316 --> https://bugs.winehq.org/attachment.cgi?id=70316 Fix loading the Keyboard Layout\Preload values
This fixes the user32:input failure but we may still want to investigate the following points:
1. Why does running dinput:keyboard change the value returned by GetKeyboardLayoutList()?
2. Is the value returned by GetKeyboardLayoutList() really related to the number of values in the Keyboard Layout\Preload registry key?
https://bugs.winehq.org/show_bug.cgi?id=51478
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=51478
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- I think it is still happening after e1083de9a7153bbdeb2691180074dd2b5c6a828e, though the culprit test is now dinput:device8.
https://bugs.winehq.org/show_bug.cgi?id=51478
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|dinput:keyboard breaks |dinput:device8 breaks |user32:input's |user32:input's |test_keyboard_layout_name() |test_keyboard_layout_name() |in some locales () |in some locales ()
https://bugs.winehq.org/show_bug.cgi?id=51478
--- Comment #5 from François Gouget fgouget@codeweavers.com --- *** Bug 54650 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=51478
--- Comment #6 from François Gouget fgouget@codeweavers.com --- This happens in every locale nowadays (so de, fr too).
https://bugs.winehq.org/show_bug.cgi?id=51478
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |infyquest@gmail.com Fixed by SHA1| |e98388b6a09f2115d35aa340d4a | |57fdc8bc5680e Resolution|--- |FIXED
--- Comment #7 from Vijay Kamuju infyquest@gmail.com --- Fix commited - e98388b6a09f2115d35aa340d4a57fdc8bc5680e
https://bugs.winehq.org/show_bug.cgi?id=51478
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.0-rc3.