VST3 32-bit GUI not working?


#1

After I did a merge of of the latest Juce code into my codebase and I found that the 32-bit VST3 version of my plug-in has a blank GUI.  I figured this must be just a bug with my plug-in because didn't any mention of it on the forums, but after messing around for a while I found I could repro the problem with the Juce Demo Plug-in.

I think what's going on is that the old VST/VST3_Wrapper.mm code used to have all of the same function names, so what happened was that it would use the VST2 versions (verfied that in the debugger). Then in the following commit the functions were renamed so the VST and VST3 versions are distinct, but now this caused the VST3 plug-in to use VST3_Wrapper.mm code but that appears to be broken for 32-bit builds.

Commit: 98ebfdc1fab08ce7103361cf837a91afe2d56651 [98ebfdc]
Parents: b7bca8ce5a
Author: hogliux <fabian.renn@gmail.com>
Date: September 4, 2015 5:16:52 AM PDT
Fix some warnings in the VST/VST3 wrappers

If I just rename the fucntions in VST3_Wrapper.cpp to use the VST_Wrapper.mm then it works. I'm still puzzled how this ever worked, becuase there should be a name colision build failure.

I'm also seeing a bunch of leaked memory asserts in my plug-in and the Juce Demo PlugIn when use the 32-bit Plug-in Host. If the plug-in GUI window is never opened then the leaks do NOT occur. I haven't tried the 64-bit version.

Anyone else seen this?


*** Leaked objects detected: 1 instance(s) of class OSXTypeface
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Typeface
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class ContentWrapperComponent
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class TypefaceCache
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class TimerThread
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Thread
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 3 instance(s) of class WaitableEvent
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class LookAndFeel_V2
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class LookAndFeel
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class DisplaySettingsChangeCallback
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Desktop
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class ComponentAnimator
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class MouseInputSource
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class MouseInputSourceInternal
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 5 instance(s) of class AsyncUpdater
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Component
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class MouseCursor
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 2 instance(s) of class JuceVST3Editor
JUCE Assertion failure in juce_LeakedObjectDetector.h:95

#2

Are you sure you've not got some kind of header/cpp mismatch in your build? If there was a problem linking those functions then your build would have failed, it wouldn't be something that goes wrong at runtime (?)


#3

I initially figured it was something like that or just a stupid mistake with our merge, but I was able to reproduce the problem with the Demo Plug-in on a pristine up to date (as of the 22nd) Juce repo.  Anyone else seeing this problem?


#4

I'll have a look at this today - looks like there's some duplicated code got in there somehow, and something looks a bit fishy to me..


#5

Hi Jules, any progress on this?


#6

Yes, I tidied up the duplicated code like I said I would. Let us know if it still doesn't work.


#7

I updated my clean Juce repo to today's code and rebuilt the Juce Demo Plugin but I still see the same issue. When I look through the history I don't see any commits related to the VST/VST3 wrapper, so I don't see how there could be a change in behavior.

I re-verfied that reseting my repo back to the following commit the problem is fixed:


Commit: b7bca8ce5a1123dcf69bdbd1a26dfaba02a044f2 [b7bca8c]
Parents: e881711f2a
Author: hogliux <fabian.renn@gmail.com>
Date: Friday, September 04, 2015 5:13:31 AM
Add VST3 bypass support

And then if I move the repo up by one commit then the problem occurs. So as I mentioned this commit is clearly the cause:


Commit: 98ebfdc1fab08ce7103361cf837a91afe2d56651 [98ebfdc]
Parents: b7bca8ce5a
Author: hogliux <fabian.renn@gmail.com>
Date: Friday, September 04, 2015 5:16:52 AM
Fix some warnings in the VST/VST3 wrappers

 

The other thing I verified is that if I copy the enitre contents of the juce_VST_Wrapper.mm into juce_VST3_Wrapper.mm and then rename all of the functions ending in "VST" to VST3" as it was before then it compiles and works properly with a functional GUI. So I still stand behind my theory that the old code was executing juce_VST_Wrapper.mm code even as a VST3 plug-in. I also verified that with breakpoints in the debugger that it does actually execute the "incorrect" code if you revert back before 09/04. 

-Chris

 


#8

Sorry, there was a bit of a mix-up and those changes never got pushed - should be up there now!


#9

Great, thanks. That fixed the problem.