VST3 distortion plugin crashes in FL Studio but works standalone

Just as the title says. It finds the plugin, it runs, but as soon as I touch a knob or slider FL Studio gives this error and stops working:

FL Studio ( has encountered an error and need to restart.

Crash log saved to C:\Users\wolfk\Documents\Image-Line\FL Studio\Support\Logs\Crash\ folder.

Please use Ctrl+C to copy this message and report to support.

External exception E06D7363
00007FFC8C8F0000:00007FFC8C924FD9: KERNELBASE.dll
00007FFC58090000:00007FFC580966C0: VCRUNTIME140.dll
00007FFC25E00000:00007FFC25E3B3DF: MSVCP140.dll
00007FFC2D2D0000:00007FFC2D46D277: Distort.vst3
00007FFC2D2D0000:00007FFC2D471AB1: Distort.vst3
00007FFC2D2D0000:00007FFC2D2D6ED8: Distort.vst3
00007FFC2D2D0000:00007FFC2D3BDBB6: Distort.vst3
000000000BE30000:000000000C190C6D: Fruity Wrapper_x64.dll
000000000BE30000:000000000C1BFB0F: Fruity Wrapper_x64.dll
000000000BE30000:000000000C1BCE28: Fruity Wrapper_x64.dll
000000000BE30000:000000000C1D9618: Fruity Wrapper_x64.dll
0000000002D10000:0000000002E7E064: QuickFontCache_x64.dll
0000000002D10000:0000000002E7D6A4: QuickFontCache_x64.dll
00007FFC8D720000:00007FFC8D72E858: USER32.dll
00007FFC8D720000:00007FFC8D72E299: USER32.dll
00000000039D0000:0000000003D73FB0: _FLEngine_x64.dll
00000000039D0000:0000000003D740D8: _FLEngine_x64.dll
00000000039D0000:0000000003D745C8: _FLEngine_x64.dll
00000000039D0000:00000000043B4F57: _FLEngine_x64.dll
00007FF6654B0000:00007FF6654B4147: FL64.exe
00007FF6654B0000:00007FF6654B458B: FL64.exe
00007FF6654B0000:00007FF6654B57D7: FL64.exe
00007FFC8D400000:00007FFC8D417034: KERNEL32.DLL
00007FFC8F130000:00007FFC8F182651: ntdll.dll

And as I said before standalone and in AudioPluginHost works well. Just wondering what the problem could be. Thanks

Instead of relying on the FL crash log, you can just run FL as your debug executable (instead of AudioPluginHost), and when it crashes your debugger should give you some insight into whats going wrong.

I think you’re on windows. Assuming FL isn’t directly scanning your build folder, before you open the plugin in FL you will need to replace the plugin in your VST folder with your latest Debug build, as well as add/replace your debug builds .Pdb file.

Hope that helps!

1 Like

Thanks but I’m still a bit baffled. I did what you said about debugging through FL studio but it jjust gives me a bad function call error:

'FL64.exe' (Win32): Loaded 'C:\Program Files\Image-Line\FL Studio 20\Plugins\Fruity\Effects\Fruity Wrapper\Fruity Wrapper_x64.dll'. Module was built without symbols.
'FL64.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\VST3\Distort.vst3'. Module was built without symbols.
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\WindowsCodecs.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\thumbcache.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. 
'FL64.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvami.inf_amd64_0c50dc64ed3c91bc\nvdlistx.dll'. 
'FL64.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvami.inf_amd64_0c50dc64ed3c91bc\nvdlistx.dll'
The thread 0x77f0 has exited with code 0 (0x0).
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\mscms.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\coloradapterclient.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\d2d1.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\DWrite.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\d3d10warp.dll'. 
'FL64.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'. 
Exception thrown at 0x00007FFC8C924FD9 in FL64.exe: Microsoft C++ exception: std::bad_function_call at memory location 0x00000000007DF150.
The thread 0x6504 has exited with code 0 (0x0).

Nothing else does this, Cakewalk and standalone are fine.

In case you guys need the source code, heres the repo:

Thanks again

The multiple assignments of empty valuetrees to state->state in the ctor look sketchy…

1 Like

I actually commented those out, the vst still works in cakewalk but not FL Studio…

Anyone with FL want to get it a go on their system?

Your log looks like from a release build. Try using a debug build. Then start FL Studio first, then attach the debugger, then load the plugin. This will most likely show you what causes the crash.

1 Like