Menu

#4 Samplv1 as lv2 plugin crashes when jumping in song with complex automation

0.7.6
closed
nobody
None
2016-06-16
2014-11-02
oelmekki
No

Hi there,

Thanks for samplv1, it's the perfect lv2 sampler I was looking for :)

I've encountered crashes of ardour using samplv1. I'm not really sure if it's an ardour or a samplv1 problem because :

  1. crash occurs using samplv1 and synthv1, but not others lv2 instruments I've tried (calf organ and SO-404 bass synth)
  2. crash does not occur doing the same thing in qtractor instead of ardour

The crash, as far as I've identified it, happens when jumping in the middle of a song containing a midi track with samplv1 as lv2 plugin with one parameter controlled through an automation recorded through control surface, and trying to play back.

Here is a video recorded from a brand new session (it's unclear at the end, but ardour close at the moment I hit spacebar to play, should have clicked play button)

Steps to reproduce :

  1. create a midi track with samplv1 loaded as instrument
  2. plug an external controller into ardour control and midi track control
  3. assign a cc to one of samplv1 parameters ("delay delay", in my video)
  4. set automation state to "write"
  5. record something, playing both notes and cc
  6. jump in the middle of the track
  7. hit "play" button

A few things to note :

  • this only happens for automation recorded through control surface, and which contain thus a lot of nodes (drawing just a few nodes with mouse does not cause crash)
  • ardour-3.5.403
  • samplv1-0.5.1
  • jackd-1.9.10
  • midi through a2jmidid
  • ubuntu 14.04 with linux-lowlatency kernel (happens as well with linux-generic)

I've generated a core dump with ardour and traced exception to this :

#0  __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:36
#1  0x00007f668337571e in samplv1_impl::process(float**, float**, unsigned int) () from /usr/lib/lv2/samplv1.lv2/samplv1.so
#2  0x00007f668337938c in samplv1_lv2::run(unsigned int) () from /usr/lib/lv2/samplv1.lv2/samplv1.so
#3  0x00007f66dfc5889c in lilv_instance_run (instance=0xc27b6c0, sample_count=686)
    at /home/harrison/a3/inst/include/lilv-0/lilv/lilv.h:1639
#4  0x00007f66dfc63a1f in ARDOUR::LV2Plugin::run (this=0xc24d020, nframes=686) at ../libs/ardour/lv2_plugin.cc:1868
#5  0x00007f66dfc62f87 in ARDOUR::LV2Plugin::connect_and_run (this=0xc24d020, bufs=..., in_map=..., out_map=..., nframes=686, 
    offset=0) at ../libs/ardour/lv2_plugin.cc:1722
#6  0x00007f66dfa60f6e in ARDOUR::PluginInsert::connect_and_run (this=0xc24a440, bufs=..., nframes=686, offset=0, with_auto=true, 
    now=609618) at ../libs/ardour/plugin_insert.cc:399
#7  0x00007f66dfa61d1d in ARDOUR::PluginInsert::automation_run (this=0xc24a440, bufs=..., nframes=1024)
    at ../libs/ardour/plugin_insert.cc:564
#8  0x00007f66dfa616fb in ARDOUR::PluginInsert::run (this=0xc24a440, bufs=..., nframes=1024) at ../libs/ardour/plugin_insert.cc:461
#9  0x00007f66dfae66f8 in ARDOUR::Route::process_output_buffers (this=0xc1f8260, bufs=..., start_frame=609618, end_frame=610642, 
    nframes=1024, declick=0, gain_automation_ok=false) at ../libs/ardour/route.cc:534
#10 0x00007f66df9f170b in ARDOUR::MidiTrack::roll (this=0xc1f8260, nframes=1024, start_frame=609618, end_frame=610642, declick=0, 
    need_butler=@0x7f66b8b5c9cf: false) at ../libs/ardour/midi_track.cc:404
