From 71faf38a8594ab52e1814937f683d045bc5c5f44 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 21 Jul 2026 15:14:41 +0200 Subject: [PATCH] =?UTF-8?q?fix(apple):=20stats=20os=5Flog=20used=20%d=20fo?= =?UTF-8?q?r=2064-bit=20Swift=20Int=20=E2=80=94=20macOS=2026=20drops=20the?= =?UTF-8?q?=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swift `Int` is 64-bit (Foundation infers %lld); the stats mirror's format string used %d (32-bit C int) for fps/presents/lost. macOS 26's strict String(format:) validator rejects the mismatch and drops the whole line (the error also cascades onto the float args, mis-blaming floor_p50). Use %lld for the three Int fields. Pre-existing, unrelated to the DCP work; surfaced while reading presenter logs during the panic fix. Co-Authored-By: Claude Fable 5 --- .../Sources/PunktfunkClient/Session/SessionModel.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/apple/Sources/PunktfunkClient/Session/SessionModel.swift b/clients/apple/Sources/PunktfunkClient/Session/SessionModel.swift index 4a4e55f4..dd158a68 100644 --- a/clients/apple/Sources/PunktfunkClient/Session/SessionModel.swift +++ b/clients/apple/Sources/PunktfunkClient/Session/SessionModel.swift @@ -705,8 +705,11 @@ final class SessionModel: ObservableObject { // captured before the 2026-07 floor policy); the appended trio carries the // measured OS present floor and the floor-shaved values the HUD displays. let line = String( - format: "fps=%d presents=%d e2e_p50=%.1f e2e_p95=%.1f hostnet_p50=%.1f " - + "decode_p50=%.1f display_p50=%.1f lost=%d " + // Swift Int is 64-bit → %lld, NOT %d (which is a 32-bit C int); macOS 26's + // strict String(format:) validator rejects the %d/Int mismatch and drops + // the whole line (a cascade error that also mis-blames the float args). + format: "fps=%lld presents=%lld e2e_p50=%.1f e2e_p95=%.1f hostnet_p50=%.1f " + + "decode_p50=%.1f display_p50=%.1f lost=%lld " + "floor_p50=%.1f display_adj=%.1f e2e_adj=%.1f queue_p50=%.1f", frames, displayWindow?.count ?? 0,