drobilla / jalv

A simple fully-featured host for LV2 plugins
http://drobilla.net/software/jalv
ISC License
54 stars 19 forks source link

Segfault when running qt5 plugin in jalv.gtk #4

Closed simonvanderveldt closed 5 years ago

simonvanderveldt commented 7 years ago

Using jalv.gtk from jalv 1.6.0 with the just released suil 0.10.0 I'm trying to run a plugin with a Qt5 UI (synthv1 in this case). Unfortunately this results in a segfault.

It doesn't always happen at the same time, sometimes it segfaults before anything is shown, sometimes it segfaults and the window is show but it doesn't show anywidgets and sometimes it shows the UI correct and it segfaults when closing the window.

Backtrace from `gdb --args jalv.gtk http://synthv1.sourceforge.net/lv2, this one showed the UI correctly but segfaulted when closing the window.

Thread 1 "jalv.gtk" received signal SIGSEGV, Segmentation fault.
0x00007ffff5f71958 in ?? () from /lib64/libc.so.6
(gdb) thread apply all bt

Thread 9 (Thread 0x7fffd107d700 (LWP 11692)):
#0  0x00007ffff5fdaa3d in poll () from /lib64/libc.so.6
#1  0x00007ffff62def6c in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ffff62df07c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fffed9751ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQt5Core.so.5
#4  0x00007fffed926efa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQt5Core.so.5
#5  0x00007fffed78de64 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007fffec0196a5 in ?? () from /usr/lib64/libQt5DBus.so.5
#7  0x00007fffed7920ac in ?? () from /usr/lib64/libQt5Core.so.5
#8  0x00007ffff7bc4394 in start_thread () from /lib64/libpthread.so.0
#9  0x00007ffff5fe3abd in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fffd1b2f700 (LWP 11690)):
#0  0x00007ffff5fdaa3d in poll () from /lib64/libc.so.6
#1  0x00007ffff1b468f2 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007ffff1b486df in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007fffe0040b69 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007fffed7920ac in ?? () from /usr/lib64/libQt5Core.so.5
#5  0x00007ffff7bc4394 in start_thread () from /lib64/libpthread.so.0
#6  0x00007ffff5fe3abd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fffec211700 (LWP 11686)):
#0  0x00007ffff7bccfdd in read () from /lib64/libpthread.so.0
#1  0x00007ffff6e675d6 in read (__nbytes=4, __buf=<optimized out>, __fd=<optimized out>)
    at /usr/include/bits/unistd.h:44
#2  Jack::JackClientSocket::Read (this=0x7fffd40008c0, data=<optimized out>, len=4)
    at ../posix/JackSocket.cpp:187
#3  0x00007ffff6e6ad14 in Jack::JackClientNotification::Read (trans=0x7fffd40008c0, this=0x7fffec210bf0)
    at /var/tmp/portage/media-sound/jack2-1.9.11_rc1/work/jack2-1.9.11-RC1-abi_x86_64.amd64/common/JackRequest.h:1664
#4  Jack::JackSocketClientChannel::Execute (this=0xbf8800) at ../posix/JackSocketClientChannel.cpp:138
#5  0x00007ffff6e660d1 in Jack::JackPosixThread::ThreadHandler (arg=0xbf8928)
    at ../posix/JackPosixThread.cpp:59
#6  0x00007ffff7bc4394 in start_thread () from /lib64/libpthread.so.0
#7  0x00007ffff5fe3abd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fffeca12700 (LWP 11683)):
#0  0x00007ffff7bc9f4f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fffed79271a in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib64/libQt5Core.so.5
#2  0x00007fffedbc65d3 in synthv1_sched_thread::run() () from /usr/lib64/libsynthv1.so.0
#3  0x00007fffed7920ac in ?? () from /usr/lib64/libQt5Core.so.5
#4  0x00007ffff7bc4394 in start_thread () from /lib64/libpthread.so.0
#5  0x00007ffff5fe3abd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fffee0db700 (LWP 11680)):
#0  0x00007ffff7bc9f4f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ffff6e66ce9 in Jack::JackPosixProcessSync::Wait (this=this@entry=0x97f358)
    at ../posix/JackPosixProcessSync.cpp:81
#2  0x00007ffff6e5dd68 in Jack::JackMessageBuffer::Execute (this=0x977120)
    at ../common/JackMessageBuffer.cpp:104
#3  0x00007ffff6e660d1 in Jack::JackPosixThread::ThreadHandler (arg=0x97f338)
    at ../posix/JackPosixThread.cpp:59
#4  0x00007ffff7bc4394 in start_thread () from /lib64/libpthread.so.0
#5  0x00007ffff5fe3abd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7ffff7f9e8c0 (LWP 11584)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007ffff5f71958 in ?? () from /lib64/libc.so.6
#1  0x00007ffff5f72568 in ?? () from /lib64/libc.so.6
#2  0x00007fffedbbc65c in synthv1_impl::~synthv1_impl() () from /usr/lib64/libsynthv1.so.0
#3  0x00007fffedbbc880 in synthv1::~synthv1() () from /usr/lib64/libsynthv1.so.0
#4  0x00007fffeddd6ba9 in synthv1_lv2::~synthv1_lv2() () from /usr/lib/lv2/synthv1.lv2/synthv1.so
#5  0x00007ffff76af2b3 in lilv_instance_free () from /usr/lib64/liblilv-0.so.0
#6  0x0000000000408184 in ?? ()
#7  0x00007ffff5f1c640 in __libc_start_main () from /lib64/libc.so.6
#8  0x00000000004085c9 in ?? ()

Some libs are missing debug symbols, if more info is needed please let me know so I can recompile/reinstall them with debug symbols.

P.S. The 1.6.0 git tag is incorrect, it's tagged as 0.6.0

simonvanderveldt commented 7 years ago

Just noticed there might be some relevant commits regarding this on master that aren't part of 1.6.0. Using current master I'm no longer able to reproduce this issue, so I guess it's already fixed?

drobilla commented 5 years ago

I've run the latest v1 plugins a bunch of times lately and never seen this, so yeah, I'm assuming it's been fixed in jalv or suil in the meantime, and/or it was a plugin bug.