jamulussoftware / jamulussoftware/jamulus

setRecordingDirectory replies "acknowledged" while silently disabling recording on a bad path

Offen
#3,937 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C
Sterne
1.1k
Forks
248
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
9

Beschreibung

**🤖 AI:** `jamulusserver/setRecordingDirectory` always replies `"acknowledged"`, but a bad path silently disables recording and discards the stored directory — with nothing to roll back to, and if a recording was already running, it ends the WAV mid-session while the jam continues, unannounced.

**Root cause, confirmed on current `main` (`4a43f6f6`).** [`SetRecordingDir`](https://github.com/jamulussoftware/jamulus/blob/4a43f6f6bd49a37b79817a64450346724cba5752/src/recorder/jamcontroller.cpp#L98-L186) tears down the existing recorder thread ([`EndRecorderThread()` + `wait()`](https://github.com/jamulussoftware/jamulus/blob/4a43f6f6bd49a37b79817a64450346724cba5752/src/recorder/jamcontroller.cpp#L106-L107)) before validating the new directory; on failure [`strRecordingDir` is wiped to `""`](https://github.com/jamulussoftware/jamulus/blob/4a43f6f6bd49a37b79817a64450346724cba5752/src/recorder/jamcontroller.cpp#L184). [The RPC handler](https://github.com/jamulussoftware/jamulus/blob/4a43f6f6bd49a37b79817a64450346724cba5752/src/serverrpc.cpp#L342-L352) reports `"acknowledged"` regardless of which branch ran.

**Measured on a headless build (`wt-3861`, 2026-08-12; the cited lines read identical on current `main`).** A parent-is-a-file path and a path beyond `PATH_MAX` both flip `enabled`/`initialised` `True → False` and `recordingDirectory` → `""`, RPC still `"acknowledged"`.

**A recording already in flight stops at the instant the bad call returns.** A growing WAV (950,272 → 975,916 bytes across a good call) sits flat at every checkpoint afterward, while `getClients` keeps reporting the same live connection throughout — the jam itself is untouched, so nobody in the room is told recording just ended.

The identical failure is loud in the GUI — [`GetRecorderErrMsg()`](https://github.com/jamulussoftware/jamulus/blob/4a43f6f6bd49a37b79817a64450346724cba5752/src/serverdlg.cpp#L611-L618) drives a `QMessageBox::warning` — and silent over RPC, which discards the same string. `getRecorderStatus`'s `errorMessage` does carry it, and the method's own doc comment says to re-check — a caller who does so can catch this — but nothing prompts the re-check, and "acknowledged" does not suggest a session recording just silently ended.

---

🤖 *This message was written by AI and reviewed by @mcfnord.*

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit SetRecordingDir in src/recorder/jamcontroller.cpp und dem setRecordingDirectory-Handler in src/serverrpc.cpp; vergleiche deren Fehlerpfad mit GetRecorderErrMsg() in src/serverdlg.cpp und getRecorderStatus. Reproduziere einen ungültigen Pfad und eine laufende Aufnahme und ermittle anschließend die erwartete RPC-Fehlerantwort sowie das Verhalten des Recorder-Zustands, bevor du die Abdeckung für beide Fälle bestimmst.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
api, audio-video-rtc
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.