https://bugs.winehq.org/show_bug.cgi?id=53434
Bug ID: 53434 Summary: user32:msg - test_SendMessage_other_thread() sometimes fails on Windows 10 1507 - 1909 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
user32:msg - test_SendMessage_other_thread() sometimes fails on Windows 1507 - 1909:
msg.c:18493: main: call PeekMessage msg.c:18505: Test failed: wrong status 00080000 msg.c:18507: main: call PeekMessage msg.c:18508: Test failed: PeekMessage should fail
https://test.winehq.org/data/patterns.html#user32:msg
Where 0x00080000 indicates that there are still QS_POSTMESSAGE messages in the queue and that none were added since the last call.
This only happens on Windows 10 1507 to 1909.
https://bugs.winehq.org/show_bug.cgi?id=53434
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=53434
--- Comment #1 from François Gouget fgouget@codeweavers.com --- This case can have some more related failures and more Windows 10 versions are actually impacted.
For instance on 2022-08-05 w1064v1809-32:
msg.c:18486: main: call SendMessage msg.c:18493: main: call PeekMessage msg.c:18495: Test failed: expected WM_USER+1, got 031f msg.c:18497: Test failed: SendMessage from other thread 3: 1: the msg sequence is not complete: expected 0401 - actual 0000 msg.c:18497: Failed sequence SendMessage from other thread 3: msg.c:18497: 0: expected: msg 0403 - actual: MsgCheckProc: 00030366 0403 wp 00000000 lp 00000000 (flags 19) msg.c:18497: 1: expected: msg 0401 - actual: nothing msg.c:18505: Test failed: wrong status 00080000 msg.c:18507: main: call PeekMessage msg.c:18508: Test failed: PeekMessage should fail
Where 0x031f == WM_DWMNCRENDERINGCHANGED?
And on 2022-04-28 cw-gtx560-2009-64:
msg.c:18418: main: call GetMessage msg.c:18420: msg.c:18347: thread: call SendMessage Test failed: expected WM_USER, got 031f msg.c:18422: Test failed: SendMessage from other thread 1: 1: the msg sequence is not complete: expected 0400 - actual 0000 msg.c:18422: Failed sequence SendMessage from other thread 1: msg.c:18422: 0: expected: msg 0402 - actual: MsgCheckProc: 0000000001C7072A 0402 wp 00000000 lp 00000000 (flags 19) msg.c:18422: 1: expected: msg 0400 - actual: nothing msg.c:18431: main: call SendMessage msg.c:18438: main: call PeekMessage msg.c:18440: Test failed: expected WM_USER+1, got 0400 msg.c:18442: Test failed: SendMessage from other thread 3: 1: the msg 0x0401 was expected, but got msg 0x0400 instead msg.c:18442: Failed sequence SendMessage from other thread 3: msg.c:18442: 0: expected: msg 0403 - actual: MsgCheckProc: 0000000001C7072A 0403 wp 00000000 lp 00000000 (flags 19) msg.c:18442: 1: expected: msg 0401 - actual: MsgCheckProc: 0000000001C7072A 0400 wp 00000000 lp 00000000 (flags 19) msg.c:18450: Test failed: wrong status 00080000 msg.c:18452: main: call PeekMessage msg.c:18453: Test failed: PeekMessage should fail
https://bugs.winehq.org/show_bug.cgi?id=53434
--- Comment #2 from François Gouget fgouget@codeweavers.com --- This can fail slightly differently on Windows 7 too.
For instance on 2022-11-29 w7u-es and 2022-11-21 w7u-pt-PT:
msg.c:19059: Test failed: SendMessage from other thread 1: 1: the msg 0x0400 was expected, but got msg 0x0403 instead msg.c:19059: Failed sequence SendMessage from other thread 1: msg.c:19059: 0: expected: msg 0402 - actual: MsgCheckProc: 01DF01F8 0402 wp 00000000 lp 00000000 (flags 19) msg.c:19059: 1: expected: msg 0400 - actual: MsgCheckProc: 01DF01F8 0403 wp 00000000 lp 00000000 (flags 19) msg.c:19059: 2: expected: nothing - actual: MsgCheckProc: 01DF01F8 0400 wp 00000000 lp 00000000 (flags 19) msg.c:19073: Test failed: wrong status 00080000 msg.c:19079: Test failed: SendMessage from other thread 3: 0: the msg 0x0403 was expected, but got msg 0x0401 instead msg.c:19079: Failed sequence SendMessage from other thread 3: msg.c:19079: 0: expected: msg 0403 - actual: MsgCheckProc: 01DF01F8 0401 wp 00000000 lp 00000000 (flags 19) msg.c:19079: 1: expected: msg 0401 - actual: nothing msg.c:19091: Failed sequence SendMessage from other thread 5: msg.c:18487: Failed sequence SetFocus on a desktop window: msg.c:18497: Failed sequence SetFocus on another thread window: msg.c:18517: Failed sequence SetActiveWindow on a desktop window: msg.c:18527: Failed sequence SetActiveWindow on another thread window: msg.c:18592: Failed sequence SetFocus on a child window: msg.c:18592: 0: expected: hook 0009 - actual: CBT: hook 9 (HCBT_SETFOCUS) wp 0038028c lp 00530216 msg.c:12896: QS_RAWINPUT not supported on this platform msg.c:12921: Test failed: wrong qstatus 00000000
and 2022-11-24 w7u-p-PT:
msg.c:19059: Test failed: SendMessage from other thread 1: 1: the msg 0x0400 was expected, but got msg 0x0403 instead msg.c:19059: Test failed: SendMessage from other thread 1: 2: the msg sequence is not complete: expected 0000 - actual 0400 msg.c:19059: Failed sequence SendMessage from other thread 1: msg.c:19059: 0: expected: msg 0402 - actual: MsgCheckProc: 02260232 0402 wp 00000000 lp 00000000 (flags 19) msg.c:19059: 1: expected: msg 0400 - actual: MsgCheckProc: 02260232 0403 wp 00000000 lp 00000000 (flags 19) msg.c:19059: 2: expected: nothing - actual: MsgCheckProc: 02260232 0400 wp 00000000 lp 00000000 (flags 19) msg.c:19073: Test failed: wrong status 00080000 msg.c:19079: Test failed: SendMessage from other thread 3: 0: the msg 0x0403 was expected, but got msg 0x0401 instead msg.c:19079: Test failed: SendMessage from other thread 3: 1: the msg sequence is not complete: expected 0401 - actual 0000 msg.c:19079: Failed sequence SendMessage from other thread 3: msg.c:19079: 0: expected: msg 0403 - actual: MsgCheckProc: 02260232 0401 wp 00000000 lp 00000000 (flags 19) msg.c:19079: 1: expected: msg 0401 - actual: nothing msg.c:19059: Failed sequence SendMessage from other thread 1: msg.c:19059: 0: expected: msg 0402 - actual: MsgCheckProc: 02270232 0402 wp 00000000 lp 00000000 (flags 19) msg.c:19059: 1: expected: msg 0400 - actual: MsgCheckProc: 02270232 0400 wp 00000000 lp 00000000 (flags 19) msg.c:19079: Failed sequence SendMessage from other thread 3: msg.c:19079: 0: expected: msg 0403 - actual: MsgCheckProc: 02270232 0403 wp 00000000 lp 00000000 (flags 19) msg.c:19079: 1: expected: msg 0401 - actual: MsgCheckProc: 02270232 0401 wp 00000000 lp 00000000 (flags 19) msg.c:19091: Failed sequence SendMessage from other thread 5: msg.c:18487: Failed sequence SetFocus on a desktop window: msg.c:18497: Failed sequence SetFocus on another thread window: msg.c:18517: Failed sequence SetActiveWindow on a desktop window: msg.c:18527: Failed sequence SetActiveWindow on another thread window: msg.c:18592: Failed sequence SetFocus on a child window: msg.c:18592: 0: expected: hook 0009 - actual: CBT: hook 9 (HCBT_SETFOCUS) wp 0026025a lp 00310280 msg.c:12896: QS_RAWINPUT not supported on this platform msg.c:12921: Test failed: wrong qstatus 00000000
https://bugs.winehq.org/show_bug.cgi?id=53434
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|user32:msg - |user32:msg - |test_SendMessage_other_thre |test_SendMessage_other_thre |ad() sometimes fails on |ad() sometimes gets a bad |Windows 10 1507 - 1909 |WM_USER message sequence on | |Windows
https://bugs.winehq.org/show_bug.cgi?id=53434
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- This pattern is masking a consistent failure on Windows 7 machines in test_PeekMessage:
msg.c:13432: Test failed: wrong qstatus 00000000
The test doesn't have any obvious race condition (it correctly waits for SendNotifyMessage in the other thread to complete), and the following PeekMessage does process the notify message.
More strangely, this test has later checks doing almost the same thing (but with more message types in the queue), and the queue status is set correctly there.
https://bugs.winehq.org/show_bug.cgi?id=53434
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- It seems both calls are getting ERROR_INVALID_FLAGS (I did call SetLastError before that call so I know it's not left over from the previous one). This doesn't explain very much, since later calls to GetQueueStatus use the same set of flags, but it gives a way to detect the broken behavior.