View Issue Details

IDProjectCategoryView StatusLast Update
0001703ardourbugspublic2008-11-21 00:04
Reporternowhiskey Assigned Totimbyr  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version2.0 
Summary0001703: ardour2-trunk crashes while removing a region via context-menu
Descriptionthis is on ardour2-trunk-rev1922

to reproduce:

-create a new session
-create a stereo track
-import some audio into it
-right click at the region-region-remove
-ardour2 crashes here at this moment

here the backtrace:

Thread 4 (process 9097):
#0 0xb6b28b3c in __nanosleep_nocancel () from /lib/tls/libpthread.so.0
0000001 0xb75b8292 in g_usleep () from /usr/share/qt4/lib/libglib-2.0.so.0
#2 0xb6ddfa25 in Glib::usleep (microseconds=10000) at
#libs/glibmm2/glibmm/timer.cc:68
#3 0xb7cd8e66 in ARDOUR::AudioEngine::meter_thread (this=0x8ae4c60) at
#libs/ardour/audioengine.cc:441
0000004 0xb7cdbcf0 in sigc::bound_mem_functor0<void,
#ARDOUR::AudioEngine>::operator() (this=0x8a5dbb4) at
#libs/sigc++2/sigc++/functors/mem_fun.h:1781
0000005 0xb7cdbd12 in sigc::adaptor_functor<sigc::bound_mem_functor0<void,
#ARDOUR::AudioEngine> >::operator() (this=0x8a5dbb0)
    at libs/sigc++2/sigc++/adaptors/adaptor_trait.h:251
#6 0xb7cdbd3e in sigc::internal::slot_call0<sigc::bound_mem_functor0<void,
ARDOUR::AudioEngine>, void>::call_it (rep=0x8a5db98)
    at libs/sigc++2/sigc++/functors/slot.h:103
#7 0x08371f22 in sigc::slot0<void>::operator() (this=0x8a5ea10) at
libs/sigc++2/sigc++/functors/slot.h:440
0000008 0xb6dfd24f in call_thread_entry_slot (data=0x8a5ea10) at
libs/glibmm2/glibmm/thread.cc:43
0000009 0xb75b62cf in g_thread_create_full () from
/usr/share/qt4/lib/libglib-2.0.so.0
0000010 0xb6b230bd in start_thread () from /lib/tls/libpthread.so.0
0000011 0xb69be9ee in clone () from /lib/tls/libc.so.6

Thread 3 (process 9100):
#0 0xb69b4ef9 in poll () from /lib/tls/libc.so.6
0000001 0xb6f12348 in jack_client_core_wait (client=0x8aef300) at client.c:1412
#2 0xb6f12959 in jack_thread_wait (client=0x8aef300, status=0) at
#client.c:1564
#3 0xb6f12d8e in jack_client_thread (arg=0x8aef300) at client.c:1611
0000004 0xb6f18c60 in jack_thread_proxy (varg=0x8bbfc38) at thread.c:110
0000005 0xb6b230bd in start_thread () from /lib/tls/libpthread.so.0
#6 0xb69be9ee in clone () from /lib/tls/libc.so.6

Thread 2 (process 9125):
#0 0xb69b4ef9 in poll () from /lib/tls/libc.so.6
0000001 0xb7e2bbe3 in ARDOUR::Session::butler_thread_work (this=0x8dde2b8) at
#libs/ardour/session_butler.cc:176
#2 0xb7e2c9c7 in ARDOUR::Session::_butler_thread_work (arg=0x8dde2b8) at
#libs/ardour/session_butler.cc:157
#3 0xb6b230bd in start_thread () from /lib/tls/libpthread.so.0
0000004 0xb69be9ee in clone () from /lib/tls/libc.so.6

