From dd0eb02970bae249910da675814a9db24e185a2b Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 11 Feb 2021 13:55:44 +0100 Subject: [PATCH] Disable loading 32-bit VST3 plugins There is some sort of memory corruption going on and these plugins usually segfault on the audio thread. I'm clueless as to what could be causing this (I wouldn't be surprised if this is caused by an interaction between the VST3 SDK and Wine's Windows.h implementation), but it's probably best to disable loading 32-bit VST3 plugins completely until this has been fixed. --- src/plugin/utils.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp index f17a5de3..77f27df9 100644 --- a/src/plugin/utils.cpp +++ b/src/plugin/utils.cpp @@ -54,7 +54,17 @@ PluginInfo::PluginInfo(PluginType plugin_type) plugin_arch(find_dll_architecture(windows_library_path)), windows_plugin_path( normalize_plugin_path(windows_library_path, plugin_type)), - wine_prefix(find_wine_prefix(windows_plugin_path)) {} + wine_prefix(find_wine_prefix(windows_plugin_path)) { + // FIXME: We're getting some weird memory corruption issues with 32-bit VST3 + // plugins. Until we figure out what's causing this, we should just + // prevent these plugins from being loaded. + if (plugin_type == PluginType::vst3 && + plugin_arch == LibArchitecture::dll_32) { + throw std::runtime_error( + "Support for 32-bit VST3 plugins has temporarily been disabled " + "because of memory corruption issues"); + } +} bp::environment PluginInfo::create_host_env() const { bp::environment env = boost::this_process::environment();