I noticed that a lot of Windows VST3 plugins running through yabridge were having issues with Qtractor. When I looked into this I noticed that Qtractor creates an IPlugView instance during the plugin's initialization, but it then never drops it again and instead it a second IPlugView instance while the first one is still alive. I guess some plugins just don't like this.
The issue was that reference counting through IPtr<IPlugView> wasn't done correctly, so those objects would always stay at a reference count of at least 1 even when those smart pointers were dropped and the instances would thus never get destroyed. The solution is to use Steinberg::owned() whenever a call to a VST3 interface function returns a pointer. That function allows assignment to a smart pointer without increasing the reference count (which will be at 1 by default). I haven't really checked if this same issue also applied elsewhere, but from a quick skim everything else looks correct!
Hi,
I noticed that a lot of Windows VST3 plugins running through yabridge were having issues with Qtractor. When I looked into this I noticed that Qtractor creates an
IPlugView
instance during the plugin's initialization, but it then never drops it again and instead it a secondIPlugView
instance while the first one is still alive. I guess some plugins just don't like this.The issue was that reference counting through
IPtr<IPlugView>
wasn't done correctly, so those objects would always stay at a reference count of at least 1 even when those smart pointers were dropped and the instances would thus never get destroyed. The solution is to useSteinberg::owned()
whenever a call to a VST3 interface function returns a pointer. That function allows assignment to a smart pointer without increasing the reference count (which will be at 1 by default). I haven't really checked if this same issue also applied elsewhere, but from a quick skim everything else looks correct!