I *think* this will fix the test timeouts that happen on Gitlab since https://gitlab.winehq.org/wine/wine/-/merge_requests/5262.
I'm not completely sure that it will, because the failure is very elusive and somehow only happening on Gitlab CI, but there's a logic behind it: we were previously enumerating monitors from the adapters we found, so every monitor enumerated had a matching adapter. We are now enumerating monitors directly, and matching their adapter next.
How we then end up with a monitor without a matching adapter is still unclear, but I think it's better to fix it like this for now, as it is plaguing MRs with failures and long timeouts.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/sysparams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 07b9d46d9eb..d5ad97a2c33 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1501,7 +1501,7 @@ static void clear_display_devices(void) while (!list_empty( &monitors )) { monitor = LIST_ENTRY( list_head( &monitors ), struct monitor, entry ); - adapter_release( monitor->adapter ); + if (monitor->adapter) adapter_release( monitor->adapter ); list_remove( &monitor->entry ); free( monitor ); }