diff --git a/CHANGELOG.md b/CHANGELOG.md index a58dcc05..29d69e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed +- Prevent _DMG_ VST3 plugins from freezing in **REAPER** under certain + circumstances. - Fixed builds on Wine 6.8 because of internal changes to Wine's `windows.h` implementation. diff --git a/src/plugin/bridges/vst3-impls/plugin-proxy.cpp b/src/plugin/bridges/vst3-impls/plugin-proxy.cpp index 24f1c08b..d5b1650c 100644 --- a/src/plugin/bridges/vst3-impls/plugin-proxy.cpp +++ b/src/plugin/bridges/vst3-impls/plugin-proxy.cpp @@ -836,9 +836,17 @@ Vst3PluginProxyImpl::endEditFromHost(Steinberg::Vst::ParamID paramID) { tresult PLUGIN_API Vst3PluginProxyImpl::setChannelContextInfos( Steinberg::Vst::IAttributeList* list) { if (list) { - return bridge.send_message(YaInfoListener::SetChannelContextInfos{ - .instance_id = instance_id(), - .list = YaAttributeList::read_channel_context(list)}); + // NOTE: After getting and setting state, the plugin may want to resize + // to match its old size. The DMG plugins tend to delay this + // request until after the state has been set, but at that point + // in time REAPER will also send channel context info. Both of + // these things need to be handled on the GUI thread on their + // receiving sides, resulting in a deadlock without this mutual + // recursion. + return maybe_send_mutually_recursive_message( + YaInfoListener::SetChannelContextInfos{ + .instance_id = instance_id(), + .list = YaAttributeList::read_channel_context(list)}); } else { bridge.logger.log( "WARNING: Null pointer passed to "