user32:clipboard CLIPBRDWNDCLASS interference (Radeon, others)
Francois Gouget
fgouget at codeweavers.com
Tue Jun 1 18:58:51 CDT 2021
This is the Windows side of the issue.
user32:clipboard sometimes fails like this:
clipboard.c:54: 0cc8: Starting open_and_empty_clipboard_thread hWnd=00010010
clipboard.c:55: 0cc8: OpenClipboard(00010010) = 1 (open=00010010 own=00000000)
# the thread terminates which implicitly calls CloseClipboard()
# so the clipboard should be unopened
clipboard.c:429: Test failed: wrong open window 00670304
# but it is actually opened
It turns out 670304 is actually a CLIPBRDWNDCLASS window created by
RadeonSettings.exe.
CLIPBRDWNDCLASS is (usually) a class registered by ole32.
Why does a graphics driver (or associated tools) need to access the
clipboard? It may actually be some background thing done by the QT5
framework in which case (based on the issue below) upgrading to a driver
using QT5 > 5.12 may help.
https://github.com/Sigil-Ebook/Sigil/issues/401
https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/windows/qwindowsclipboard.cpp
But it turns out Radeon is not the only one using Ole's clipboard and if
I try enough times I can also get failures on Nvidia. The w7u VM also
has the telltale class but I have not seen failures there.
cw-rx460-win81 (Radeon 19.11.3)
clipboard.c:2248: 00670304 CLIPBRDWNDCLASS 0190 '' [C:\Program Files\AMD\CNext\CNext\RadeonSettings.exe]
hwnd class pid text executable path
cw-rx460-win2009 (Radeon 21.3.2)
clipboard.c:2246: 00040054 CLIPBRDWNDCLASS 0c1c '' [C:\Windows\explorer.exe]
clipboard.c:2246: 0004002C CLIPBRDWNDCLASS 1850 '' [C:\Windows\System32\svchost.exe]
clipboard.c:2246: 00030056 CLIPBRDWNDCLASS 1850 '' [C:\Windows\System32\svchost.exe]
cw-gtx460-win2009 (Game Ready Driver 391.35)
clipboard.c:2247: 000201B2 CLIPBRDWNDCLASS 1c68 '' [C:\Windows\System32\svchost.exe]
clipboard.c:2247: 00010230 CLIPBRDWNDCLASS 1c68 '' [C:\Windows\System32\svchost.exe]
w7u
clipboard.c:2246: 000100EA CLIPBRDWNDCLASS 05f0 '' [C:\Windows\Explorer.EXE]
clipboard.c:2246: 00010052 CLIPBRDWNDCLASS 05f0 '' [C:\Windows\Explorer.EXE]
In any case, guided by the failure patterns I first tried to upgrade the
Radeon driver. That helped on cw-rx460-1909 (21.3.2) but the latest
drivers either won't install on older Windows versions (the infamous
error 184), or crash regularly (even when left alone, and frequently
enough during the tests to trigger a Windows reboot). So at least
Windows 10 1507 and Windows 8.1 are stuck with 19.11.3 and its
RadeonSettings.exe (I did not try the intermediate Windows versions).
Furthermore, while it would likely greatly reduce the failure rate we'd
probably still get failures once in a while, likely at a rate so low it
would cause TestBot false positives. Just like on Nvidia actually (see
the cw-gtx560-1809-32 and cw-gtx560-1909-32 lines).
--
Francois Gouget <fgouget at codeweavers.com>
More information about the wine-devel
mailing list