DISTRHO / DISTRHO-Ports

Linux audio plugins and LV2 ports
http://distrho.sourceforge.net/ports
263 stars 46 forks source link

Ardour crash on existing preset save in TAL-Noisemaker #15

Open Fak3 opened 8 years ago

Fak3 commented 8 years ago

To reproduce: 1) add TAL-Noisemaker to track, open its ui 2) in the Ardour preset selector select any "built-in" preset (of those from presets.ttl) 3) click "save" (the button to save preset, right of the preset selector) Ardour crashes with error "glibmm-ERROR ...unhandled exception... what: basic_string::_S_construct null not valid " After the crash "presets.ttl" file is gone, and there are no presets available in the ui anymore.

Expected behavior: preset with the same name should get saved into "~/.lv2/NoizeMak3r.lv2/" directory.

Bug only occurs if selected preset exist only in the "built-in" set of presets, meaning that it was not ever saved in dir "~/.lv2/NoizeMak3r.lv2/". Currently it does not get saved there, because of this bug.

Console log after i click "save":

lilv_world_add_plugin(): error: Duplicate plugin <http://kunz.corrupt.ch/products/tal-noisemaker>
lilv_world_add_plugin(): error: ... found in file:///home/u1/.lv2/TAL-NoiseMaker.lv2/
lilv_world_add_plugin(): error: ... and      file:///home/u1/.lv2/TAL-NoiseMaker.lv2/

Butler drops pool trash
lilv_port_get_name(): warning: Plugin <http://kunz.corrupt.ch/products/tal-noisemaker> port has no (mandatory) doap:name

(ardour-4.4.0:7794): glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: basic_string::_S_construct null not valid

Trace/breakpoint trap

Backtrace:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007f6c4e2627f3 in g_logv () from /usr/lib64/libglib-2.0.so.0
(gdb) thread apply all bt

Thread 22 (Thread 0x7f6c3e55d700 (LWP 1377)):
#0  0x00007f6c4b42614d in nanosleep () at /lib64/libpthread.so.0
#1  0x00007f6c4e282108 in g_usleep () at /usr/lib64/libglib-2.0.so.0
#2  0x0000000000a59e6d in  ()
#3  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 21 (Thread 0x7f6c3dd5c700 (LWP 1378)):
#0  0x00007f6c49e6c789 in syscall () at /lib64/libc.so.6
#1  0x00007f6c4e29da1c in g_cond_wait () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4fa0eee3 in  () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 20 (Thread 0x7f6c37fff700 (LWP 1379)):
#0  0x00007f6c49e6c789 in syscall () at /lib64/libc.so.6
#1  0x00007f6c4e29da1c in g_cond_wait () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4fa0eee3 in  () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 19 (Thread 0x7f6c3d55b700 (LWP 1380)):
#0  0x00007f6c49e6c789 in syscall () at /lib64/libc.so.6
#1  0x00007f6c4e29da1c in g_cond_wait () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4f74429b in ARDOUR::Analyser::work() () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 18 (Thread 0x7f6c377fe700 (LWP 1381)):
#0  0x00007f6c49e6c789 in syscall () at /lib64/libc.so.6
#1  0x00007f6c4e29da1c in g_cond_wait () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4f7733fc in ARDOUR::AudioEngine::do_reset_backend() () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 17 (Thread 0x7f6c36ffd700 (LWP 1382)):
#0  0x00007f6c49e6c789 in syscall () at /lib64/libc.so.6
#1  0x00007f6c4e29da1c in g_cond_wait () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4f772403 in ARDOUR::AudioEngine::do_devicelist_update() () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 16 (Thread 0x7f6c1ffff700 (LWP 1387)):
#0  0x00007f6c49e683cd in poll () at /lib64/libc.so.6
#1  0x00007f6c4e25bbe4 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4e25bf0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f6c46e1e586 in  () at /usr/lib64/libgio-2.0.so.0
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 15 (Thread 0x7f6c1f7fe700 (LWP 1388)):
#0  0x00007f6c49e683cd in poll () at /lib64/libc.so.6
#1  0x00007f6c4e25bbe4 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4e25bcec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f6c4e25bd29 in  () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 14 (Thread 0x7f6c0ce49700 (LWP 1398)):
#0  0x00007f6c49e683cd in poll () at /lib64/libc.so.6
#1  0x00007f6c142eaa41 in  () at /usr/lib64/libpulse.so.0
#2  0x00007f6c142dc2ec in pa_mainloop_poll () at /usr/lib64/libpulse.so.0
#3  0x00007f6c142dc95e in pa_mainloop_iterate () at /usr/lib64/libpulse.so.0
#4  0x00007f6c142dca10 in pa_mainloop_run () at /usr/lib64/libpulse.so.0
#5  0x00007f6c142ea9f3 in  () at /usr/lib64/libpulse.so.0
#6  0x00007f6c0d5d6808 in  () at /usr/lib64/pulseaudio/libpulsecommon-5.0.so
#7  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#8  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 13 (Thread 0x7f6c34ca3700 (LWP 1406)):
#0  0x00007f6c4b42305f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#1  0x00007f6c360c72dc in  () at /usr/lib64/libjack.so.0
#2  0x00007f6c360beaf8 in  () at /usr/lib64/libjack.so.0
#3  0x00007f6c360c63d0 in  () at /usr/lib64/libjack.so.0
#4  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#5  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 12 (Thread 0x7f6c3412a700 (LWP 1407)):
#0  0x00007f6c4b425a9d in read () at /lib64/libpthread.so.0
#1  0x00007f6c360c7ad4 in  () at /usr/lib64/libjack.so.0
#2  0x00007f6c360ca3ac in  () at /usr/lib64/libjack.so.0
#3  0x00007f6c360c63d0 in  () at /usr/lib64/libjack.so.0
#4  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#5  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 11 (Thread 0x7f6c340a9700 (LWP 1408)):
#0  0x00007f6c4b4250f0 in sem_timedwait () at /lib64/libpthread.so.0
#1  0x00007f6c360c6e1c in  () at /usr/lib64/libjack.so.0
#2  0x00007f6c360b075c in  () at /usr/lib64/libjack.so.0
#3  0x00007f6c360aed17 in  () at /usr/lib64/libjack.so.0
#4  0x00007f6c362fe3f2 in ARDOUR::JACKAudioBackend::process_thread() () at /usr/lib64/ardour4/backends/libjack_audiobackend.so
#5  0x00007f6c360aec8a in  () at /usr/lib64/libjack.so.0
#6  0x00007f6c360c63d0 in  () at /usr/lib64/libjack.so.0
#7  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#8  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 10 (Thread 0x7f6c1c0f8700 (LWP 1409)):
#0  0x00007f6c4b425010 in sem_wait () at /lib64/libpthread.so.0
#1  0x00007f6c4f83ae45 in ARDOUR::Graph::restart_cycle() () at /usr/lib64/ardour4/libardour.so.3
#2  0x00007f6c4f83a5f7 in ARDOUR::Graph::run_one() () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4f83af30 in ARDOUR::Graph::main_thread() () at /usr/lib64/ardour4/libardour.so.3
#4  0x00007f6c362fe7d8 in ARDOUR::JACKAudioBackend::_start_process_thread(void*) () at /usr/lib64/ardour4/backends/libjack_audiobackend.so
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 9 (Thread 0x7f6c14ae3700 (LWP 1410)):
#0  0x00007f6c4b425010 in sem_wait () at /lib64/libpthread.so.0
#1  0x00007f6c4f83a5bb in ARDOUR::Graph::run_one() () at /usr/lib64/ardour4/libardour.so.3
#2  0x00007f6c4f83a668 in ARDOUR::Graph::helper_thread() () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c362fe7d8 in ARDOUR::JACKAudioBackend::_start_process_thread(void*) () at /usr/lib64/ardour4/backends/libjack_audiobackend.so
#4  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#5  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

---Type <return> to continue, or q <return> to quit---
Thread 8 (Thread 0x7f6c0c13d800 (LWP 1411)):
#0  0x00007f6c49e683cd in poll () at /lib64/libc.so.6
#1  0x00007f6c4ee5bba2 in CrossThreadChannel::poll_for_request() () at /usr/lib64/ardour4/libpbd.so.4
#2  0x00007f6c4ee5bbf6 in CrossThreadChannel::receive(char&, bool) () at /usr/lib64/ardour4/libpbd.so.4
#3  0x00007f6c4f7af6ad in ARDOUR::Butler::thread_work() () at /usr/lib64/ardour4/libardour.so.3
#4  0x00007f6c4f7af926 in ARDOUR::Butler::_thread_work(void*) () at /usr/lib64/ardour4/libardour.so.3
#5  0x00007f6c4ee75bc9 in fake_thread_start(void*) () at /usr/lib64/ardour4/libpbd.so.4
#6  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7f6c0effd700 (LWP 1412)):
#0  0x00007f6c49e683cd in poll () at /lib64/libc.so.6
#1  0x00007f6c4e25bbe4 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4e25bf0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f6c4ee4f8c9 in BaseUI::main_thread() () at /usr/lib64/ardour4/libpbd.so.4
#4  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#5  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#6  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f6c1cd04700 (LWP 1413)):
#0  0x00007f6c49e69a63 in select () at /lib64/libc.so.6
#1  0x00007f6bf2b39ff2 in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#2  0x00007f6bf2b3a195 in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#3  0x00007f6bf2af2207 in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#4  0x00007f6bf2b2d0ec in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#5  0x00007f6bf2b2d259 in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#6  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f6c0e7fc700 (LWP 1414)):
#0  0x00007f6c4b4233d0 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f6bf2b0df84 in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#2  0x00007f6bf2b39b3d in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#3  0x00007f6bf2b2d0ec in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#4  0x00007f6bf2b2d259 in  () at /home/u1/.lv2/TAL-NoiseMaker.lv2/TAL-NoiseMaker.so
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f6c15d06700 (LWP 1416)):
#0  0x00007f6c4b42305f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f6c4f9ca1c3 in ARDOUR::Session::emit_thread_run() () at /usr/lib64/ardour4/libardour.so.3
---Type <return> to continue, or q <return> to quit---
#2  0x00007f6c4f9ca1e9 in ARDOUR::Session::emit_thread(void*) () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f6c0ffff700 (LWP 1417)):
#0  0x00007f6c4b42614d in nanosleep () at /lib64/libpthread.so.0
#1  0x00007f6c4e282108 in g_usleep () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4f7a276c in ARDOUR::AutomationWatch::thread() () at /usr/lib64/ardour4/libardour.so.3
#3  0x00007f6c4e7b87ad in  () at /usr/lib64/libglibmm-2.4.so.1
#4  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f6bf169c700 (LWP 1430)):
#0  0x00007f6c49e6c789 in syscall () at /lib64/libc.so.6
#1  0x00007f6c4e29db2b in g_cond_wait_until () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4e231c81 in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f6c4e23220b in g_async_queue_timeout_pop () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f6c4e2815cc in  () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f6c4e280b85 in  () at /usr/lib64/libglib-2.0.so.0
#6  0x00007f6c4b41f0a4 in start_thread () at /lib64/libpthread.so.0
#7  0x00007f6c49e707fd in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f6c5090e9c0 (LWP 1362)):
#0  0x00007f6c4e2627f3 in g_logv () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f6c4e262962 in g_log () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f6c4e7bef6f in Glib::exception_handlers_invoke() () at /usr/lib64/libglibmm-2.4.so.1
#3  0x00007f6c4c7dbee9 in Gtk::Widget_Class::button_release_event_callback(_GtkWidget*, _GdkEventButton*) () at /usr/lib64/libgtkmm-2.4.so.1
#4  0x00007f6c4db05355 in  () at /usr/lib64/libgtk-x11-2.0.so.0
#5  0x00007f6c4e52ee78 in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#6  0x00007f6c4e53fe3b in  () at /usr/lib64/libgobject-2.0.so.0
#7  0x00007f6c4e547a18 in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#8  0x00007f6c4e548002 in g_signal_emit () at /usr/lib64/libgobject-2.0.so.0
#9  0x00007f6c4dc15024 in  () at /usr/lib64/libgtk-x11-2.0.so.0
#10 0x00007f6c4db03b04 in gtk_propagate_event () at /usr/lib64/libgtk-x11-2.0.so.0
#11 0x00007f6c4db03ebb in gtk_main_do_event () at /usr/lib64/libgtk-x11-2.0.so.0
#12 0x00007f6c4d774bfc in  () at /usr/lib64/libgdk-x11-2.0.so.0
#13 0x00007f6c4e25ba04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#14 0x00007f6c4e25bc48 in  () at /usr/lib64/libglib-2.0.so.0
#15 0x00007f6c4e25bf0a in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#16 0x00007f6c4db02fa7 in gtk_main () at /usr/lib64/libgtk-x11-2.0.so.0
#17 0x00007f6c5005cb16 in Gtkmm2ext::UI::run(Receiver&) () at /usr/lib64/ardour4/libgtkmm2ext.so.0
---Type <return> to continue, or q <return> to quit---
#18 0x0000000000495f3d in  ()
#19 0x00007f6c49dacb05 in __libc_start_main () at /lib64/libc.so.6
#20 0x00000000004a0044 in  ()

Trying to overcome "Duplicate plugin" console error, i merged the contents of "TAL-NoiseMaker.ttl" into "manifest.ttl", and the preset get properly saved in the "~/.lv2/NoizeMak3r.lv2/" dir. But the "presets.ttl" file still gets deleted, and the same console error still pops-up:

lilv_world_add_plugin(): error: Duplicate plugin <http://kunz.corrupt.ch/products/tal-noisemaker>
lilv_world_add_plugin(): error: ... found in file:///home/u1/.lv2/TAL-NoiseMaker.lv2/
lilv_world_add_plugin(): error: ... and      file:///home/u1/.lv2/TAL-NoiseMaker.lv2/
falkTX commented 8 years ago

Seems like an ardour bug to me. Seems it's overriding the actual plugin bundle with preset data. I remember seeing an ardour commit related to this btw, where the user should not be able to edit factory presets.

Paging @x42

Fak3 commented 8 years ago

Was this recent commit in Ardour? I am testing on 4.4

falkTX commented 8 years ago

This one https://github.com/Ardour/ardour/commit/4be4f8fb6223394761496173fecaeb09b85eeb6c

Fak3 commented 8 years ago

Ok, i will test recent "nightly" Ardour

x42 commented 8 years ago

https://github.com/Ardour/ardour/commit/4be4f8fb6223394761496173fecaeb09b85eeb6c is only relevant for the new sidebar.

Fak3 commented 8 years ago

I checked current nightly Ardour (Ardour/ardour@027ffb1b371e94183e21700dae7e09dc07b4c7ac), and the bug is still there. @x42: What is this new sidebar? Is it available for testing, or still actively hacked on?

x42 commented 8 years ago

The issue is deeper. You should not be allowed to delete factory presets. it's not an ardour-bug per se. it's in liblilv (Lv2 library).. still investigating. meanwhile: just don't delete or replace factory presets :)

re sidebar. left side of the mixer, at the top "favorite" plugins are shown and can be dragged/dropped to/from channels.. more in the 4.5 release announcement, soon or on #ardour IRC.

x42 commented 8 years ago

continued at http://dev.drobilla.net/ticket/1117