From dbb80ebd66e2b2cde13cd8b06683d2d15a7d9e88 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 2 Jun 2026 21:20:06 +1000 Subject: [PATCH] [client]: core: add timeout on pointerQueue wait loop If the host has had a fault this loop can become infinite, soft-locking the application. This adds a 200ms timeout to prevent this. --- client/src/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/src/core.c b/client/src/core.c index d07eaffa..22d5d525 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -554,6 +554,7 @@ void core_handleMouseNormal(double ex, double ey) { /* wait for the move request to be processed */ g_cursor.realigning = true; + unsigned timeout = 200; do { LG_LOCK(g_state.pointerQueueLock); @@ -577,6 +578,14 @@ void core_handleMouseNormal(double ex, double ey) if (hostSerial >= setPosSerial) break; + if (--timeout == 0) + { + DEBUG_ERROR( + "pointerQueue serial not updating, expected %u but stuck at %u", + setPosSerial, hostSerial); + break; + } + g_state.ds->wait(1); } while(app_isRunning());