Jack not working with Plugin Host Demo?


#1

I can’t seem to get Jack to work with the demo host, but it works fine with the JuceDemo app? Once I select jack the programs hangs. If I step through with the debugger I get to the following ScopedLock in juceAudioDeviceManager.cpp:

void AudioDeviceManager::enableInputLevelMeasurement (const bool enableMeasurement)
{
    const ScopedLock sl (audioCallbackLock);

    if (enableMeasurement)
        ++inputLevelMeasurementEnabledCount;
    else
        --inputLevelMeasurementEnabledCount;

    inputLevel = 0;
}

If I don’t step through the code, and place my first breakpoint at this point, it doesn’t get hit before the hang? Does anyone have any suggestions, I’m at a loss. What’s different between the way the audio devices are selected with the host and the way they are with the JuceDemo?


#2

Hmm, looking at that (old!) bit of code, there’s really no reason for me to have used a lock there - I’ll replace it with an atomic counter, which will probably sort out your deadlock too.

But for the record: when you’re reporting a deadlock, you need to let us know the stack traces of both threads that are deadlocked, not just one of them!


#3

Thanks. I’ll look into how to do that using gdb.