BR: can't unload properly VST3 plug-ins in some DAWs

Hello to the JUCE team!

Recently, after a JUCE version update, I remarked that something in the base code broke my usual development workflow. I code my plug-ins on Windows 10 before porting them to mac OS, using Visual Studio 2019. I have the DAW Reaper 64 bits opened all the time, with a very useful setting being checked (Reaper preferences > Plug-ins > VST > allow complete unload of VST plug-ins).

This way, I can compile my project, and without opening / closing my DAW all the time, I can just load the plug-in in Reaper, delete the instance, re-compile, load the plug-in, delete the instance, re-compile etc.

But now, this doesn’t work anymore, because Reaper can’t unload fully the plug-in when I delete any instance. To be able to recompile the plug-in and copy it where it can be loaded again, I need now to close Reaper and open it again.

With the very last version of JUCE from the develop branch, this problem happens all the time, for example if I create a new plug-in straight from the Projucer template, and I guess it might have implications in other contexts too obviously. However, if I replace the 6.1.5 juce_audio_basics module with say the 6.0.5 version, the plug-in still compile fine, but the problem diseappears.

Any idea about why this is happening, and about a potential fix? @t0m @reuk

Thanks in advance!


Thanks for reporting. It looks like there’s a “Windows Hook” that isn’t being cleaned up properly when the plugin is destroyed. However, this hook is in juce_gui_basics rather than juce_audio_basics. Was this a typo in your post, or does updating the juce_audio_basics module really fix things for you? I’m wondering whether there’s more than one issue at play here.

1 Like

Hello and thanks for looking at this!

It wasn’t a typo, I could remove the issue just by replacing the version of juce_audio_basics, but it might be also because a call to one of the windows related source code functions there is not made the same way with 6.0.5 and 6.1.5…

I’ve added a fix for the issue in juce_gui_basics here:

Please could you test with this version and let us know if the issue is still not fixed for you? Thanks!

1 Like

Just tried the fix, it removes the issue, thanks a lot @reuk !

1 Like