https://bugs.winehq.org/show_bug.cgi?id=51490
Bug ID: 51490 Summary: dinput:device has a random failure in overlapped_format_tests() on Windows 8.1 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: directx-dinput Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
dinput:device has a random failure on the w8 VM:
https://test.winehq.org/data/patterns.html#dinput:device
device.c:374: Test failed: keydown for D did not register
It sort of looks like a race condition though the pump_messages() call should take care of that.
The failing test (and all of overlapped_format_tests()) was added by the following commit.
commit d10887b8f56792ebcca717ccc28a289f7bcaf107 Author: Arkadiusz Hiler ahiler@codeweavers.com AuthorDate: Thu Jul 8 13:03:21 2021 +0300
dinput: Don't add 'default value 0' entries to the data transform.
This helps when dealing with the quirky c_dfDIJoystick2 format, which defines all the sliders as overlapping, i.e. rglSlider[2], rglVSlider[2], rglASlider[2] and rglFSlider[2] all share the same offset.
With the Linux backends, if the device exposes enough axes (e.g. some HOTAS) we end up using rglSlider.
Let's make sure we don't unnecessarily override the values there.
Signed-off-by: Arkadiusz Hiler ahiler@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=51490
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase Regression SHA1| |d10887b8f56792ebcca717ccc28 | |a289f7bcaf107
https://bugs.winehq.org/show_bug.cgi?id=51490
--- Comment #1 from François Gouget fgouget@codeweavers.com --- Created attachment 71203 --> https://bugs.winehq.org/attachment.cgi?id=71203 Extended dinput:device failure pattern
A look at the extended test failure pattern shows that all these failures happened between 2021-07-08 and 2021-08-03. dinput:device has not failed once since on Windows 8.1 (*).
(*) But it failed in a somewhat similar way on Windows 10 1709 and 1809 recently. That should go in a separate bug if it persists.
https://bugs.winehq.org/show_bug.cgi?id=51490
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |5cb70e73f070def227f47bb307c | |1d5a483fc898c Status|NEW |RESOLVED
--- Comment #2 from François Gouget fgouget@codeweavers.com --- I think the issue was fixed by this commit:
commit 5cb70e73f070def227f47bb307c1d5a483fc898c Author: Arkadiusz Hiler ahiler@codeweavers.com AuthorDate: Thu Aug 5 13:55:29 2021 +0300
dinput/tests: Make overlapped format tests more robust.
Both Acquire() and event processing with DirectInput seem to be asynchronous. In most cases we can just keep hammering GetDeviceData() until the event gets processed.
Things get pretty racy around Acquire() though. If we fire event right after the device is acquired we can find ourselves in one of the three situations:
1. Event happened after acquiring has completed - the wait will suffice.
2. Event happened before acquiring did any real work - the device will pick up the state as if the event was processed, but there's nothing in GetDeviceData(). Because of that we cannot fail on wait.
3. Event happened somewhere in the middle of acquiring - we ended up both missing the event for GetDeviceData() and we have outdated state. Sending event again will register as if the button was not already pressed.
This change covers all three scenarios.
Signed-off-by: Arkadiusz Hiler ahiler@codeweavers.com Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=51490
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.23.