[Bug] Juce 7.0.2 - Error loading VST3 in Wavelab 11, mac (& win?)

Hi we’ve found a bug that has cropped up in a couple of our plugins when upgrading to Juce 7 - occurs in 7.0.2 and develop, does not occur with Juce 6. Only been able to test on mac so far, win status unknown.

It happens when you have a call to setLatencySamples(> 0) in prepareToPlay() {…} with VST3 in Wavelab 11. To quickly test you can just add setLatencySamples(1000); to prepareToPlay() in NoiseGatePluginDemo.h.

To recreate:

  1. Open Wavelab, do not start transport
  2. Load audio file
  3. Add the JUCE plugin to the master effects
  4. Start transport

You then get the following error, and the plugin is disabled:

If you instantiate plugin after transport has begun, the plugin works, but if you then close Wavelab and reopen the same file, the plugin will auto-load broken again.

Has anyone else recreated this yet?

I ran into that when compiling using JUCE 6.1.6 – Upping to the JUCE 7 Develop tip fixed it.

Rail

Ah sounds hopeful, thanks for response… I’ll try the tip again and report back.

I’m still experiencing the problem in 7.0.3 and also is not fixed in the the current develop tip, on Mac at least (Wavelab 11.1.0 build 23)

I’m using WaveLab Pro 11.1.20.62

I’ll test again to make sure it’s still working with my latest builds.

Rail

Still works but in the VST Prefs I did have to tell WaveLab to rescan the plugins for it to show up.

Rail

Thanks for checking! For me there was no problem finding and instantiating the plugin manually. It’s just when wavelab automatically reloads the plugin when you open a project before you’ve ever hit transport. It loads and the UI opens etc, but starting transport causes an error and the plugin doesn’t function.

Yeah I saved and reopened the project and the plugin opens and functions correctly when I hit the spacebar to start playback.

Before when I was using JUCE 6.1.6 for the same plugin – I saw the same issue you reported when instantiating the plugin (which is mono/stereo with a sidechain input).

BTW the error was being caused because in

    void processAudio (AudioBuffer<FloatType>& buffer, MidiBuffer& midiMessages,
                       Vst::SymbolicSampleSizes sampleSize, bool isProcessBlockBypassedCall)
    {
        using namespace Vst;
        auto numSamples = buffer.getNumSamples();

        auto numInputAudioBuses  = getBusCount (true);
        auto numOutputAudioBuses = getBusCount (false);

the numInputAudioBuses was wrong.

Since switching to JUCE 7 fixed it for me I stopped looking for the cause.

Rail

Ah interesting thanks… The cause for me is calling setLatencySamples() in prepareToPlay, so it might be a slightly different bug but with the same symptoms in Wavelab.

1 Like

Thanks for reporting, I have a fix on the way.

1 Like

Try setting the latency Asynchronously. That’s what I do in this plugin.

Cheers,

Rail

That’s great news thanks!

There’s a fix out on develop now: