View Issue Details

IDProjectCategoryView StatusLast Update
0001971ardourbugspublic2008-11-21 00:04
Reporterjgreen Assigned Topaul  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version2.1 
Summary0001971: Crash when loading a particular session
DescriptionSegmentation fault when loading a session that I just recently created. The session was created with version 2.0.5 installed from an Ubuntu Gutsy package. I uninstalled the package and built/installed Ardour 2.1 from source, which also crashes with the same session.
Additional InformationBacktrace is attached and also includes some inspection at the end, of variables used in the crashing "memset" function call. I'll also attach my Ardour session file. I can make the entire session available if need be, but its over 500MB.
TagsNo tags attached.

Activities

2007-11-25 08:38

 

ardour-2.1-session-crash-backtrace.txt (3,920 bytes)   
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1238092096 (LWP 24085)]
0xb7e2b0db in ARDOUR::Session::get_silent_buffers (this=0x90b9800, howmany=3)
    at libs/ardour/session.cc:4010
4010                    memset (_silent_buffers[i], 0, sizeof (Sample) * current_block_size);
(gdb) bt
#0  0xb7e2b0db in ARDOUR::Session::get_silent_buffers (this=0x90b9800, 
    howmany=3) at libs/ardour/session.cc:4010
#1  0xb7d3026b in ARDOUR::AudioTrack::passthru_silence (this=0x90e4ff0, 
    start_frame=0, end_frame=1024, nframes=1024, offset=0, declick=0, 
    meter=false) at libs/ardour/audio_track.cc:444
#2  0xb7d2fbb8 in ARDOUR::AudioTrack::no_roll (this=0x90e4ff0, nframes=1024, 
    start_frame=0, end_frame=1024, offset=0, session_state_changing=false, 
    can_record=false, rec_monitors_input=false)
    at libs/ardour/audio_track.cc:513
#3  0xb7e8d033 in ARDOUR::Session::no_roll (this=0x90b9800, nframes=1024, 
    offset=0) at libs/ardour/session_process.cc:101
#4  0xb7e8de56 in ARDOUR::Session::process_without_events (this=0x90b9800, 
    nframes=1024) at libs/ardour/session_process.cc:741
#5  0xb7e8e251 in ARDOUR::Session::process_with_events (this=0x90b9800, 
    nframes=1024) at libs/ardour/session_process.cc:286
#6  0xb7e8e8d0 in ARDOUR::Session::process (this=0x90b9800, nframes=1024)
    at libs/ardour/session_process.cc:60
#7  0xb7d39033 in ARDOUR::AudioEngine::set_session (this=0x8cc1948, 
    s=0x90b9800) at libs/ardour/audioengine.cc:436
#8  0xb7e3b6fa in ARDOUR::Session::when_engine_running (this=0x90b9800)
    at libs/ardour/session.cc:875
#9  0xb7ea006b in ARDOUR::Session::second_stage_init (this=0x90b9800, 
    new_session=false) at libs/ardour/session_state.cc:320
---Type <return> to continue, or q <return> to quit---
#10 0xb7e4294e in Session (this=0x90b9800, eng=@0x8cc1948, 
    fullpath=@0xbfba1f74, snapshot_name=@0xbfba1f78, mix_template=0x0)
    at libs/ardour/session.cc:300
#11 0x083ab27d in ARDOUR_UI::load_session (this=0x88bdcd0, path=@0xbfba2038, 
    snap_name=@0xbfba203c, mix_template=0x0) at gtk2_ardour/ardour_ui.cc:2282
#12 0x083b9385 in ARDOUR_UI::get_session_parameters (this=0x88bdcd0, 
    predetermined_path=@0xbfba2110, have_engine=true, should_be_new=false)
    at gtk2_ardour/ardour_ui.cc:2065
#13 0x083ba4d1 in ARDOUR_UI::startup (this=0x88bdcd0)
    at gtk2_ardour/ardour_ui.cc:644
#14 0x083c31a4 in sigc::bound_mem_functor0<void, ARDOUR_UI>::operator() (
    this=0x8c8a23c) at libs/sigc++2/sigc++/functors/mem_fun.h:1781
#15 0x083c31ba in sigc::adaptor_functor<sigc::bound_mem_functor0<void, ARDOUR_UI> >::operator() (this=0x8c8a238)
    at libs/sigc++2/sigc++/adaptors/adaptor_trait.h:251
