View Issue Details

IDCategoryLast Update
0007371bugs2018-11-01 21:58
Reporterjohmue-eoAssigned Tojohmue-eo 
Reproducibilityalways 
Status closedResolutionfixed 
Platformx86OSLinuxOS VersionUbuntu 16.04
Product Version5.9 
Fixed in Version 
Summary0007371: Crash after undo() or redo () triggered by non-GUI thread
DescriptionWhen undoing a reagion trim or move operation from a non-GUI thread (like OSC surface), Ardour crashes.
Steps To Reproduce* Open a session with at least one region.

* Make sure that OSC-surface is activated

* trim the region

* send "/undo" to the OSC control
Additional InformationAccording to a backtrace this happens because we call Session::undo() from a non-GUI thread. Then in CairoWidget::set_dirty () /libs/gtkmm2ext/cairo_widget.cc:317 ENSURE_GUI_THREAD fails end we end up with abort ().
TagsNo tags attached.

Activities

paul

2017-05-29 17:24

administrator   ~0019754

Please attach a backtrace showing this. The code in the GUI which handles UndoHistory::Changed ensures that the actual callback executes in the correct thread.

johmue-eo

2017-05-30 20:18

reporter   ~0019761

Here you go:

Thread 29 "ardour-5.9.8" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff8a7fc700 (LWP 29612)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
58 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) where
#0 0x00007fffef82e77f in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
0000001 0x00007fffef83037a in __GI_abort () at abort.c:89
#2 0x00007ffff74d759f in CairoWidget::set_dirty(_cairo_rectangle*) (this=0x5555575dda00, area=0x0) at ../libs/gtkmm2ext/cairo_widget.cc:317
#3 0x0000555555ea2bfe in EditorSummary::set_background_dirty() (this=0x5555575dda00) at ../gtk2_ardour/editor_summary.cc:300
0000004 0x0000555555ea8c0c in sigc::bound_mem_functor0<void, EditorSummary>::operator()() const (this=0x555559091098) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1991
0000005 0x0000555555ea81b6 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, EditorSummary> >::operator()() const (this=0x555559091090) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:256
#6 0x0000555555ea78ba in sigc::internal::slot_call<sigc::bound_mem_functor0<void, EditorSummary>, void>::call_it(sigc::internal::slot_rep*) (rep=0x555559091060) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:461
#7 0x0000555555b01681 in sigc::internal::signal_emit0<void, sigc::nil>::emit(sigc::internal::signal_impl*) (impl=0x5555575ddfd0) at /usr/include/sigc++-2.0/sigc++/signal.h:798
0000008 0x0000555555b036ea in sigc::signal0<void, sigc::nil>::emit() const (this=0x55555781e478) at /usr/include/sigc++-2.0/sigc++/signal.h:2804
0000009 0x0000555555b02972 in sigc::signal0<void, sigc::nil>::operator()() const (this=0x55555781e478) at /usr/include/sigc++-2.0/sigc++/signal.h:2820
0000010 0x00005555564be89a in Selection::clear_regions(bool) (this=0x55555781e2e0, with_signal=true) at ../gtk2_ardour/selection.cc:156
0000011 0x00005555564c334b in Selection::set_state(XMLNode const&, int) (this=0x55555781e2e0, node=...) at ../gtk2_ardour/selection.cc:1221
0000012 0x00005555564d2ca3 in SelectionMemento::set_state(XMLNode const&, int) (this=0x55555781f040, node=...) at ../gtk2_ardour/selection_memento.cc:85
0000013 0x0000555555d34369 in MementoCommand<SelectionMemento>::undo() (this=0x55555a9293a0) at /home/joh/Devel/ardour/libs/pbd/pbd/memento_command.h:139
0000014 0x00007ffff4910e38 in UndoTransaction::undo() (this=0x55555a7b6f70) at ../libs/pbd/undo.cc:125
#15 0x00007ffff49115d5 in UndoHistory::undo(unsigned int) (this=0x55555733fa80, n=0) at ../libs/pbd/undo.cc:264
0000016 0x00007ffff6869ee3 in ARDOUR::Session::undo(unsigned int) (this=0x55555733d800, n=1) at ../libs/ardour/session_state.cc:5435
#17 0x00007ffff7ba688d in BasicUI::undo() (this=0x555558fa0d08) at ../libs/surfaces/control_protocol/basic_ui.cc:331
0000018 0x00007fffdddbe3e9 in ArdourSurface::OSC::cb_undo(char const*, char const*, lo_arg**, int, void*) (this=0x555558fa0c10, path=0x555558fa3bc0 "/undo", types=0x7fff7c019881 "", argv=0x0, argc=0, data=0x7fff7c0ca160)
    at ../libs/surfaces/osc/osc.h:308
0000019 0x00007fffdddbe310 in ArdourSurface::OSC::_undo(char const*, char const*, lo_arg**, int, void*, void*) (path=0x555558fa3bc0 "/undo", types=0x7fff7c019881 "", argv=0x0, argc=0, data=0x7fff7c0ca160, user_data=0x555558fa0c10)
    at ../libs/surfaces/osc/osc.h:308
0000020 0x00007ffff0d806fc in () at /usr/lib/x86_64-linux-gnu/liblo.so.7
0000021 0x00007ffff0d8236c in () at /usr/lib/x86_64-linux-gnu/liblo.so.7
0000022 0x00007ffff0d82735 in lo_server_recv () at /usr/lib/x86_64-linux-gnu/liblo.so.7
0000023 0x00007fffddda2125 in ArdourSurface::OSC::osc_input_handler(Glib::IOCondition, void*) (this=0x555558fa0c10, ioc=Glib::IO_IN, srv=0x555558fa16e0) at ../libs/surfaces/osc/osc.cc:640
#24 0x00007fffdddf23ec in sigc::bound_mem_functor2<bool, ArdourSurface::OSC, Glib::IOCondition, void*>::operator()(Glib::IOCondition const&, void* const&) const (this=0x7fff7c0016e0, _A_a1=@0x7fff8a7fb984: Glib::IO_IN, _A_a2=@0x7fff7c001700: 0x555558fa16e0) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:2143
0000025 0x00007fffddded607 in sigc::adaptor_functor<sigc::bound_mem_functor2<bool, ArdourSurface::OSC, Glib::IOCondition, void*> >::operator()<Glib::IOCondition const&, void*&>(Glib::IOCondition const&, void*&) const (this=0x7fff7c0016d8, _A_arg1=@0x7fff8a7fb984: Glib::IO_IN, _A_arg2=@0x7fff7c001700: 0x555558fa16e0) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:108
0000026 0x00007fffddde7548 in sigc::bind_functor<-1, sigc::bound_mem_functor2<bool, ArdourSurface::OSC, Glib::IOCondition, void*>, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::operator()<Glib::IOCondition const&>(Glib::IOCondition const&) (this=0x7fff7c0016d0, _A_arg1=@0x7fff8a7fb984: Glib::IO_IN) at /usr/include/sigc++-2.0/sigc++/adaptors/bind.h:1136
0000027 0x00007fffddde0d5b in sigc::internal::slot_call1<sigc::bind_functor<-1, sigc::bound_mem_functor2<bool, ArdourSurface::OSC, Glib::IOCondition, void*>, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>, bool, Glib::IOCondition>::call_it(sigc::internal::slot_rep*, Glib::IOCondition const&) (rep=0x7fff7c0016a0, a_1=@0x7fff8a7fb984: Glib::IO_IN) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:148
0000028 0x00007ffff4151e77 in Glib::IOSource::dispatch(sigc::slot_base*) () at /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1
0000029 0x00007ffff415187f in Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) () at /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1
0000030 0x00007ffff3bdf22a in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000031 0x00007ffff3bdf5e0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000032 0x00007ffff3bdf902 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000033 0x00007ffff48b17d3 in BaseUI::main_thread() (this=0x555558fa0da0) at ../libs/pbd/base_ui.cc:86
0000034 0x00007ffff48b5f4a in sigc::bound_mem_functor0<void, BaseUI>::operator()() const (this=0x555558fa86e8) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1991
0000035 0x00007ffff48b5b8a in sigc::adaptor_functor<sigc::bound_mem_functor0<void, BaseUI> >::operator()() const (this=0x555558fa86e0) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:256
0000036 0x00007ffff48b54fe in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, BaseUI>, void>::call_it(sigc::internal::slot_rep*) (rep=0x555558fa86b0) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:114
0000037 0x00007ffff4148a9d in () at /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1
0000038 0x00007ffff3c06f65 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000039 0x00007ffff0b626da in start_thread (arg=0x7fff8a7fc700) at pthread_create.c:456
0000040 0x00007fffef90117f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
(gdb)

johmue-eo

2017-06-25 19:44

reporter   ~0019809

https://github.com/Ardour/ardour/pull/351 solves this. It's more like a work around but Ardour doesn't crash anymore ...

johmue-eo

2017-07-01 08:56

reporter   ~0019849

Resolved in Ardour 5.10-163 f7452c2.

johmue-eo

2018-11-01 21:58

reporter   ~0020436

Fixed in 7452c2

Issue History

Date Modified Username Field Change
2017-05-25 13:38 johmue-eo New Issue
2017-05-29 17:24 paul Note Added: 0019754
2017-05-30 20:18 johmue-eo Note Added: 0019761
2017-06-25 19:44 johmue-eo Note Added: 0019809
2017-07-01 08:56 johmue-eo Note Added: 0019849
2017-07-01 08:56 johmue-eo Status new => resolved
2017-07-01 08:56 johmue-eo Resolution open => fixed
2017-07-01 08:56 johmue-eo Assigned To => johmue-eo
2018-11-01 21:58 johmue-eo Note Added: 0020436
2018-11-01 21:58 johmue-eo Status resolved => closed