On Mon Jan 30 17:32:02 2023 +0000, Ivan Chikish wrote:
UPD: callstack of the "failure" I'm experiencing:
=>0 0x0000007e13d0e7 X11DRV_MsgWaitForMultipleObjectsEx+0xb7(count=0, handles=00 00000000000000, timeout=000000000069FBB8, mask=0x1cff, flags=0) 1 0x0000007e7ac1f0 wait_message+0x60(count=0, handles=0000000000000000, timeou t=0, mask=0x1cff, flags=0) 2 0x0000007e7b14b4 NtUserPeekMessage+0xb4(msg_out=<couldn't compute location>, hwnd=<couldn't compute location>, first=<couldn't compute location>, last=<coul dn't compute location>, flags=<couldn't compute location>) 3 0x000000f7c55469 in ntdll.so (+0x37469) (0x0000000069fcb4)
@nekotekina Thanks, I understand the issue better now (in my last paragraphs of my original message I mixed up `data` with `handles` when thinking about code paths leading to this, so please ignore those).
However, I now wonder if what you describe is a problem at all. It seems to me that everything is working as expected, and the 0xffffffff GetLastError you see is in fact not relevant:
``` NtUserPeekMessage wait_message count=0 handles=NULL X11DRV_MsgWaitForMultipleObjectsEx count=0 handles=NULL => -1 (0xffffffff) => WAIT_FAILED (0xffffffff) => FALSE, since wait_message() returned != WAIT_TIMEOUT (indicating that we received driver events) the code calls peek_message() again, finds nothing and returns FALSE, due to: ret = wait_message( 0, NULL, 0, QS_ALLINPUT, 0 ); /* if we received driver events, check again for a pending message */ if (ret == WAIT_TIMEOUT || peek_message( &msg, hwnd, first, last, flags, 0 ) <= 0) return FALSE; ```
So, this sequence seems that's just part of normal operation, and a red herring for your investigation?