#16 0x083c31d6 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, ARDOUR_UI>, void>::call_it (rep=0x8c8a220)
    at libs/sigc++2/sigc++/functors/slot.h:103
#17 0x083c4de9 in sigc::internal::signal_emit0<void, sigc::nil_>::emit (
    impl=0x8c8a578) at libs/sigc++2/sigc++/signal.h:517
#18 0x083c4e84 in sigc::signal0<void, sigc::nil_>::emit (this=0x88bdd18)
    at libs/sigc++2/sigc++/signal.h:1584
#19 0x083c4e97 in sigc::signal0<void, sigc::nil_>::operator() (this=0x88bdd18)
---Type <return> to continue, or q <return> to quit---
    at libs/sigc++2/sigc++/signal.h:1588
#20 0xb7af9809 in Gtkmm2ext::UI::run (this=0x88bdcd0, old_receiver=@0x88998a8)
    at libs/gtkmm2ext/gtk_ui.cc:221
#21 0x0860c995 in main (argc=1, argv=0xbfba2314) at gtk2_ardour/main.cc:266
(gdb) p i
$1 = 2
(gdb) p _silent_buffers
$2 = {<std::_Vector_base<ARDOUR::Sample*,std::allocator<ARDOUR::Sample*> >> = {
    _M_impl = {<std::allocator<ARDOUR::Sample*>> = {<__gnu_cxx::new_allocator<ARDOUR::Sample*>> = {<No data fields>}, <No data fields>}, _M_start = 0x91f88e8, 
      _M_finish = 0x91f88f0, _M_end_of_storage = 0x91f88f0}}, <No data fields>}
(gdb) p _silent_buffers[2]
$3 = (Sample *&) @0x91f88f0: 0x10
(gdb) p current_block_size
$4 = 1024

2007-11-25 08:39

 

Toast and Jam.ardour (16,156 bytes)

paul

2007-12-08 22:56

administrator   ~0004595

i believe i may have fixed this problem in svn already. the only way to find out for sure (since it won't crash on my machine at all with your session) is for you to try out an svn build, which is slightly more work than building it from the tarball.

jgreen

2007-12-09 21:25

reporter   ~0004601

Not sure which subversion branch you mean. I tried the 2.0-ongoing branch of ardour and had the same crash results. It looks like the trunk development version of ardour requires Jack 0.105 which I don't currently have installed, perhaps you meant for me to try the 2.0-ongoing version though.

colinf

2007-12-14 14:00

updater   ~0004603

Opening the "Toast and Jam.ardour" session file segfaults for me too in 2.0-ongoing revision 2778.

It looks like only two elements of Session::_silent_buffers get initialised when this particular session is loaded, but AudioTrack::passthru_silence() finds n_process_buffers() == 3 because of the three-channel track, so calls get_silent_buffers(3).

I'm not sure whether this is because of an error in the session file or an Ardour: I tried to create a session with the same combination of tracks, outputs, etc. I wasn't able to reproduce the crash with that, but there could well be something I missed.

Anyway, adding:
    IO::MoreOutputs(dstream->n_channels());
in Session::add_diskstream() makes sure that Session::ensure_passthru_buffers(3) is called when the three-channel track is loaded, so I can at least load "Toast and Jam.ardour" without segfaulting.

I'm fairly sure this isn't a proper fix, but I hope it's helpful for someone more knowledgeable than me to know how to really correct it.

Colin.

colinf

2008-01-09 14:09

updater   ~0004628

Fixed by revision 2833.

paul

2008-01-10 20:15

administrator   ~0004631

see notes.

Issue History

Date Modified Username Field Change
2007-11-25 08:37 jgreen New Issue
2007-11-25 08:38 jgreen File Added: ardour-2.1-session-crash-backtrace.txt
2007-11-25 08:39 jgreen File Added: Toast and Jam.ardour
2007-12-08 22:56 paul Note Added: 0004595
2007-12-09 15:29 paul Status new => feedback
2007-12-09 21:25 jgreen Note Added: 0004601
2007-12-14 14:00 colinf Note Added: 0004603
2008-01-09 14:09 colinf Note Added: 0004628
2008-01-10 20:15 paul Status feedback => resolved
2008-01-10 20:15 paul Resolution open => fixed
2008-01-10 20:15 paul Assigned To => paul
2008-01-10 20:15 paul Note Added: 0004631
2008-11-21 00:04 seablade Status resolved => closed