#11 0x00007f66df9304fd in ARDOUR::Graph::process_one_route (this=0xadd8200, route=0xc1f8260) at ../libs/ardour/graph.cc:564
#12 0x00007f66df9345ed in ARDOUR::GraphNode::process (this=0xc1f8498) at ../libs/ardour/graphnode.cc:79
#13 0x00007f66df92ec83 in ARDOUR::Graph::run_one (this=0xadd8200) at ../libs/ardour/graph.cc:384
#14 0x00007f66df92f0fe in ARDOUR::Graph::main_thread (this=0xadd8200) at ../libs/ardour/graph.cc:440
#15 0x00007f66df933a11 in boost::_mfi::mf0<void, ARDOUR::Graph>::operator() (this=0x7f66b8b5ccd8, p=0xadd8200)
    at /home/harrison/a3/inst/include/boost/bind/mem_fn_template.hpp:49
#16 0x00007f66df93365e in boost::_bi::list1<boost::_bi::value<ARDOUR::Graph*> >::operator()<boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list0> (this=0x7f66b8b5cce8, f=..., a=...) at /home/harrison/a3/inst/include/boost/bind/bind.hpp:253
#17 0x00007f66df9333a3 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list1<boost::_bi::value<ARDOUR
#18 0x00007f66df932fc1 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list1<boost::_bi::value<ARDOUR::Graph*> > >, void>::invoke (function_obj_ptr=...)
    at /home/harrison/a3/inst/include/boost/function/function_template.hpp:153
#19 0x0000000000cdde13 in boost::function0<void>::operator() (this=0x7f66b8b5ccd0)
    at /home/harrison/a3/inst/include/boost/function/function_template.hpp:760
#20 0x00007f66ca7460a9 in ARDOUR::JACKAudioBackend::_start_process_thread (arg=0xadd7c20)
    at ../libs/backends/jack/jack_audiobackend.cc:913
#21 0x00007f66d7640182 in start_thread (arg=0x7f66b8b5d700) at pthread_create.c:312
#22 0x00007f66d505efbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Discussion

  • Rui Nuno Capela

    Rui Nuno Capela - 2014-11-03

    hi.

    let me say a core backtrace could help a little bit more, if you're running a debug build of samplv1 (./configure --prefix=/usr --enable-debug ...), like pointing the right place in the source code line perhaps, like you do with ardour3...

    anyway, does it also occur on any samplv1 parameter or is it just DEL1_DELAY? is there anyway to smooth the ardour3 automation control nodes and possibly isolate the MIDI controller ones away from being fed to the plugin as well?

    qtractor does this automation smoothing by dropping redundant control nodes whenever they add nothing to the curve shape or envelope interpolated series. maybe in ardour you can try something of the sort, a configuration setting or else. this is not telling that ardour3 is the culprit but just trying to look and find a spot where trouble is in samplv1_impl::process() which goes berserk! :)

    byee

     
  • oelmekki

    oelmekki - 2014-11-08

    Hello,

    Just to let you know, I've not used samplv1 with debug flags, but I had so many crashes and data loss with ardour that it's a high probability the problem is not on samplv1 side (smoothing midi input did not help, btw). There are a lot of commits waiting for next release in ardour repos, so I'll check again at this point to see if it's more stable.

    Meanwhile, I'll use qtractor and get back to you if I encounter the same problem, no need to ask for your time in a so unstable environment.

    Thanks,

     
  • oelmekki

    oelmekki - 2015-01-03

    Hi,

    So, I've been using samplv1 with qtractor for the last two months, doing the same things I wanted to do within ardour, and I haven't a single crash to report.

    Would you still want a stacktrace to see what happen in ardour, out of curiosity ?

     
    • Rui Nuno Capela

      Rui Nuno Capela - 2015-01-03

      hi. you're welcome. of course, remember to use samplv1_lv2 with --enable-debug please.

      cheers

       
  • Rui Nuno Capela

    Rui Nuno Capela - 2016-02-22
    • status: open --> closed
     

Log in to post a comment.