Skip to content

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

Open

Description

@mcfnord

πŸ€– 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 tears down the existing recorder thread (EndRecorderThread() + wait()) before validating the new directory; on failure strRecordingDir is wiped to "". The RPC handler 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() 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.

Activity

  1. pljones commented on Sep 6, 2026

    @pljones
    Collaborator

    The identical failure is loud in the GUI β€” GetRecorderErrMsg() 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.

    OK, so the JSON-RPC call needs to make the follow up call to ask if everything is okay, not just assume.

    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.

    Does the GUI failure flag recording ending? If not, that's a separate issue.

  2. mcfnord commented on Sep 7, 2026

    @mcfnord
    ContributorAuthor

    πŸ€– AI: No, and the dialog is never given the chance: while a session records, UpdateRecorderStatus disables the path field, the browse button and the clear button. Clicking that button at one fixed pixel opened nothing mid-session, and opened Select Main Recording Directory once recording had been stopped the ordinary way.

    Measured on 72e856af β€” GUI server, real client over a dummy JACK device, the server's own WAV as the evidence. Both actions end the recording:

    action server dialog connected client
    stopRecording 14491 px change, status β†’ Not enabled recorderState 3 β†’ 2, red title clears
    setRecordingDirectory, bad path 0 of 345744 px no notification, red title stays

    One call separates them: SetEnableRecording finishes with CreateAndSendRecorderStateForAllConChannels(), while SetRecordingDir has no such line and ends the recorder thread before validating anything. The panel keeps reading Recording over a live session path.

    The follow-up call does not restore anything either: recordingDirectory is empty by then, and re-setting the old path opens a second session directory rather than continuing the first.

    One correction to the body above: that QMessageBox::warning is in OnStopRecorder, which this path never reaches; in the GUI the bad path surfaces as ERROR: in the path field. The cause is the one missing notification, shared with the acknowledged reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions