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 !

Hi Reuk,

Sorry it took me a lot of time to test, unfortunately the issue is unchanged for me, using the latest JUCE develop branch and AUv3SynthPlugin , I’m still able to trigger a UI freeze in Camelot very easily :-/

Thanks for letting us know. For me, the test case you originally provided freezes almost immediately on 8.0.11, but seems to work fine on the develop branch. I’m testing on iOS 26.5.

Have you tested the AUv3SynthPluginDemo/AudioPluginHost combination again with the newest changes? Do you see any new behaviour with these changes in place?

If the issue is still present for you in the AudioPluginHost, then maybe the issue is more likely to manifest on certain OS versions or hardware, or maybe there’s some other environmental difference (audio setup, connected peripherals, entitlements…). In this case, it would be helpful to know as much about your testing environment as possible, to allow us to reproduce the issue.

Otherwise, if the issue now only affects Camelot, then it’s likely that the issue is provoked by some implementation detail of that app. It would therefore be helpful if you could provide a new minimal procedure to reproduce the issue.

So far I did not manage to reproduce the freeze with AudioPluginHost and AUv3SynthPlugin (patched for two output buses). My plugin also does not seem to freeze in AudioPluginHost. So you’re right, I will report this to the Camelot devs.

1 Like