JUCE plugins crash Ardour With X11 Forwarding

Bit of an edge case but something I ran across.

When running Ardour with X11 Forwarding (IndirectGLX on) plugins using the JUCE framework crash Ardour when loaded into a session.

The program 'ardour-6.6.157' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 58 error_code 1 request_code 130 minor_code 2)
  (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.)
Cannot write socket fd = 29 err = Broken pipe

Tested with Sonobus VST3 and Squeezer LV2 & VST2 using Ardour-6.5.0 (official) and a nightly build.

Both of these plugins load correctly when Carla is used as the plugin host.

I don’t know if it’s worth looking into but thought i would bring it up on the off chance someone knows of a workaround.

1 Like

Is that with ssh -Y ... ?

Maybe related to 0008615: segfault loading Roughrider3 vst: error 6 in libxcb.so.1.1.0 - Ardour Bug Tracker

Carla process-separates the GUI which adds some overhead.

In any case at least Sonobus VST3 works in Ardour when not using X11 forwarding,
hard to say if this is something that the plugins or Ardour can fix in order to run properly with shared X11/XCB resources in the same process.

Tried it with -Y and -X, same results.

Compiled sonobus using the juce bounds fix linked above but no joy. It was worth a shot. Thanks for the recommendation.

Fortunately it’s only an issue with juce plugins.

Using ardour-6.6.87 self compiled debug build, and I’ve verified the crash doesn’t happen with Stienberg Host checker, but it does happen with JUCE’s simple gain (which is included as example I self-compiled from their sdk).

Here is the output of running /ardbg when the crash happens: ardour dbg crash JUCE gain with x11 forwarding · GitHub

here is the error message:

PluginWindow deleted for 0x5555628cf340
The program 'ardour-6.6.87' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 56 error_code 1 request_code 130 minor_code 2)
  (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.)

I tried typing “thread apply all bt”, but nothing happens…seem the ardour process has already terminated in gdb. Let me know if there is a way I can help debug. Also is this something that maybe needs to be reported to JUCE???

1 Like

Good idea to compare with the official SDK.
That is a strong indication that it is indeed a JUCE issue.

I expect other VST3s that do not use JUCE are also fine. e.g. Surge Synthesizer Team · GitHub

I think you mean other VST3s that do not use JUCE are also fine. And yes, I’ve just tried Surge VST3 over ssh and it is working (though it is a little sluggish…takes like 7 seconds to open window and a few seconds for its window to visually respond to mouseclicks).

So it seems this is something to report to JUCE. Who should report to JUCE?

Indeed. I’ve corrected it.

Great. Thanks for testing. A but odd that it is lagging, but probably also not too surprising.

Since you can reproduce and test it, i think you should also report it to JUCE.
Would you mind doing that?

Installed the surge vst3 just to double check. No lag on this end, pops right up. This is on a 10 gigabit link.

The only other vst3 I have to try is the ACM510 compressor and its never had an issue with Ardour.

Thanks again for looking into this.

Edit: Harrison AVA plugins crash with X11 forwarding as well.

oh, well then my experience with the surge vst3 sluggishness might have just been cause my client is on wifi, but regardless my experience with surge vst3 being sluggish is a separate topic I’ll have to investigate separately.

well I’ve reported to JUCE…will see if they respond: Juce plugins crash Ardour when run in X11 Forwarding ssh - Linux - JUCE