https://bugs.winehq.org/show_bug.cgi?id=53101
--- Comment #1 from Sven Baars sven.wine@gmail.com --- This is caused by TlsGetValue previously calling SetLastError( ERROR_SUCCESS ); in X11DRV_MsgWaitForMultipleObjectsEx. The program starts working again by calling RtlSetLastWin32Error( ERROR_SUCCESS ); from X11DRV_MsgWaitForMultipleObjectsEx. That doesn't strike me as a proper fix though.