Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin crashes in Bitwig on linux #51

Open
spectromas opened this issue Mar 18, 2022 · 9 comments
Open

Plugin crashes in Bitwig on linux #51

spectromas opened this issue Mar 18, 2022 · 9 comments

Comments

@spectromas
Copy link

I downloaded the VST3 development build but it is crashing inside Bitwig 4.2 as soon as it is loaded. Bitwig's log says this:

About to start the following process:  /opt/bitwig-studio/bin/BitwigPluginHost-X64-SSE41 host Jean-Pierre-Cimalando-ysfx-17 48000 256 2015549-17 16 not-dpi-aware 8 jack jack 8814603
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Successfully set thread realtime priority to 50
Creating plugin audio thread proxy 0
PluginHost: Starting new audio thread for processing plugin 0
Successfully set thread realtime priority to 50
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
Could not read async reply: End of stream
Sending a shutdown request to the plugin host
Error sending request to plug-in host: Error writing to named pipe: Broken pipe
Waiting for plugin host process to exit
Child process with PID 2020446 exited with error code: 1
Plugin host process exited with code: 256
Waiting for plugin host process to exit
Plugin host process exited with code: 256

I'm using Arch linux.

@jpcima
Copy link
Owner

jpcima commented Mar 20, 2022

Hi @spectromas
This will be probably fixed by recent commit 76e8f6f. There was a juce fix against BadWindow errors in the upstream.
Unfortunately the automated build has decided it won't work this evening, I'll give another try later.
You can build it from the source code.

@jpcima
Copy link
Owner

jpcima commented Mar 20, 2022

It has a working build, please give that one a check
https://github.com/jpcima/ysfx/actions/runs/2013145512

@mikelupe
Copy link

Unfortunately with this build still the same on Debian 11.x , KDE Plasma, Ardour 6.9:

VST3 module-path '/home/user/.vst3/ysfx.vst3/Contents/x86_64-linux/ysfx.so'
[Info]: Scanning: /home/user/.vst3/ysfx.vst3
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.

@spectromas
Copy link
Author

Thanks @jpcima, that's working in Bitwig for me now.

@mikelupe
Copy link

"BadRequest" latest build 497d918 from yesterday, Ardour 6.9, Debian 11, KDE

LD_LIBRARY_PATH=/usr/local/lib/ardour6 /usr/local/lib/ardour6/ardour-vst3-scanner --verbose ~/.vst3/ysfx.vst3

[Info]: Scanning: /home/user/.vst3/ysfx.vst3
[Info]: FactoryInfo: 'Jean Pierre Cimalando' '' ''
[Info]: Class count: 2
[Info]: Class: 0 'ysfx' 'Audio Module Class'
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 130 (MIT-SHM)
Minor opcode of failed request: 2 (X_ShmDetach)
Serial number of failed request: 61
Current serial number in output stream: 61

I think x42 is in for some talk on irc.

@x42
Copy link

x42 commented May 11, 2022

I cannot reproduce this.

I've used the binary provided from https://github.com/jpcima/ysfx#download-development-builds (Linux 64bit). I cannot say which version, but git-head was b34649e. Ardour 6.9.0 from ardour.org:

LD_LIBRARY_PATH=/opt/Ardour-6.9.0/lib/ /opt/Ardour-6.9.0/lib/ardour-vst3-scanner --verbose ~/.vst3/ysfx.vst3

[Info]: Scanning: /home/rgareus/.vst3/ysfx.vst3
[Info]: FactoryInfo: 'Jean Pierre Cimalando' '' ''
[Info]: Class count: 2
[Info]: Class: 0 'ysfx' 'Audio Module Class'
[Info]: VST3: media: kAudio dir: kInput type: kMain n_busses: 1
[Info]: VST3: - bus: 0 count: 2
[Info]: VST3: media: kAudio dir: kInput type: kAux n_busses: 1
[Info]: VST3: \ ignored bus: 0 mismatched type: kMain
[Info]: VST3: media: kAudio dir: kOutput type: kMain n_busses: 1
[Info]: VST3: - bus: 0 count: 2
[Info]: VST3: media: kAudio dir: kOutput type: kAux n_busses: 1
[Info]: VST3: \ ignored bus: 0 mismatched type: kMain
[Info]: VST3: media: kEvent dir: kInput type: kMain n_busses: 1
[Info]: VST3: - bus: 0 count: 16
[Info]: VST3: media: kEvent dir: kOutput type: kMain n_busses: 1
[Info]: VST3: - bus: 0 count: 16
[Info]: Skipping non-effect class: Component Controller Class
[Info]: Found Plugin: ysfx
[Info]: Touch cachefile: set mtime = 1652293386 (2022-05-11 20:23:06), plugin mtime = 1649456998 (2022-04-09 00:29:58)
	<VST3Cache version="1" bundle="/home/rgareus/.vst3/ysfx.vst3" module="/home/rgareus/.vst3/ysfx.vst3/Contents/x86_64-linux/ysfx.so">
	  <VST3Info uid="ABCDEF019182FAEB4A70636979736678" name="ysfx" vendor="Jean Pierre Cimalando" category="Fx" version="0.0.0" sdk-version="VST 3.7.2" url="" email="" n_inputs="2" n_outputs="2" n_aux_inputs="0" n_aux_outputs="0" n_midi_inputs="1" n_midi_outputs="1">
	  </VST3Info>
	</VST3Cache>
[Info]: Saved VST3 plugin cache to /home/rgareus/.cache/ardour6/vst/0270f718b2f81b6454025039fa3674244f299e1d.v3i

@jpcima
Copy link
Owner

jpcima commented May 12, 2022

@mikelupe if you're building the software yourself
You can attempt a build based on juce, develop branch.
Change these fetchcontent lines near the top of cmake.plugin.txt and restart a clean build.

FetchContent_Declare(juce
    GIT_REPOSITORY "https://github.com/juce-framework/JUCE.git"
    GIT_TAG "310b4e6234b0c7390a4a6dea3240e109b75156ae")

@mikelupe
Copy link

mikelupe commented May 12, 2022

TLDR Conclusion - it works now
Sorry for this, please don't waste any more time on it, I guess it was a combination of a messed up system and some other things like not restarting Ardour after a scan (plugin cache?), or cli scanning through ssh without already having an X-session/user logged on on the target machine.

LONGER
I did build with the specified juice repo you mentioned. I then prepared an entire protocol of what went wrong (build went ok, scan did not, I then copied ysfx.vst3/ to the other similar machine, there it scanned correctly, etc.). But after several plugin scans inside ArdourGUI (PluginManager), the new build finally scanned well on both machines.

It didn't put me at ease, so I tried scanning again your binary git build that previously threw the X errors, and after several scans that your binary finally scanned well too...

The other thing troubling me a bit when building, was "pthreads - not found" in the first cmake, which resulted AFAIU in building happening only on 1|2 threads (out of 8|16). But this as well, just ignore it.

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
[..]
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
[..]
-- Checking for modules 'webkit2gtk-4.0;gtk+-x11-3.0'
-- No package 'webkit2gtk-4.0' found
-- Configuring juceaide
-- Building juceaide
[..]
-- Generating done
-- Build files have been written to: /home/user/Downloads/Audio_Plugins/ysfx/ysfx/build

I haven't tried using any plugins yet, as opening that box will knock me out for several hours or days. But at least I know I could, when finding the time :)

Thanks for your work

@tastycode
Copy link

I know you already solved your issue, but I added CLAP support for YSFX here https://github.com/tastycode/ysfx-clap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants