zynaddsubfx / zyn-fusion-issues

Issue Only Repo
31 stars 0 forks source link

backtrace for zyn-fusion 3.0.3 crash in MusE 3.0.2 #184

Open windowsrefund opened 6 years ago

windowsrefund commented 6 years ago

Following up on the thread found at https://linuxmusicians.com/viewtopic.php?f=61&t=18868

#0  0x0000000000000000 in  ()
#1  0x00007ffff5415dd6 in MusECore::LV2PluginWrapper_Window::updateGui() () at /usr/local/lib/muse-3.0/modules/libmuse_lv2host_module.so
#2  0x00007ffff591c5b5 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff5929027 in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff5929388 in QTimer::timerEvent(QTimerEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff591d0db in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff666b82c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff66730f4 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x000055555555ebe8 in MuseApplication::notify(QObject*, QEvent*) ()
#9  0x00007ffff58ed9a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff5945d8e in QTimerInfoList::activateTimers() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff5946551 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fffeefc4287 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fffeefc44c0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007fffeefc454c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff59468ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff58eb9ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff58f4a84 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x000055555555aead in main ()
fundamental commented 6 years ago

Interesting a NULL function pointer. It looks like that's a Muse bug, though to be sure, can you paste the output of "thread apply all backtrace" from within gdb?

windowsrefund commented 6 years ago

Yes, I'll be able to do this tomorrow night. Thanks for the follow-up.

terminator356 commented 6 years ago

Greetings! Been d-bugging this a few hours now... The crash happens simply when we call: LV2_Programs_UI_Interface::select_program() in response to a host or external midi hardware midi program change. From there it crashes somewhere inside Zyn. All passed parameters are checked OK. The handle, bank and patch numbers are OK. Everything is OK with other synths including the older Zyn.

Here's where I'm puzzled: Both Ardour and QTractor work fine with zyn-fusion. But upon further examination it appears that both are not actually calling select_program(), they appear to be translating the requested midi program change into LV2 presets and executing an LV2 preset load instead. I cannot check anything further because QTracor won't compile, and I never build Ardour. Just a theory: Is it possible that both Ardour and QTractor see that there are no midi patches defined so they 'fallback' to translating into LV2 presets instead? I mention this because both QTracor and MusE list only one available midi patch: "Default". Yet when I actually select numeric patches in QTractor, it seems to select sounds that are from the presets list. For example selecting patch #6 shouldn't do anything but really ends up selecting patch #6 "Tinkerbell" in Zyn. Meanwhile in MusE selecting patch #6 does nothing at all, no change in sound. In MusE the only midi patch that changes the sound is #1 "Default". How can this discrepancy between the host behavior be happening?

Confused... Tim. MusE project.

fundamental commented 6 years ago

On 08-14, Tim wrote:

Greetings! Been d-bugging this a few hours now... The crash happens simply when we call: LV2_Programs_UI_Interface::select_program() in response to a host or external midi hardware midi program change. From there it crashes somewhere inside Zyn. All passed parameters are checked OK. The handle, bank and patch numbers are OK. Everything is OK with other synths including the older Zyn.

That's quite strange. The select program call should more or less be a no-op in Zyn's LV2 version. Since the prior backtrace showed a crash within Muse and not zyn, could you perhaps obtain a backtrace to show at least roughly where in zyn it is crashing?

windowsrefund commented 6 years ago

Thank you both for your help. I'll be infront of my DAW tonight and will happily create another backtrack. What exactly is being requested? The last requst was the result of a "thread apply all backtrace" from within gdb. Is this still needed or something else?

fundamental commented 6 years ago

Right now the only request that I have is the all threads backtrace. Based upon what @terminator356 is saying it looks like there might be two different bugs here.

windowsrefund commented 6 years ago

Thank you. I'll add that info in about 6 hours.

terminator356 commented 6 years ago

OK after the crash here's the output of "thread apply all backtrace" gdb command. I'm a hardcore KDevelop'er, so I even stepped right up to the assembly instruction which calls 'select_program' - "callq *%rax", and rax is correct. After that, into the mysterious void it goes. No further info except that weird NULL.

The only thing I can see that might be wrong is that thread 15, which is our code, is a semaphore acquire. I know that in the past we had an issue with something similar which was interfering with a plugin. I'll see if I can do anything to test...

Meanwhile I should ask, is there source code to new Zyn yet? Or maybe a debug build? It would help. I'm using the linux demo. Thanks. Tim.

`Thread 15 (Thread 0x7f8023fff700 (LWP 3312)):
#0 0x00007f8068628739 in syscall () at /lib64/libc.so.6
#1 0x00007f806e6ab124 in QSemaphore::acquire(int) () at /usr/lib64/libQt5Core.so.5
#2 0x000000000095ea59 in MusECore::LV2PluginWrapper_Worker::run() (this=0x9aa83d0) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/lv2host.cpp:5168
#3 0x00007f806e6b58ec in () at /usr/lib64/libQt5Core.so.5
#4 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#5 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 14 (Thread 0x7f8028961700 (LWP 3311)):
#0 0x00007f80685fa980 in nanosleep () at /lib64/libc.so.6
#1 0x00007f8068625eb4 in usleep () at /lib64/libc.so.6
#2 0x00007f8034d499ce in DISTRHO::Thread::_entryPoint(void*) () at /usr/local/lib64/lv2/ZynAddSubFX.lv2/ZynAddSubFX.so
#3 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 13 (Thread 0x7f8035c3d700 (LWP 3107)):
#0 0x00007f80686232c9 in poll () at /lib64/libc.so.6
#1 0x00000000008e3fe1 in MusECore::Thread::loop() (this=0x2da2780) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/thread.cpp:296
#2 0x00000000008e367a in MusECore::loop(void*) (mops=0x2da2780) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/thread.cpp:52
#3 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 12 (Thread 0x7f803643e700 (LWP 3106)):
#0 0x00007f80686232c9 in poll () at /lib64/libc.so.6
#1 0x00000000008e3fe1 in MusECore::Thread::loop() (this=0x2600090) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/thread.cpp:296
#2 0x00000000008e367a in MusECore::loop(void*) (mops=0x2600090) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/thread.cpp:52
#3 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 11 (Thread 0x7f80364bf700 (LWP 3105)):
#0 0x00007f8068628739 in syscall () at /lib64/libc.so.6
#1 0x00007f806d9d1fdf in () at /usr/lib64/libjack.so.0
#2 0x00007f806d9b9c55 in () at /usr/lib64/libjack.so.0
#3 0x00007f806d9b8d27 in () at /usr/lib64/libjack.so.0
#4 0x00007f806d9b8578 in () at /usr/lib64/libjack.so.0
#5 0x00007f806d9d0236 in () at /usr/lib64/libjack.so.0
#6 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#7 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7f8036d45700 (LWP 3101)):
#0 0x00007f80686232c9 in poll () at /lib64/libc.so.6
#1 0x00007f806d4a2d44 in lo_server_wait () at /usr/lib64/liblo.so.7
#2 0x00007f806d4a4709 in lo_server_recv_noblock () at /usr/lib64/liblo.so.7
#3 0x00007f806d4a57dd in () at /usr/lib64/liblo.so.7
#4 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#5 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f803d091700 (LWP 2440)):
#0 0x00007f806d28aa24 in read () at /lib64/libpthread.so.0
#1 0x00007f806d9d149d in () at /usr/lib64/libjack.so.0
#2 0x00007f806d9d48d1 in () at /usr/lib64/libjack.so.0
#3 0x00007f806d9d0236 in () at /usr/lib64/libjack.so.0
#4 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#5 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f803d112700 (LWP 2439)):
#0 0x00007f806d2874dc in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1 0x00007f806d9d0c4c in () at /usr/lib64/libjack.so.0
#2 0x00007f806d9c8ad5 in () at /usr/lib64/libjack.so.0
#3 0x00007f806d9d0236 in () at /usr/lib64/libjack.so.0
#4 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#5 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f803d989700 (LWP 2438)):
#0 0x00007f806d2874dc in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1 0x00007f804247967b in () at /usr/lib64/dri/nouveau_dri.so
#2 0x00007f80424793a7 in () at /usr/lib64/dri/nouveau_dri.so
#3 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f804ede8700 (LWP 2099)):
#0 0x00007f80686232c9 in poll () at /lib64/libc.so.6
#1 0x00007f806cd212c6 in () at /usr/lib64/libglib-2.0.so.0
#2 0x00007f806cd213ec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3 0x00007f806e89db23 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4 0x00007f806e84db3b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5 0x00007f806e6ac326 in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6 0x00007f805e03df45 in () at /usr/lib64/libQt5DBus.so.5
#7 0x00007f806e6b58ec in () at /usr/lib64/libQt5Core.so.5
#8 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#9 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f805bf5a700 (LWP 2098)):
#0 0x00007f80686232c9 in poll () at /lib64/libc.so.6
#1 0x00007f8064162377 in () at /usr/lib64/libxcb.so.1
#2 0x00007f8064163f8a in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3 0x00007f805e2ff089 in () at /usr/lib64/libQt5XcbQpa.so.5
#4 0x00007f806e6b58ec in () at /usr/lib64/libQt5Core.so.5
#5 0x00007f806d281554 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f806862dccf in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f807158cac0 (LWP 2093)):
#0 0x0000000000000000 in ()
#1 0x000000000095cebb in MusECore::LV2PluginWrapper_Window::updateGui() (this=0x7f80540130f0) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/lv2host.cpp:4728
#2 0x00000000009739b7 in MusECore::LV2PluginWrapper_Window::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x7f80540130f0, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7ffed2017150) at /home/me/Source/muse-20180113-master-package-fix/muse3/build/muse/moc_lv2host.cpp:92
#3 0x00007f806e876b83 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#4 0x00007f806e882107 in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib64/libQt5Core.so.5
#5 0x00007f806e8773ab in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#6 0x00007f806f5cdc11 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#7 0x00007f806f5d4df0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#8 0x0000000000791abb in MuseApplication::notify(QObject*, QEvent*) (this=0x7ffed2017860, receiver=0x7f8054013130, event=0x7ffed2017480) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/main.cpp:162
#9 0x00007f806e84ed29 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#10 0x00007f806e89d058 in QTimerInfoList::activateTimers() () at /usr/lib64/libQt5Core.so.5
#11 0x00007f806e89d7f4 in () at /usr/lib64/libQt5Core.so.5
#12 0x00007f806cd210be in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#13 0x00007f806cd21358 in () at /usr/lib64/libglib-2.0.so.0
#14 0x00007f806cd213ec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#15 0x00007f806e89db23 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#16 0x00007f805e38d641 in () at /usr/lib64/libQt5XcbQpa.so.5
#17 0x00007f806e84db3b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#18 0x00007f806e8558be in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#19 0x000000000078fe24 in main(int, char**) (argc=2, argv=0x7ffed2017f48) at /home/me/Source/muse-20180113-master-package-fix/muse3/muse/main.cpp:998
94^done
fundamental commented 6 years ago

is there source code to new Zyn yet?

See https://github.com/zynaddsubfx/zyn-fusion-build