Linux VST3 Failure with 6.1.3 and 4 but not 2

Hi Folks

Got a report about Monique (which uses Juce 6.1.3) failing on linux with

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  54
  Current serial number in output stream:  54
Scan Failed.

when run in most hosts. Backing down to 6.1.2 fixes it. Seems this is also a GitHub issue

I can back monique down to 6.1.2 pretty easily but before I do wanted to ask here if there’s a fix imminent in 6.1.5 or some such?

I haven’t bisected to figure out where in the 6.1.3 / 6.1.2 split this happens. Just seems to be a user report that lots of folks have so figured I’d ask here.

Thanks

1 Like

I’ve been seeing the same failure with pluginval 0.3.0 testing pamplejuce using xvfb on Ubuntu 20.04 via GitHub Actions.

It seemed to be intermittent? I had a few runs where it seemed happy, so I thought it was resolved until today…

Ah, the issue returned because I updated the plugin under test (pamplejuce) to latest JUCE develop.

Locking pamplejuce to 6.1.2 resolves the issue.

This is a gdb log and backtrace for opening any JUCE 6.1.3+ VST3 plugin in any host on Arch Linux with Xorg 21.1.2 libX11 1.7.3.1, and the latest develop branch JUCE (so the JUCE assertion failure line number should still be up to date):

backtrace
>>> break _XDefaultError 
Breakpoint 5 at 0x7ffff7e6f990
>>> r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/lib/carla/carla-bridge-native vst3 /home/robbert/.vst3/Spectral\ Compressor.vst3 \(none\) 0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libjack.so.0 loaded successfully!
[New Thread 0x7ffff586d640 (LWP 31846)]
[New Thread 0x7ffff4fcc640 (LWP 31847)]
[New Thread 0x7ffff47cb640 (LWP 31848)]
[Thread 0x7ffff47cb640 (LWP 31848) exited]
[Thread 0x7ffff4fcc640 (LWP 31847) exited]
JUCE v6.1.4
[New Thread 0x7ffff4fcc640 (LWP 31849)]
JUCE Assertion failure in juce_linux_XWindowSystem.cpp:190

Thread 1 "carla-bridge-na" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7c378ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
>>> c
Continuing.
[Switching to Thread 0x7ffff4fcc640 (LWP 31849)]

