DISTRHO / Cardinal

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

Opening carla session with Cardinal instance segfaults carla #21

Closed dromer closed 2 years ago

dromer commented 2 years ago

Tested with: lv2, vst2 and vst3

falkTX commented 2 years ago

mine seems fine, only got to 1 situation once where it was crashing so most of the time it works?

dromer commented 2 years ago

You make a cardinal patch. save the carla session. close carla. then open carla. open the carla session ->works ?

This is with latest carla git kx package on debian 11 with pipewire.

falkTX commented 2 years ago

Yes, that works fine here. Using the VST2 version mostly, as that is easier for the drag&drop.

dromer commented 2 years ago
dreamer@thinktop:~$ carla --gdb
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/python3...
(No debugging symbols found in /usr/bin/python3)
(gdb) run
Starting program: /usr/bin/python3 /usr/share/carla/carla --with-appname=/usr/bin/carla --with-libprefix=/usr --gdb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 46879]
[New Thread 0x7fffeef0f700 (LWP 46880)]
Carla 2.4.1 started, status:
  Python version: 3.9.2
  Qt version:     5.15.2
  PyQt version:   5.15.2
  Binary dir:     /usr/lib/carla
  Resources dir:  /usr/share/carla/resources
[New Thread 0x7fffe7fff700 (LWP 46881)]
[New Thread 0x7fffe6bfa700 (LWP 46882)]
[New Thread 0x7fffe4fcc700 (LWP 46883)]
[New Thread 0x7fffd7fff700 (LWP 46884)]
[New Thread 0x7fffcf7fe700 (LWP 46885)]
[New Thread 0x7fffd77fe700 (LWP 46886)]
Frontend pixel ratio is 1.0
[New Thread 0x7fffd6ffd700 (LWP 46888)]
[New Thread 0x7fffd67fc700 (LWP 46889)]
[New Thread 0x7fffd5ffb700 (LWP 46890)]
libjack.so.0 loaded successfully!
[New Thread 0x7fffd57fa700 (LWP 46891)]
[New Thread 0x7fffd4ff9700 (LWP 46892)]
[New Thread 0x7fffcffff700 (LWP 46893)]
[New Thread 0x7fffceffd700 (LWP 46894)]
[New Thread 0x7fffce7fc700 (LWP 46895)]
[New Thread 0x7fffcdffb700 (LWP 46897)]
[Thread 0x7fffcdffb700 (LWP 46897) exited]
[New Thread 0x7fffcdffb700 (LWP 46901)]
[New Thread 0x7fffcd1a3700 (LWP 46902)]

--Type <RET> for more, q to quit, c to continue without paging--
Thread 1 "carla" received signal SIGSEGV, Segmentation fault.
0x00007fffaf18eace in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
(gdb) bt
#0  0x00007fffaf18eace in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#1  0x00007fffaf25d487 in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#2  0x00007fffaf25e243 in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#3  0x00007fffaf13d4d2 in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#4  0x00007fffaf0d6cb6 in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#5  0x00007fffaf0d6e7f in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#6  0x00007fffaf0c827e in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#7  0x00007fffaf19a8fe in ?? () from /home/dreamer/.vst/Cardinal.vst/Cardinal.so
#8  0x00007fffed840826 in ?? () from /usr/lib/carla/libcarla_standalone2.so
#9  0x00007fffed7d9a7f in CarlaBackend::CarlaPlugin::loadStateSave(CarlaBackend::CarlaStateSave const&) ()
   from /usr/lib/carla/libcarla_standalone2.so
#10 0x00007fffed7762b3 in CarlaBackend::CarlaEngine::loadProjectInternal(water::XmlDocument&, bool) ()
   from /usr/lib/carla/libcarla_standalone2.so
#11 0x00007fffed7797da in CarlaBackend::CarlaEngine::loadProject(char const*, bool) ()
   from /usr/lib/carla/libcarla_standalone2.so
