From c46425be35556f1ea1e9dd62fa27dba94755c6e9 Mon Sep 17 00:00:00 2001 From: Evan Mezeske Date: Mon, 10 Aug 2026 11:22:34 -0700 Subject: [PATCH] JACK: Fail AudioIODevice::open() if the client can't be activated --- .../native/juce_JackAudio_linux.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp b/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp index 9681d5fd5564..ea22e2766a7e 100644 --- a/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp +++ b/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp @@ -302,7 +302,16 @@ class JackAudioIODevice final : public AudioIODevice juce::jack_on_shutdown (client, shutdownCallback, this); juce::jack_on_info_shutdown (client, infoShutdownCallback, this); juce::jack_set_xrun_callback (client, xrunCallback, this); - juce::jack_activate (client); + + // If the client can't be activated, fail the whole open call: + // reporting success here would produce a device that appears to be + // running but never invokes its callback. + if (juce::jack_activate (client) != 0) + { + lastError = "Failed to activate JACK client"; + return lastError; + } + deviceIsOpen = true; if (! inputChannels.isZero())