DISTRHO / Cardinal

Virtual modular synthesizer plugin
https://cardinal.kx.studio/
GNU General Public License v3.0
2.22k stars 153 forks source link

CLAP: Segmentation fault (core dumped) whilst attempting to load the plugin #580

Closed John-Toohey closed 1 year ago

John-Toohey commented 1 year ago

I am creating an application using CLAP plugins. When attempting to load the /usr/lib/clap/Cardinal.clap/Cardinal.clap (or other the other two Cardinal) the program sometimes segfaults, with the following logs: (Note it sometimes also hangs at the same point before being killed by the system)

[0.022 info CardinalCommon.cpp:573 Initializer] Initializing plugin browser DB
[0.025 info CardinalCommon.cpp:596 Initializer] OSC Remote control is not enabled in this build
[0.027 info Rack/src/patch.cpp:273 load] Loading patch /home/johnh/Documents/Cardinal/templates/main.vcv
[0.027 info Rack/src/patch.cpp:273 load] Loading patch /home/johnh/Documents/Cardinal/templates/main.vcv
[0.027 info Rack/src/patch.cpp:273 load] Loading patch /usr/share/cardinal/patches/templates/main.vcv
[0.027 info Rack/src/patch.cpp:273 load] Loading patch /usr/share/cardinal/patches/templates/main.vcv
[0.027 info Rack/src/patch.cpp:339 loadAutosave] Loading autosave /tmp/Cardinal.0089/patch.json
[0.027 info Rack/src/patch.cpp:339 loadAutosave] Loading autosave /tmp/Cardinal.0090/patch.json
[0.028 info Rack/src/patch.cpp:486 fromJson] Patch was made with Rack 2.1, current Rack version is 2.3.0
[0.028 info Rack/src/patch.cpp:486 fromJson] Patch was made with Rack 2.1, current Rack version is 2.3.0
zsh: segmentation fault (core dumped)  RUST_LOG=trace cargo r

Unfortunately I wasn't able to get anywhere by using Valgrind as the segfault (which happened fairly consistently without Valgrind) refused to occur with it. I should note that several different errors could occur - IOT &c - with that log not being the only one I got.

dromer commented 1 year ago

What are your plugin and OS versions?

Please provide more information so we know on which code base you are running.

Also we've just tagged the 23.09 release, so please try updating to the latest build (will be ready tomorrow) as soon as you can.

John-Toohey commented 1 year ago

I am using Archlinux, and was using Cardinal 23.07. I have, however, been successful in recreating the issue with Cardinal 23.09 from the tagged releases. My clap version is 1.1.8. I do not get the segmentation fault when running CardinalNative If you need any more information I am willing to give it to you :).

falkTX commented 1 year ago

Best to build cardinal in debug mode and try to get a trace from it. See https://github.com/DISTRHO/Cardinal/blob/main/docs/BUILDING.md

Also https://github.com/DISTRHO/Cardinal/blob/main/docs/DEBUGGING.md might be handy, running the clap version instead of the vst2 one. But this seems like it is a bug/crash induced from the host side.

John-Toohey commented 1 year ago

I have determined that this segfault does not occur with other hosts, so I am going to conclude it is an error with the host, as you said. However, running under Valgrind fails to produce any errors still... . Oh well, thanks for your help!