[Bug] KnownPluginList::scanAndAddDragAndDroppedFiles() fails for AU plugin

Trying to load an AU plugin from the command line with the following code:

int main (int argc, char* argv[])
{
    juce::MessageManager::getInstance();

    juce::ArgumentList args {argc, argv};

    const auto file = args[0].resolveAsExistingFile();
    juce::AudioPluginFormatManager formatManager;
    formatManager.addDefaultFormats();

    juce::KnownPluginList knownPluginList;
    juce::OwnedArray<juce::PluginDescription> typesFound;
    knownPluginList.scanAndAddDragAndDroppedFiles (formatManager, { file.getFullPathName() }, typesFound);

    DBG (typesFound.size());

    juce::MessageManager::deleteInstance();
    return 0;
}

For a valid AU plugin (that loads fine in Logic, passes auval, etc.) passed as the first argument, typesFound has a size of 0.

This same code works fine for VST3.

Stepping through the code, it seems the issue may come from here:

The auComponent value is nullptr so the callback is being called with the nullptr argument meaning the instance of the AU plugin isn’t created.

Tested with the GainPlugin demo with the same result of 0 types found.

This bug is breaking CI with pluginval, as explained here:

If I remember correctly (it’s been a while) the AU plugin must be installed into the correct location (i.e. /Library/Audio/Plug-Ins/Components or similar) it’s nothing to do with JUCE it’s just how has to be for the plugins to be discovered.

Even with the gain plugin example installed to ~/Library/Audio/Plug-Ins/Components/ I can’t get it to load in the audio plugin host… starting to think it might just be a permissions thing.

Seems that any plugin built with latest JUCE isn’t working… tried downloading the trial of FabFilter’s Saturn 2 and that worked fine, so did one of my own plugins built with an older version of JUCE 6.

Ah I wonder if it’s being made to run out of process and that’s somehow causing the problem. I take it you’re also running sudo killall -9 AudioComponentRegistrar before? does auval work OK?

Seems to have done the trick…

1 Like

Yeah, that’s a horrible one, it seemed to take a while for anyone to figure that out. You can also do a restart but obviously no good on CI.

Sadly still can’t get it to work on my azure pipeline… already wasted the majority of my bank holiday weekend on this so tbh I think I’m just gonna give up and only test vst3 for now.