Thread 5 "carla-bridge-na" hit Breakpoint 5, 0x00007ffff7e6f990 in _XDefaultError () from /usr/lib/libX11.so.6
>>> bt
#0  0x00007ffff7e6f990 in _XDefaultError () at /usr/lib/libX11.so.6
#1  0x00007ffff7e6fb05 in _XError () at /usr/lib/libX11.so.6
#2  0x00007ffff7e6c7a8 in  () at /usr/lib/libX11.so.6
#3  0x00007ffff7e6da2d in _XReply () at /usr/lib/libX11.so.6
#4  0x00007ffff7e52de6 in XGetWindowProperty () at /usr/lib/libX11.so.6
#5  0x00007ffff378eded in juce::XWindowSystemUtilities::GetXProperty::GetXProperty(_XDisplay*, unsigned long, unsigned long, long, long, bool, unsigned long) (this=0x7ffff4fcb830, display=0x7fffec01a5a0, window=0, atom=433, offset=0, length=9223372036854775807, shouldDelete=false, requestedType=433) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:169
#6  0x00007ffff378f530 in juce::XWindowSystemUtilities::XSettings::update() (this=0x7fffec028be0) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:212
#7  0x00007ffff378ef5e in juce::XWindowSystemUtilities::XSettings::XSettings(_XDisplay*) (this=0x7fffec028be0, d=0x7fffec01a5a0) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:191
#8  0x00007ffff38469ff in std::make_unique<juce::XWindowSystemUtilities::XSettings, _XDisplay*&>(_XDisplay*&) () at /usr/include/c++/11.1.0/bits/unique_ptr.h:962
#9  0x00007ffff3799784 in juce::XWindowSystem::initialiseXSettings() (this=0x7fffec005790) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:3033
#10 0x00007ffff3799e75 in juce::XWindowSystem::initialiseXDisplay() (this=0x7fffec005790) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:3124
#11 0x00007ffff3791d50 in juce::XWindowSystem::XWindowSystem() (this=0x7fffec005790) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:1442
#12 0x00007ffff362e910 in juce::SingletonHolder<juce::XWindowSystem, juce::CriticalSection, false>::getWithoutChecking() (this=0x7ffff3fc7b80 <juce::XWindowSystem::singletonHolder>) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_core/memory/juce_Singleton.h:103
#13 0x00007ffff361fda3 in juce::SingletonHolder<juce::XWindowSystem, juce::CriticalSection, false>::get() (this=0x7ffff3fc7b80 <juce::XWindowSystem::singletonHolder>) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_core/memory/juce_Singleton.h:92
#14 0x00007ffff360bbb1 in juce::XWindowSystem::getInstance() () at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h:250
#15 0x00007ffff360c4e6 in juce::MessageThread::start()::{lambda()#1}::operator()() const (__closure=0x555555991df8) at /home/robbert/Documenten/projecten/spectral-compressor/build/_deps/juce-src/modules/juce_audio_plugin_client/VST3/../utility/juce_LinuxMessageThread.h:64
#16 0x00007ffff3659f22 in std::__invoke_impl<void, juce::MessageThread::start()::{lambda()#1}>(std::__invoke_other, juce::MessageThread::start()::{lambda()#1}&&) (__f=...) at /usr/include/c++/11.1.0/bits/invoke.h:61
#17 0x00007ffff3659ed7 in std::__invoke<juce::MessageThread::start()::{lambda()#1}>(juce::MessageThread::start()::{lambda()#1}&&) (__fn=...) at /usr/include/c++/11.1.0/bits/invoke.h:96
#18 0x00007ffff3659e84 in std::thread::_Invoker<std::tuple<juce::MessageThread::start()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x555555991df8) at /usr/include/c++/11.1.0/bits/std_thread.h:253
#19 0x00007ffff3659e58 in std::thread::_Invoker<std::tuple<juce::MessageThread::start()::{lambda()#1}> >::operator()() (this=0x555555991df8) at /usr/include/c++/11.1.0/bits/std_thread.h:260
#20 0x00007ffff3659e3c in std::thread::_State_impl<std::thread::_Invoker<std::tuple<juce::MessageThread::start()::{lambda()#1}> > >::_M_run() (this=0x555555991df0) at /usr/include/c++/11.1.0/bits/std_thread.h:211
#21 0x00007ffff79e23c4 in std::execute_native_thread_routine(void*) (__p=0x555555991df0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:82
#22 0x00007ffff7c2b259 in start_thread () at /usr/lib/libpthread.so.0
#23 0x00007ffff76e05e3 in clone () at /usr/lib/libc.so.6
>>>
2 Likes

I’ve not been successful so far in trying to reproduce this issue. I was experimenting with the Gain and DspModuleDemoPlugins on Ubuntu 18, 20 and 21 systems (some VM some bare metal). Tested inside Reaper and AudioPluginHost.

I have observed as the execution walks over the stack trace posted by robert, but alas I could not observe the error.

I wonder if you can think of anything that may be key to triggering this issue.

I wonder if the xorg version could be the cause? I don’t run arch - I’m also ubuntu 20 - and have been able to run Monique with 6.1.3 so there’s clearly some version change in X and so on which tickles some order of operation in juce in 6.1.3?

I’m sorry to have such an unhelpful comment :frowning:

It could be that the error depends on the window manager being used. When I switch to i3-wm , I’m getting the BadWindow error with DemoRunner from latest juce develop branch (non-fatal, though, but it seems to be fatal for plugins). Here is the stacktrace:

#0  0x00007ffff5da1190 in _XError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#1  0x00007ffff5d9dff7 in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#2  0x00007ffff5d9f203 in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#3  0x00007ffff5d847e8 in XGetWindowProperty () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#4  0x0000555555e5f0dd in juce::XWindowSystemUtilities::GetXProperty::GetXProperty (this=0x7fffffffde80, 
    display=0x5555565db470, window=0, atom=430, offset=0, length=9223372036854775807, shouldDelete=false, requestedType=430)
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:169
#5  0x0000555555e5f828 in juce::XWindowSystemUtilities::XSettings::update (this=0x5555565e8480)
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:212
#6  0x0000555555e5f24d in juce::XWindowSystemUtilities::XSettings::XSettings (this=0x5555565e8480, d=0x5555565db470)
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:191
#7  0x0000555555f1fb6b in std::make_unique<juce::XWindowSystemUtilities::XSettings, _XDisplay*&> ()
    at /usr/include/c++/9/bits/unique_ptr.h:857
#8  0x0000555555e69c34 in juce::XWindowSystem::initialiseXSettings (this=0x5555565cf730)
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:3033
#9  0x0000555555e6a332 in juce::XWindowSystem::initialiseXDisplay (this=0x5555565cf730)
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:3124
#10 0x0000555555e620b5 in juce::XWindowSystem::XWindowSystem (this=0x5555565cf730)
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:1442
#11 0x0000555555f21340 in juce::SingletonHolder<juce::XWindowSystem, juce::CriticalSection, false>::getWithoutChecking (
    this=0x55555658b500 <juce::XWindowSystem::singletonHolder>) at ../../../../modules/juce_core/memory/juce_Singleton.h:103
#12 0x0000555555eecb94 in juce::SingletonHolder<juce::XWindowSystem, juce::CriticalSection, false>::get (
    this=0x55555658b500 <juce::XWindowSystem::singletonHolder>) at ../../../../modules/juce_core/memory/juce_Singleton.h:92
#13 0x0000555555e89fc0 in juce::XWindowSystem::getInstance ()
    at ../../../../modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.h:250
#14 0x0000555555ee8166 in juce::Desktop::NativeDarkModeChangeDetectorImpl::NativeDarkModeChangeDetectorImpl (
    this=0x5555565bdd00) at ../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp:558
#15 0x0000555555f1e75f in std::make_unique<juce::Desktop::NativeDarkModeChangeDetectorImpl> ()
    at /usr/include/c++/9/bits/unique_ptr.h:857
#16 0x0000555555e5dbeb in juce::Desktop::createNativeDarkModeChangeDetectorImpl ()
    at ../../../../modules/juce_gui_basics/native/juce_linux_Windowing.cpp:594
#17 0x0000555555dc09f4 in juce::Desktop::Desktop (this=0x5555565d96b0)
    at ../../../../modules/juce_gui_basics/desktop/juce_Desktop.cpp:32
#18 0x0000555555dc0e1c in juce::Desktop::getInstance () at ../../../../modules/juce_gui_basics/desktop/juce_Desktop.cpp:53
#19 0x0000555555e55b2a in juce::KeyPressMappingSet::KeyPressMappingSet (this=0x5555565d95e0, cm=...)
    at ../../../../modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp:32
#20 0x0000555555e54221 in juce::ApplicationCommandManager::ApplicationCommandManager (this=0x5555565d9548)
    at ../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp:31
#21 0x000055555579fabc in DemoRunnerApplication::DemoRunnerApplication (this=0x5555565d9510) at ../../Source/Main.cpp:83
#22 0x000055555579e7e9 in juce_CreateApplication () at ../../Source/Main.cpp:176
#23 0x0000555555ca3590 in juce::JUCEApplicationBase::main ()
    at ../../../../modules/juce_events/messages/juce_ApplicationBase.cpp:253
#24 0x0000555555ca34e7 in juce::JUCEApplicationBase::main (argc=1, argv=0x7fffffffe5e8)
    at ../../../../modules/juce_events/messages/juce_ApplicationBase.cpp:240
#25 0x000055555579e844 in main (argc=1, argv=0x7fffffffe5e8) at ../../Source/Main.cpp:176

Same error as reported by baconpaul:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  54
  Current serial number in output stream:  54
1 Like

Thanks! Switching to i3 did it. When running a standalone application I can now reproduce the same error.

4 Likes

There is a change out now on develop that fixes the issue that I could reproduce with the standalone app. Hopefully this will help with the plugin issues as well.

3 Likes