Thread 1 (process 9094):
#0 0x083921bb in boost::detail::atomic_increment (pw=0x63657231) at
/usr/include/boost/detail/sp_counted_base_gcc_x86.hpp:66
0000001 0x083921d4 in boost::detail::sp_counted_base::add_ref_copy
#(this=0x6365722d) at
#/usr/include/boost/detail/sp_counted_base_gcc_x86.hpp:133
#2 0x083922a8 in shared_count (this=0xbff04180, r=@0x900304c) at
#/usr/include/boost/detail/shared_count.hpp:170
#3 0x08415dc6 in shared_ptr (this=0xbff0417c) at
#/usr/include/boost/shared_ptr.hpp:106
0000004 0x08415de8 in RegionView::region (this=0x9002f48) at
#gtk2_ardour/region_view.h:56
0000005 0x084f9002 in Editor::remove_selected_regions (this=0x8bf5440) at
#gtk2_ardour/editor_ops.cc:180
#6 0x08483234 in sigc::bound_mem_functor0<void, Editor>::operator()
#(this=0x8f9cae4) at libs/sigc++2/sigc++/functors/mem_fun.h:1781
#7 0x0848324a in sigc::adaptor_functor<sigc::bound_mem_functor0<void,
#Editor> >::operator() (this=0x8f9cae0) at
#libs/sigc++2/sigc++/adaptors/adaptor_trait.h:251
0000008 0x08483266 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void,
#Editor>, void>::call_it (rep=0x8f9cac8) at
#libs/sigc++2/sigc++/functors/slot.h:103
0000009 0x08371f22 in sigc::slot0<void>::operator() (this=0x8f9cab4) at
#libs/sigc++2/sigc++/functors/slot.h:440
0000010 0xb6dfe6d5 in Glib::SignalProxyNormal::slot0_void_callback
#(self=0x8fe66c0, data=0x8f9cab0) at libs/glibmm2/glibmm/signalproxy.cc:95
0000011 0xb7621e1b in g_cclosure_marshal_VOID__VOID () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000012 0xb761498b in g_closure_invoke () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000013 0xb7625213 in g_signal_chain_from_overridden () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000014 0xb7626429 in g_signal_emit_valist () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
#15 0xb76265d9 in g_signal_emit () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000016 0xb7432042 in gtk_widget_activate () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
#17 0xb7350262 in gtk_menu_shell_activate_item () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000018 0xb7351810 in gtk_menu_shell_append () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000019 0xb7345d3f in gtk_menu_attach () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000020 0xb7898869 in Gtk::Widget_Class::button_release_event_callback
#(self=0x8f83bc8, p0=0x8f82160) at libs/gtkmm2/gtk/gtkmm/widget.cc:3805
0000021 0xb7344250 in _gtk_marshal_BOOLEAN__BOXED () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000022 0xb7612f49 in g_value_set_boxed () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000023 0xb761498b in g_closure_invoke () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
#24 0xb762556f in g_signal_chain_from_overridden () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000025 0xb7626208 in g_signal_emit_valist () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000026 0xb76265d9 in g_signal_emit () from
#/usr/share/qt4/lib/libgobject-2.0.so.0
0000027 0xb742df64 in gtk_widget_get_default_style () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000028 0xb733dbd3 in gtk_propagate_event () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000029 0xb733ee07 in gtk_main_do_event () from
#/usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000030 0xb71d7eea in _gdk_events_init () from
#/usr/share/qt4/lib/libgdk-x11-2.0.so.0
0000031 0xb7598731 in g_main_context_dispatch () from
#/usr/share/qt4/lib/libglib-2.0.so.0
0000032 0xb759b7a6 in g_main_context_check () from
#/usr/share/qt4/lib/libglib-2.0.so.0
0000033 0xb759bb67 in g_main_loop_run () from
#/usr/share/qt4/lib/libglib-2.0.so.0
0000034 0xb733f281 in gtk_main () from /usr/share/qt4/lib/libgtk-x11-2.0.so.0
0000035 0xb781ae49 in Gtk::Main::run_impl (this=0x886d8a0) at
#libs/gtkmm2/gtk/gtkmm/main.cc:503
0000036 0xb781ac56 in Gtk::Main::run () at libs/gtkmm2/gtk/gtkmm/main.cc:450
0000037 0xb7a9d477 in Gtkmm2ext::UI::run (this=0x886a7f0,
#old_receiver=@0x884a21c) at libs/gtkmm2ext/gtk_ui.cc:147
0000038 0x0859ccb8 in main (argc=1, argv=0xbff04f84) at gtk2_ardour/main.cc:277
...........

cheers,
doc
TagsNo tags attached.

Activities

2007-09-03 04:15

 

ardour.patch (936 bytes)   
Index: gtk2_ardour/editor_ops.cc
===================================================================
--- gtk2_ardour/editor_ops.cc	(revision 2362)
+++ gtk2_ardour/editor_ops.cc	(working copy)
@@ -178,16 +178,16 @@
 	/* XXX: should be called remove regions if we're removing more than one */
 	begin_reversible_command (_("remove region"));
 	
-	for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
-		boost::shared_ptr<Region> region = (*i)->region ();
+	while (!selection->regions.empty()) {
+		boost::shared_ptr<Region> region = selection->regions.front()->region();
 		boost::shared_ptr<Playlist> playlist = region->playlist ();
-	
+
 		XMLNode &before = playlist->get_state();
 		playlist->remove_region (region);
 		XMLNode &after = playlist->get_state();
 		session->add_command(new MementoCommand<Playlist>(*playlist, &before, &after));
 	}
-	
+
 	commit_reversible_command ();
 }
ardour.patch (936 bytes)   

jdavisp3

2007-09-03 04:16

reporter   ~0004321

I think the iterator will be invalid after the first region is deleted.
The attached patch deleted the front() of the selection until it is empty.

timbyr

2007-09-10 00:08

developer   ~0004351

Patch applied as rev 2443. Thanks.

Issue History

Date Modified Username Field Change
2007-05-27 15:21 nowhiskey New Issue
2007-09-03 04:15 jdavisp3 File Added: ardour.patch
2007-09-03 04:16 jdavisp3 Note Added: 0004321
2007-09-10 00:08 timbyr Status new => resolved
2007-09-10 00:08 timbyr Resolution open => fixed
2007-09-10 00:08 timbyr Assigned To => timbyr
2007-09-10 00:08 timbyr Note Added: 0004351
2008-11-21 00:04 seablade Status resolved => closed