AudioPluginHost Bug: Duplicate Instance on Drag & Drop

Hi all,
I just spent the better part of my evening hunting down a problem and just wanted drop a note here in case anyone experiences the same problems.

TL;DR If you get duplicate instances in the AudioPluginHost, clear the plugin list.


Whenever I was dragging the built .vst3 onto the AudioPluginHost to create another instance the following happened: The first instance behaved as expected. The second time however there were two instances right on top of each other, only noticeable because of the darker drop shadow.
While debugging I also found out that the constructor of AudioProcessor was called more often than usual.

I then went spent quite some time thinking I managed to introduce a very weird bug. Cleaning the build folder multiple times. When I didn’t find anything I decided to create a new project and then copy my code into it, after a while I had two identical projects, where the one would produce a vst3 that resulted in duplicated instances and the other one working fine.
I even copied the “faulty” plugin code into the other folder, with the same behaviour.

At one point I tried to rename my original folder and it worked fine. When changing it back to the old name I got duplicates again.

Long story short, when I cleared the plugin list in the AudioPluginHost everything was working fine again.

rollo