How to handle external VST plugins that crash?

I have the MDA filters installed and there are two of them in particular that crash when I dispose of them. Other than that, Juce is handling thesee VSTs like a champion!

My question, is it possible to use SEH on Windows, or some general mechanism on all platforms, to prevent the host from going down in flames because of a plugin? If a plugin crashes, I would like to somehow gracefully regain control in my processing thread, mark the plugin as defective, and then not call it anymore.

Has anyone done this? Does Juce do this already? Is this possible?

Or does every application that supports VST plugins expose itself to the risk of a faulty plugin causing a crash?

From what I know from using a couble of DAWs is that they crash when VSTs crash. Which is generally a major complaint from users. I think -at least in windows- that if something really wrong, like a segfault, happens inside a process (even in a separate thread), the whole process is in the best case “unreliable” and in the worst case, crashed.
Therefore, in my opinion, the only way to isolate VSTs from the hosts would be to run them in a separate process. Check out cockos reaper. There’s an option to handle plugins that way. I guess it’s there in case of a plugin crash

EDIT: MDA plugins are actually open source. You can also try and fix them yourself ? :wink: :slight_smile:

Yeah, if it crashes you might as well just let the whole process go down, rather than risking carrying on with corrupted data. I added the “dead man’s pedal” stuff in the PluginDirectoryScanner to at least let you find out when this happens, and avoid reloading the plugin.