[Crash] Juce VST3/Linux can't pass pluginval

Trying to build my plugin for linux, the VST version pass pluginval but not the VST3, which crashes there:

...
-----------------------------------------------------------------
Starting tests in: pluginval / Enabling all buses...
Completed tests in pluginval / Enabling all buses
-----------------------------------------------------------------
Starting tests in: pluginval / Disabling non-main busses...
Completed tests in pluginval / Disabling non-main busses
-----------------------------------------------------------------
Starting tests in: pluginval / Restoring default layout...
Main bus num input channels: 0
Main bus num output channels: 2
[Thread 0x7ffff5664640 (LWP 16132) exited]
[Thread 0x7fffe7fff640 (LWP 16127) exited]

Thread 1 "pluginval" received signal SIGSEGV, Segmentation fault.
___pthread_mutex_lock (mutex=0x0) at ./nptl/pthread_mutex_lock.c:80
80	./nptl/pthread_mutex_lock.c: No such file or directory.

Printing the stack and I got:

(gdb) bt
#0  ___pthread_mutex_lock (mutex=0x0) at ./nptl/pthread_mutex_lock.c:80
#1  0x00007ffff4d67693 in XrmDestroyDatabase ()
   from /lib/x86_64-linux-gnu/libX11.so.6
#2  0x00007ffff4d53985 in _XFreeDisplayStructure ()
   from /lib/x86_64-linux-gnu/libX11.so.6
#3  0x00007ffff4d45881 in XCloseDisplay ()
   from /lib/x86_64-linux-gnu/libX11.so.6
#4  0x00007ffff5def3b0 in juce::XWindowSystem::destroyXDisplay() ()
   from /home/linuxuser/build/linux/MYPLUG_artefacts/VST3/MYPLUG.vst3/Contents/x86_64-linux/MYPLUG.so
#5  0x00007ffff5def1d5 in juce::XWindowSystem::~XWindowSystem() ()
   from /home/linuxuser/build/linux/MYPLUG_artefacts/VST3/MYPLUG.vst3/Contents/x86_64-linux/MYPLUG.so
#6  0x00007ffff5def449 in juce::XWindowSystem::~XWindowSystem() ()
   from /home/linuxuser/build/linux/MYPLUG_artefacts/VST3/MYPLUG.vst3/Contents/x86_64-linux/MYPLUG.so
#7  0x00007ffff60b7bbf in juce::DeletedAtShutdown::deleteAll() ()
   from /home/linuxuser/build/linux/MYPLUG_artefacts/VST3/MYPLUG.vst3/Contents/x86_64-linux/MYPLUG.so
#8  0x00007ffff60b9b49 in juce::shutdownJuce_GUI() ()
   from /home/linuxuser/build/linux/MYPLUG_artefacts/VST3/MYPLUG.vst3/Contents/x86_64-linux/MYPLUG.so
#9  0x00007ffff60b9bb9 in juce::ScopedJuceInitialiser_GUI::~ScopedJuceInitialise----Type <RET>--Type <RET>--Type <RE--Typ--Typ----Typ----Typ--Type --Type--Type <RET> for more, q to quit, c to continue without paging--

Seems to be a JUCE issue.
Anyone experienced the same ?
Also noticed no one seems to pass the VST3/linux test here : Verified by Pluginval | Tracktion
Cheers,

OS:Ubuntu
Compiler:Clang 14 (also tried with GCC)
Juce: 7.0.5 (develop branch)
pluginval from prebuilded binaries on its github which is using JUCE 7.0.2

Do you see the same problem in any of the JUCE demo plugins? At the moment I’m not seeing any crashes with the AudioPluginDemo from JUCE 7.0.5 in the latest Pluginval on Fedora 37/Gnome/X11.

Seems alright with Wayland too.

Please could you:

  • Test with the JUCE example plugins on your system. If they work correctly, the problem is probably not in JUCE.
  • If those are also broken, let me know the Ubuntu version, windowing system and window-manager/desktop-environment that you’re using so that I can try to reproduce and debug the problem.

Hey reuk, thanks for your answer, I’ll investigate more with JUCE examples and come back to you.
Cheers,

Pluginval itself runs every commit on Ubuntu 18.04 against 2 JUCE example plugins and Pamplejuce (my plugin template) runs commits on Ubuntu 22.04 against an empty JUCE plugin. Both are green on pluginval 1.0.2 (pamplejuce is on JUCE develop), but both use Xvfb as a dummy display. It does sound like something xlib-ish is going on here…

Also noticed no one seems to pass the VST3/linux test here

I think this is a symptom of it being rarer to offer plugins on linux (ie, most of those vendors don’t have linux offerings).

I started building my PluginGuiMagic examples on ubuntu as VST3 and LV2.
Both crash in pluginval:

message.txt (11.0 KB)

@sonosaurus was kind enough to run on his linux system, I hope he chimes in.
Basically they all run in Reaper and AudioPluginHost, but crash pluginval in some window creation methods.

The same seem to happen with the AudioPluginDemo

@sonosaurus tested outside CI, so I don’t think it is due to missing xvfb.

1 Like

It would be good to know what OS version and desktop environment are used when testing.

I tested with the following setup:

  • Pluginval built from its develop branch, using JUCE’s develop branch
  • AudioPluginDemo.vst3 built from JUCE’s develop branch
  • Test strictness level 10, multiple repetitions
  • Fedora 38 x86_64 with Gnome 44.3, using both X11 and Wayland

I don’t see any crashes in this case.

Looking at the crash log, my best guess is that display or windowHandleXContext are ‘dangling’, but without being able to repro the issue I can’t be confident in this diagnosis or in a potential fix.

Thank you @reuk for getting back to me.

Meanwhile I managed to revive my linux disk (OT: make sure your BIOS is set to legacy boot and not UEFI :man_facepalming: ).

It turns out there are problems in my code related to different threading on linux I will have to investigate and find a fix.

Strangely the user had reported problems with the AudioPluginDemo as well, but maybe there was something else not quite right…