I recently built a basic granular synthesis plugin using the JUCE Framework and whenever I load the plugin into FL Studio Ableton and REAPER it crashes. When I go on FL Studio the error says that “this plugin is disabled because of an error during processing”. I reviewed my code over a hundred times and everything seems to line up. I don’t have any errors or warnings in the .cpp and .h files. I am not really sure what the problem is. If anyone has experience with debugging please let me know if you could help me.
Debug the plugin by attaching to the REAPER process in your IDE, and try to find out why its crashing. It can be you haven’t got the input/output assignments you need …
How do I check for the correct input output assignments?
Try to run your plugin through pluginval in debug mode. Maybe also try auval and the vst3 validator. If that works fine, make sure you don’t do any important stuff inside jasserts or other places that will be removed in a release build.
If that still didn’t help (which is very unlikely) implement detailed processing logging and work through the logs.
So this is what its showing me. Also I can’t figure out how why I can’t debug on REAPER.
To debug with REAPER:
All I do is select the plugin target, in my case AUv3, press “Run” in XCode, and it asks me which application to load - I select REAPER, and REAPER starts up - but the plugin isn’t instantiated yet (unless I have configured REAPER to automatically load last project, which I only use in rare cases of certainty) - so in REAPER I add a track, and instantiate the plugin - XCode sees that the plugin process is started (it waits for this process) and then it automatically attaches to the plugin instance created in REAPER, allowing me to debug further.
It may be similar on VStudio/Windows, but I do all my debugging on MacOS so ymmv.
First, get debugging under your DAW working - REAPER is pretty simple, once you realize that you have to instantiate the plugin instance manually and then see the debugger attach to that instance.
Anyway, once you have this working, set a breakpoint on the constructor of your plugin, and observe the input/output assignments as per this tutorial:
Also, once you’ve attached your debugger to your plugin instance, you may get the asserts() that are causing things to go awry. You want to breakpoint on
prepareToPlay() and then observe the input channelset with
getMainInputChannelSet() or if you are just interested in the number of channels, call