From b1c26aaa954d6df7d7cd53864b0e7596e0d8f658 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 20 Jul 2021 18:46:33 -0400 Subject: [PATCH] [host] windows: log MsgWaitForMultipleObjects errors This function is sometimes flaky and may fail for no apparent reason, see https://stackoverflow.com/q/3945003. This has also been experienced during the development of #610. This commit adds logging so we may see if it ever fails for no reason and work out some way to fix it. --- host/platform/Windows/src/force_compose.c | 1 + host/platform/Windows/src/mousehook.c | 1 + 2 files changed, 2 insertions(+) diff --git a/host/platform/Windows/src/force_compose.c b/host/platform/Windows/src/force_compose.c index aeab72d6..2cf99dba 100644 --- a/host/platform/Windows/src/force_compose.c +++ b/host/platform/Windows/src/force_compose.c @@ -106,6 +106,7 @@ static DWORD WINAPI threadProc(LPVOID lParam) } break; default: + DEBUG_ERROR("MsgWaitForMultipleObjects failed: 0x%lx", GetLastError()); goto exit; } } diff --git a/host/platform/Windows/src/mousehook.c b/host/platform/Windows/src/mousehook.c index 1617ea1d..809e28d4 100644 --- a/host/platform/Windows/src/mousehook.c +++ b/host/platform/Windows/src/mousehook.c @@ -151,6 +151,7 @@ static DWORD WINAPI threadProc(LPVOID lParam) { } break; default: + DEBUG_ERROR("MsgWaitForMultipleObjects failed: 0x%lx", GetLastError()); goto exit; } }