Ardour 8.12.0 / Mixbus 10.2.3 Crashing with Gdk-ERROR BadWindow (invalid Window parameter))

I recently returned to some old Ardour & Mixbus projects and am beset by frequent crashes. Ardour will often crash the first time I close a VST3 plugin GUI. Mixbus seems a bit more stable, but still crashes with the same error, again it’s always when closing a VST3 plugin GUI window. It seems to happen with many different VST3 plugins. Trying LV2 versions of the same plugins hasn’t caused a crash yet, so I tentatively think it might just be VST3s.

At the moment I’m just interested in tracking down where the problem lies. I’m not convinced that it’s an Ardour problem.

I get the same crashes in Ardour 8.12.0 (from the Fedora 42 repos) and also Mixbus 10.2.3 (official Linux binary which I bought a while back). This is on X11.

The crashes are always the same. It happens when closing the plugin GUI.

The error is:

Gdk-ERROR **: The program ‘ardour-8.12.0’ received an X Window System error.
This probably reflects a bug in the program.
The error was ‘BadWindow (invalid Window parameter)’.
(Details: serial 391 error_code 3 request_code 15 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

After trying some more I find that it always seems to be a plugin built with JUCE. e.g. Surge XT, Airwindows Consolidated, Odin2 all caused crashes when closing the VST3 GUI. Other VST3s which I think aren’t JUCE based, e.g. u-he VST3s don’t seem to cause a crash.

So I wonder if this is a JUCE problem.

If anyone else is getting these crashes when closing a VST3 GUI, I would be interested if you can tell me if it’s a JUCE based plugin…

I realize this is all anecdotal & would like to pin it down.

Those errors are typically caused by code that tries to draw in a window from a thread that is not the GUI thread (not allowed under X Window).

I see. Thank you that is very helpful … I’ve looked for this error reported in the forums before & the only one where a specific plugin mentioned is this one… jdrummer

A JUCE plugin …

So I think there might be a JUCE issue that goes undetected except in Ardour for some reason. It’s just a guess at the moment though.