From 0c8941f9f064a1a0604e706db6ac858fc23c2d97 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 17 Jan 2021 17:37:23 +0100 Subject: [PATCH] Update the fixme on REAPER's thread safety issues --- src/plugin/bridges/vst3.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugin/bridges/vst3.cpp b/src/plugin/bridges/vst3.cpp index 0712c5c9..2234c53b 100644 --- a/src/plugin/bridges/vst3.cpp +++ b/src/plugin/bridges/vst3.cpp @@ -210,7 +210,12 @@ Vst3PluginBridge::Vst3PluginBridge() // with it causes malloc failures or failing font // drawing calls. Valgrind reports all kinds of // memory errors within REAPER when this happens, and - // I'm not sure if yabridge is to blame here. + // I'm not sure if yabridge is to blame here. - As it + // turns out a lot of stuff in REAPEr, including + // calls to `IPlugFrame::resizeView()`, are not + // thread safe. We need to hook into `IRunLoop` and + // execute `IContextMenu::popup()` and + // `IPlugFrame::resizeView()` functions from there. return plugin_proxies.at(request.owner_instance_id) .get() .context_menus.at(request.context_menu_id)