JUCE AUv3 plugin freeze in JUCE hosts (iOS)

Hi,

I can’t figure what is going wrong here but it is quite easy to reproduce (tested with latest juce develop):

Build the AUv3SynthPluginDemo from JUCE and install it on iOS.
Build the AudioPluginHost and run it on iOS.

Instantiate AUv3SynthPlugin, select the “Show all parameters” menu entry from the AudioPluginHost popup menu. Now the AudioPluginHost is showing the “Room Size” parameter of AUv3SynthPlugin, move it a bit: everything works as expected .

Now rebuild the AUv3SynthPlugin so that it has 2 output buses instead of 1:

  static BusesProperties defaultBusesProperties() {
    auto b = BusesProperties().withOutput ("Output", AudioChannelSet::stereo(), true);
    b.addBus(false, "Output2", AudioChannelSet::stereo(), false);
    return b;
  }
public:
    AUv3SynthProcessor()
      : AudioProcessor (defaultBusesProperties()),

This time the AudioPluginHost will freeze after a few seconds of moving that “Room Size” slider back and forth. It will unfreeze after 10 or 20 seconds, but the plugin gui is now just a white rectangle.

It looks like a deadlock, but I can’t figure what is deadlocking. The hosts is stuck waiting for
AudioUnitGetParameter (au, paramID, kAudioUnitScope_Global, 0, &value); to return.

The fact that the issue happens only with multi-bus plugins is extra-strange but maybe that will give a hint about where the bug is hiding ?

1 Like

This is quite challenging to debug, since the problem seems to happen at the OS level inside the AudioUnitGetParameter call, as you mentioned.

I suspect this is a problem on the hosting side as opposed to the plugin side, since I’m able to reproduce the issue in the AudioPluginHost with a non-JUCE multi-bus plugin (Loopy Pro), and I’m unable to reproduce the issue in a non-JUCE host (AUM) with the AUv3SynthPlugin.

We’ve pushed a change that should address this issue here:

Essentially, we’re just trying to call AudioUnitGetParameter less frequently, which improves matters for me in testing. Please try out the change in your own project and let us know if you are still seeing issues.

Hi reuk,

thanks for taking the time to look into this issue. I wouldn’t be very surprised if it turned out to be a bug in Apple’s AUv3 code. I’ll give your workaround a try !