Empty plugin passes all tests, validates, works in VST3TestHost, but crashes FL Studio on load

Hi, I’m at a bit of a loss with this one.

I’m trying to learn the VST3 SDK, and so far I have successfully built the SDK, as well as an empty project generated by the project generator. The built passes with 0 failed tests, and the validator runs without issue. I am able to execute the validator and see my plugin in the list. Furthermore, loading the plugin into the VST3TestHost works without problems. However, when I load the same plugin in FL Studio, it fails to load for an unknown reason.

I have attached the VST3 file in the .zip archive. Any help would be greatly appreciated.

Kind regards,
Robin Hammar

x86_64-win.zip (1.1 MB)

Your plug-in crashes when the setContentScaleFactor is called:

Exception thrown at 0x00007FF9C0E6C52D (GainPlugin.vst3) in cubase.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

Thank you for pointing me somewhere. However, this function is untouched since creating the project usign the VST3 Project Generator, which really confuses me. The function seems to be part of VSTGUI. Why would an untouched function inside of VSTGUI cause a crash?

Actually, when attempting to recompile the SDK, I now see that I get a non-fatal test fail during the cmake process.


What exactly is this indicating?

Edit: I see that this fail is also present in the example output presented at VST 3 Project Generator - VST 3 Developer Portal so I’m guessing this is ok. I will keep testing.

Update: redownloading the SDK and rebuilding everything from absolute scratch fixed my issues. The plugin now builds fine, and the VSTGUI4 editor loads properly in FL Studio.
Part of the issue seemed to be that an old scan of the plugin was lingering in the FL Studio plugin list, which was causing it to fail loading the plugin. Forcing FL Studio to redo the scan and recreate its plugin instantiation script was instrumental to fixing it.