# Linux VST3 Failure with 6.1.3 and 4 but not 2

**URL:** <https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448>\
**Category:** Linux\
**Created:** [December 31, 2021, 12:33am UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448 "2021-12-31T00:33:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![baconpaul](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/baconpaul/32/8403_2.png) [@baconpaul](https://forum.juce.com/u/baconpaul)\
**Post date:** [December 31, 2021, 12:33am UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/1 "2021-12-31T00:33:58Z")

</div>

Hi Folks

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

```auto
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

> <https://github.com/juce-framework/JUCE/issues/979>
>
> Ubuntu 20, JUCE v6.1.4 (2021-12-20)
> 
> \`\`\`
> cd JUCE-6.1.4/examples/DemoRunner/Bu…ilds/LinuxMakefile
> ./build/DemoRunner
> JUCE v6.1.4
> JUCE Assertion failure in juce\_linux\_XWindowSystem.cpp:190
> ERROR: X returned BadWindow (invalid Window parameter) for operation X\_GetProperty
> ERROR: X returned BadWindow (invalid Window parameter) for operation X\_ChangeWindowAttributes
> \`\`\`
> 
> I get this assertion with any program that opens a window. In debug mode, I have commented out the assertion, and things seems to work if I do that.

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

---

<div class="post-metadata">

**Author:** ![sudara](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sudara/32/8071_2.png) [@sudara](https://forum.juce.com/u/sudara)\
**Post date:** [January 1, 2022, 4:42pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/2 "2022-01-01T16:42:06Z")

</div>

I’ve been seeing the [same failure with pluginval 0.3.0 testing pamplejuce using xvfb on Ubuntu 20.04 via GitHub Actions](https://github.com/sudara/pamplejuce/runs/4679591865?check_suite_focus=true#step:9:26).

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

---

<div class="post-metadata">

**Author:** ![sudara](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sudara/32/8071_2.png) [@sudara](https://forum.juce.com/u/sudara)\
**Post date:** [January 1, 2022, 5:12pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/3 "2022-01-01T17:12:18Z")

</div>

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](https://github.com/sudara/pamplejuce/runs/4680178980?check_suite_focus=true).

---

<div class="post-metadata">

**Author:** ![robbert-vdh](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@robbert-vdh](https://forum.juce.com/u/robbert-vdh)\
**Post date:** [January 1, 2022, 5:20pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/4 "2022-01-01T17:20:38Z")

</div>

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**
>
> ```auto
> >>> 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
> >>>
> 
> ```

---

<div class="post-metadata">

**Author:** ![attila](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/attila/32/11206_2.png) [@attila](https://forum.juce.com/u/attila)\
**Post date:** [January 3, 2022, 6:22pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/5 "2022-01-03T18:22:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![baconpaul](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/baconpaul/32/8403_2.png) [@baconpaul](https://forum.juce.com/u/baconpaul)\
**Post date:** [January 3, 2022, 7:14pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/6 "2022-01-03T19:14:26Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![jpo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jpo/32/503_2.png) [@jpo](https://forum.juce.com/u/jpo)\
**Post date:** [January 4, 2022, 3:06pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/7 "2022-01-04T15:06:18Z")

</div>

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:

```auto
#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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![attila](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/attila/32/11206_2.png) [@attila](https://forum.juce.com/u/attila)\
**Post date:** [January 4, 2022, 3:54pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/9 "2022-01-04T15:54:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![attila](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/attila/32/11206_2.png) [@attila](https://forum.juce.com/u/attila)\
**Post date:** [January 6, 2022, 2:15pm UTC](https://forum.juce.com/t/linux-vst3-failure-with-6-1-3-and-4-but-not-2/49448/10 "2022-01-06T14:15:50Z")

</div>

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.

> <https://github.com/juce-framework/JUCE/commit/4f9a9c7bfc6dff0493c7e6cdc43b99cea1427777>
