Open xris1658 opened 1 week ago
For now I am still locating the root cause, but I am pretty sure that it's not the problem of VST3RunLoop
and EventFileDescriptorSupport
's impls. I have reimplemented EventFileDescriptorSupport
with Linux poll
API, and even replaced VST3RunLoop
with IRunLoop
impl from Ardour, only to get the same issue I had met with my old impls.
Making things worse, Dr. Memory have just crashed before the plugin GUI is shown. Since this issue is only on Linux, it might be a good idea to use Valgrind.
Vital is a synthesizer by Vital Audio, available in multiple formats including VST3 and CLAP.
Reproduce
You can reproduce this issue with the main app,
VST3Test
andCLAPTest
.Error message
Stack trace
If the plugin crashes, then it's on the plugin thread JUCE Timer, and all of the addresses cannot be accessed.
If the plugin freezes, then we can grab stack traces from the main thread and JUCE Timer thread.
Main thread
futex_wait
__GI___lll_lock_wait
lll_mutex_lock_optimized
___pthread_mutex_lock
Renderer::removeWindowHandle(ApplicationEditor *)
PluginEditor::~PluginEditor()
PluginEditor::~PluginEditor()
juce::JuceVST3EditController::JuceVST3Editor::ContentWrapperComponent::~ContentWrapperComponent()
juce::JuceVST3EditController::JuceVST3Editor::ContentWrapperComponent::~ContentWrapperComponent()
juce::JuceVST3EditController::JuceVST3Editor::removed()
juce::JuceVST3EditController::JuceVST3Editor::removed()
YADAW::Audio::Plugin::VST3PluginGUI::detachWithWindow
YADAW::Audio::Plugin::VST3PluginGUI::~VST3PluginGUI
YADAW::Audio::Plugin::VST3PluginGUI::~VST3PluginGUI
std::default_delete::operator()
std::__uniq_ptr_impl::reset
std::unique_ptr::reset
YADAW::Audio::Plugin::VST3Plugin::uninitializeEditController
YADAW::Audio::Plugin::VST3Plugin::uninitialize
testPlugin
main
__libc_start_call_main
__libc_start_main_impl
_start
JUCE Timer
__futex_abstimed_wait_common64
__futex_abstimed_wait_common
__GI___futex_abstimed_wait_cancelable64
__pthread_cond_wait_common
___pthread_cond_clockwait64
___pthread_cond_clockwait64
juce::WaitableEvent::wait(int) const
juce::Timer::TimerThread::run()
juce::threadEntryProc(void *)
start_thread
clone3
Those function names indicate that a deadlock occurred between JUCE Timer and the main thread.
More details
This issue is introduced after implementing Linux run loops (
Steinberg::Linux::IRunLoop
in VST3, andclap_host_posix_fd_support
in CLAP), which are mainly used for plugin event loops. If I removed those implementations (e.g. by not returning a pointer ofVST3RunLoop
inVST3Host::queryInterface
), then the plugin will not respond to GUI events, but will not crash on unloading.