From c5877ee5c8ac6027c17d7400f20491032c057fb0 Mon Sep 17 00:00:00 2001 From: Andrew Bates Date: Mon, 5 Oct 2026 23:39:40 -0500 Subject: [PATCH] fix(gameserver): promote unregister summary to Info so #117-class regressions surface in production logs (#122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both the owner-recorded line (gameserver.cpp:944) and the "Unregistered %zu broadcaster callbacks" line (:1125) were Debug, which isn't on by default — the only reason #117's broadcasterOwner-dropped bug went a week unnoticed in production. Promoted the unregister-time line to Info and folded in owner/liveOwner: #117's signature was recordedOwner reading null while liveOwner was a real pointer, so a mismatch between the two now surfaces without enabling Debug logging. Left the registration-time line at Debug since the unregister-time summary now carries the same owner value plus the actual outcome, which is the actionable moment. No other call site or test references either log string by exact text (checked across the whole tree, not just .cpp/.py/.go). Co-Authored-By: nevr-runtime --- src/runtime/server/gameserver.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/runtime/server/gameserver.cpp b/src/runtime/server/gameserver.cpp index 1de0f9d3..8f7e95fd 100644 --- a/src/runtime/server/gameserver.cpp +++ b/src/runtime/server/gameserver.cpp @@ -1121,8 +1121,16 @@ void GameServerLib::UnregisterAllCallbacks() { : GameServer::BroadcasterUnlisten([](EchoVR::Broadcaster* owner, uint16_t handle) { EchoVR::BroadcasterUnlisten(owner, handle); }); + // Issue #122: this is the line that would have caught #117 in production. + // #117's signature was recordedOwner reading null (never recorded) while + // liveOwner was a real pointer — the mismatch that makes removed stay 0 + // with no actual error. It was Debug, which isn't on by default, so that + // week-long silent no-op went unseen. + const EchoVR::Broadcaster* recordedOwner = cb.broadcasterOwner; const size_t removed = GameServer::UnregisterBroadcasterCallbacks(liveOwner, cb, unlisten); - Log(EchoVR::LogLevel::Debug, "[NEVR.GAMESERVER] Unregistered %zu broadcaster callbacks", removed); + Log(EchoVR::LogLevel::Info, + "[NEVR.GAMESERVER] Unregistered %zu broadcaster callbacks (owner=%p, liveOwner=%p)", + removed, static_cast(recordedOwner), static_cast(liveOwner)); } VOID GameServerLib::Terminate() {