#12 0x00007ffff7664d1d in ?? () from /usr/lib/x86_64-linux-gnu/libffi.so.7
#13 0x00007ffff7664289 in ?? () from /usr/lib/x86_64-linux-gnu/libffi.so.7
#14 0x00007ffff7fa8360 in ?? () from /usr/lib/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so
#15 0x00007ffff7fa7e05 in ?? () from /usr/lib/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so
#16 0x000000000051d89b in _PyObject_MakeTpCall ()
#17 0x00000000005175ba in _PyEval_EvalFrameDefault ()
#18 0x0000000000528b63 in _PyFunction_Vectorcall ()
#19 0x000000000053bcfb in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--
#20 0x0000000000516e76 in _PyEval_EvalFrameDefault ()
#21 0x0000000000528b63 in _PyFunction_Vectorcall ()
#22 0x000000000053bcfb in ?? ()
#23 0x0000000000516e76 in _PyEval_EvalFrameDefault ()
#24 0x0000000000528b63 in _PyFunction_Vectorcall ()
#25 0x000000000053bdb1 in ?? ()
#26 0x00007ffff71fe1e0 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#27 0x00007ffff71fe688 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#28 0x00007ffff71fe82c in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#29 0x00007ffff7200f0d in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#30 0x00007ffff2e03a09 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtWidgets.abi3.so
#31 0x00007ffff6d7e2f0 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007ffff267db62 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff26803a1 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff27731b2 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007ffff27732d1 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007ffff28629ca in QToolButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007ffff26c3fae in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007ffff268415f in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007ffff268b04b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
--Type <RET> for more, q to quit, c to continue without paging--c
#40 0x00007ffff2f66b0e in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtWidgets.abi3.so
#41 0x00007ffff6d47fca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007ffff268a076 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007ffff26dc011 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007ffff26df33e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007ffff268415f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007ffff2f66b0e in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtWidgets.abi3.so
#47 0x00007ffff6d47fca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007ffff3992583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#49 0x00007ffff396864c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#50 0x00007fffefdbb7da in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#51 0x00007ffff6225e6b in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#52 0x00007ffff6226118 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#53 0x00007ffff62261cf in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007ffff6d9f51f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#55 0x00007ffff6d4698b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#56 0x00007ffff6d4ec00 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x00007ffff2f24c5d in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtWidgets.abi3.so
#58 0x000000000053f38a in ?? ()
#59 0x000000000051d89b in _PyObject_MakeTpCall ()
#60 0x00000000005175ba in _PyEval_EvalFrameDefault ()
#61 0x0000000000528b63 in _PyFunction_Vectorcall ()
#62 0x0000000000512192 in _PyEval_EvalFrameDefault ()
#63 0x00000000005106ed in ?? ()
#64 0x0000000000510497 in _PyEval_EvalCodeWithName ()
#65 0x00000000005f5be3 in PyEval_EvalCode ()
#66 0x0000000000619de7 in ?? ()
#67 0x0000000000615610 in ?? ()
#68 0x0000000000619d79 in ?? ()
#69 0x0000000000619816 in PyRun_SimpleFileExFlags ()
#70 0x000000000060d4e3 in Py_RunMain ()
#71 0x00000000005ea6e9 in Py_BytesMain ()
#72 0x00007ffff7c33d0a in __libc_start_main (main=0x5ea6b0, argc=5, argv=0x7fffffffdcf8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdce8) at ../csu/libc-start.c:308
#73 0x00000000005ea5ea in _start ()
falkTX commented 2 years ago

Time to build in debug mode :)

Or use the prebuilt binaries.

falkTX commented 2 years ago

Cant reproduce this at all, even with lv2 version

CarloCattano commented 2 years ago

I have the same behavior on debian here. No way to open a carla saved project with Cardinal in it, it directly crashes as explained. Running with jack

falkTX commented 2 years ago

Can you share a carla project file that causes this? Thanks.

CarloCattano commented 2 years ago

Nevermind , Apparently it was happening with older carla project files that I overwritten with the vcv added to it . If I start a Carla patch from scratch and add vcv Im able indeed to load as expected . Maybe the case accidentaly for @dromer ? This is the patch where I added vcv to that crashes it fx_rack.zip But as I said , it could be totally unrelated , and otherwise works as expected

uname -a Linux sound 5.10.63-v8+ #1459 SMP PREEMPT Wed Oct 6 16:42:49 BST 2021 aarch64 GNU/Linux

Using Carla version 2.4.1
  Python version: 3.7.3
  Qt version:     5.11.3
  PyQt version:   5.11.3
CarloCattano commented 2 years ago

bloated.zip

Just tried with 3 instances . All plugins are there and the parameters(carla GUI macros) are as I left them too . Did not try with a heavy processing patch yet

falkTX commented 2 years ago

Should be fixed in 9ff29396dfe8ecc3cce748a474fd9af76cbbbb1c Testing would be appreciated.

This likely breaks Windows builds, will fix that later.

falkTX commented 2 years ago

Been testing/using this quite a bit in both Carla and testing on FLStudio. No more crashes since that commit, so going to assume fixed unless someone says otherwise.