View Issue Details

IDCategoryLast Update
0004462bugs2012-06-20 19:03
ReporterChuckAssigned To 
Reproducibilityalways 
Status feedbackResolutionopen 
Product Version 
Fixed in Version 
Summary0004462: Linuxsampler plugin crashes Ardour
DescriptionIf the linuxsampler plugin is loaded into a channel, and any instrument
other than a GIG file (i.e. either an SF2 or SFZ instrument) is loaded
into the plugin, it works fine during that session, but if Ardour is
exited while that instrument is still loaded, the next time Ardour is
started it results in a segmentation fault. The only way I was able to
get Ardour to start with that saved session was to copy the linuxsampler
file from the plugin directory of another session into the session that
was crashing Ardour (I created a session specifically for this purpose,
and just didn't load an instrument into the plugin in that session).
This was, of course, using the latest SVN release of linuxsampler.
TagsNo tags attached.

Relationships

related to 0004375 feedback loading a session containing linuxsampler LV2 causes segfault 

Activities

2011-11-13 02:14

 

ardour-linuxsampler-backtrace.txt (20,679 bytes)
Thread 92 (Thread 0x7fffd4ec8700 (LWP 11243)):
#0  0x00007fffeff4e2f1 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#1  0x00007fffefcbac88 in dl_iterate_phdr ()
   from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fffeff4e896 in _Unwind_Find_FDE ()
   from /lib/x86_64-linux-gnu/libgcc_s.so.1
#3  0x00007fffeff4bd50 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#4  0x00007fffeff4c470 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#5  0x00007fffeff4ca47 in _Unwind_ForcedUnwind ()
   from /lib/x86_64-linux-gnu/libgcc_s.so.1
#6  0x00007ffff0fa29e0 in __pthread_unwind ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff0f9a74a in sigcancel_handler ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#8  <signal handler called>
#9  0x00007fffefc4b51d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x00007fffefc79154 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x00007fffb41f0f4b in LinuxSampler::DiskThreadBase<sfz::Region, LinuxSampler::sfz::InstrumentResourceManager>::Main (this=0x7db6a70)
    at ../common/DiskThreadBase.h:515
#12 0x00007fffb4273bf4 in LinuxSampler::__pthread_launcher (thread=0x7db6a70)
    at Thread.cpp:398
---Type <return> to continue, or q <return> to quit---
#13 0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#14 0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x0000000000000000 in ?? ()

Thread 91 (Thread 0x7fffd4fca700 (LWP 11242)):
#0  0x00007fffb41ea3f0 in LinuxSampler::sfz::InstrumentResourceManager::Create
    (this=<optimized out>, Key=..., pConsumer=0x7fffb2ecd548, 
    pArg=@0x7fffd4fc9920) at InstrumentResourceManager.cpp:150
#1  0x00007fffb41f26eb in Borrow (bLock=true, pConsumer=0x7fffb2ecd548, Key=access outside bounds of object referenced via synthetic pointer
)
    at ../../common/ResourceManager.h:216
#2  LinuxSampler::sfz::EngineChannel::LoadInstrument (this=0x7fffb2eccee0)
    at EngineChannel.cpp:108
#3  0x00007fffb421de32 in LinuxSampler::InstrumentManagerThread::Main (
    this=0x7fffb44e3180) at InstrumentManagerThread.cpp:119
#4  0x00007fffb4273bf4 in LinuxSampler::__pthread_launcher (
    thread=0x7fffb44e3180) at Thread.cpp:398
#5  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 85 (Thread 0x7fffd5efe700 (LWP 11236)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007fffefc4b51d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffefc4b3bc in sleep () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fffb422c43a in LinuxSampler::EventThread::Main (this=0x7fffd00f33c0)
    at Plugin.cpp:91
#3  0x00007fffb4273bf4 in LinuxSampler::__pthread_launcher (
    thread=0x7fffd00f33c0) at Thread.cpp:398
#4  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 84 (Thread 0x7fffd5f7f700 (LWP 11235)):
#0  0x00007fffefc78913 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffb4183eb3 in LinuxSampler::LSCPServer::Main (this=0x7c31e80)
    at lscpserver.cpp:534
#2  0x00007fffb4273bf4 in LinuxSampler::__pthread_launcher (thread=0x7c31e80)
    at Thread.cpp:398
#3  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 83 (Thread 0x7fffaaff5700 (LWP 11234)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007ffff0fa03cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb516f832 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb4f6a143 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb516f71d in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 81 (Thread 0x7fffa9ff3700 (LWP 11232)):
#0  0x00007ffff0fa004c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb516f867 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb4e867ac in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb4e86a69 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007fffb516f71d in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#5  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 66 (Thread 0x7fffd6e3f700 (LWP 11216)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007ffff0fa03cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb50935ce in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb51158f5 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb50d0080 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007fffb50d0201 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#5  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 65 (Thread 0x7fffd7e41700 (LWP 11215)):
#0  0x00007ffff0fa38dd in nanosleep ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb5092efe in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb515d164 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb4fea612 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007fffb50d0080 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#5  0x00007fffb50d0201 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#6  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---

Thread 64 (Thread 0x7fffd5e3d700 (LWP 11214)):
#0  0x00007fffefc73773 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff4106f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff4107792 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff4fa1bff in BaseUI::main_thread (this=0x45ab380)
    at ../libs/pbd/base_ui.cc:77
#4  0x00007ffff4fa2fa3 in sigc::bound_mem_functor0<void, BaseUI>::operator() (
    this=0x45ab9d8) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#5  0x00007ffff4fa2e08 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, BaseUI> >::operator() (this=0x45ab9d0)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#6  0x00007ffff4fa2b79 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, BaseUI>, void>::call_it (rep=0x45ab9a0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#7  0x00007ffff4a50b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#8  0x00007ffff412c2b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

---Type <return> to continue, or q <return> to quit---
Thread 63 (Thread 0x7fffd64bc820 (LWP 11213)):
#0  0x00007fffefc73773 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6e5bfff in ARDOUR::Butler::thread_work (this=0x4490f50)
    at ../libs/ardour/butler.cc:153
#2  0x00007ffff6e5bf59 in ARDOUR::Butler::_thread_work (arg=0x4490f50)
    at ../libs/ardour/butler.cc:137
#3  0x00007ffff4fd7a3c in fake_thread_start (arg=0x4540530)
    at ../libs/pbd/pthread_utils.cc:81
#4  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 62 (Thread 0x7fffd653e700 (LWP 11212)):
#0  0x00007ffff0fa2300 in sem_wait ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff6f3b28e in PBD::ProcessSemaphore::wait (this=0x44925e8)
    at /home/lsd/ardour3/3.0/libs/pbd/pbd/semutils.h:41
#2  0x00007ffff6f39be0 in ARDOUR::Graph::main_thread (this=0x4492500)
    at ../libs/ardour/graph.cc:459
#3  0x00007ffff6f3f410 in boost::_mfi::mf0<void, ARDOUR::Graph>::operator() (
    this=0x7fffd653dbc8, p=0x4492500)
    at /usr/include/boost/bind/mem_fn_template.hpp:49
---Type <return> to continue, or q <return> to quit---
#4  0x00007ffff6f3ee1c in boost::_bi::list1<boost::_bi::value<ARDOUR::Graph*> >::operator()<boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list0> (
    this=0x7fffd653dbd8, f=..., a=...) at /usr/include/boost/bind/bind.hpp:253
#5  0x00007ffff6f3e9c7 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list1<boost::_bi::value<ARDOUR::Graph*> > >::operator() (
    this=0x7fffd653dbc8) at /usr/include/boost/bind/bind_template.hpp:20
#6  0x00007ffff6f3e49b 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 /usr/include/boost/function/function_template.hpp:153
#7  0x00000000013265fa in boost::function0<void>::operator() (
    this=0x7fffd653dbc0)
    at /usr/include/boost/function/function_template.hpp:1013
#8  0x00007ffff6de1f39 in ARDOUR::AudioEngine::_start_process_thread (
    arg=0x44a2990) at ../libs/ardour/audioengine.cc:1476
#9  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 61 (Thread 0x7fffe00f6700 (LWP 11211)):
#0  0x00007fffefc73773 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff11b9756 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
---Type <return> to continue, or q <return> to quit---
#2  0x00007ffff11b9ada in jack_cycle_wait ()
   from /usr/lib/x86_64-linux-gnu/libjack.so.0
#3  0x00007ffff6dde39a in ARDOUR::AudioEngine::process_thread (this=0x2bfdf00)
    at ../libs/ardour/audioengine.cc:441
#4  0x00007ffff6ddddd4 in ARDOUR::AudioEngine::_process_thread (arg=0x2bfdf00)
    at ../libs/ardour/audioengine.cc:352
#5  0x00007ffff11b99d2 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#6  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7fffd7640700 (LWP 11161)):
#0  0x00007ffff0fa004c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff11baf93 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#2  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#3  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fffdbfff700 (LWP 11151)):
#0  0x00007ffff0fa004c in pthread_cond_wait@@GLIBC_2.3.2 ()
---Type <return> to continue, or q <return> to quit---
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff6d7087d in ARDOUR::Analyser::work ()
    at ../libs/ardour/analyser.cc:85
#2  0x00007ffff6d70615 in analyser_work () at ../libs/ardour/analyser.cc:49
#3  0x00000000018c149b in sigc::pointer_functor0<void>::operator() (
    this=0x27d6e98) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
#4  0x00000000018bee3e in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator() (this=0x27d6e90)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#5  0x00000000018bc005 in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it (rep=0x27d6e60)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#6  0x00007ffff4a50b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#7  0x00007ffff412c2b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fffe22a5700 (LWP 11150)):
#0  0x00007ffff0fa004c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff7216ded in peak_thread_work ()
---Type <return> to continue, or q <return> to quit---
    at ../libs/ardour/source_factory.cc:68
#2  0x00000000018c149b in sigc::pointer_functor0<void>::operator() (
    this=0x27d5358) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
#3  0x00000000018bee3e in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator() (this=0x27d5350)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#4  0x00000000018bc005 in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it (rep=0x27d5320)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#5  0x00007ffff4a50b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#6  0x00007ffff412c2b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fffe2aa6700 (LWP 11149)):
#0  0x00007ffff0fa004c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff7216ded in peak_thread_work ()
    at ../libs/ardour/source_factory.cc:68
#2  0x00000000018c149b in sigc::pointer_functor0<void>::operator() (
    this=0x27d7b18) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
---Type <return> to continue, or q <return> to quit---
#3  0x00000000018bee3e in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator() (this=0x27d7b10)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#4  0x00000000018bc005 in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it (rep=0x27d7ae0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#5  0x00007ffff4a50b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#6  0x00007ffff412c2b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fffe32a7700 (LWP 11148)):
#0  0x00007fffefc4b51d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffefc79154 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff725128a in gui_event_loop (ptr=0x0)
    at ../libs/ardour/vstfxwin.cc:382
#3  0x00007ffff0f9befc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007fffefc7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

---Type <return> to continue, or q <return> to quit---
Thread 1 (Thread 0x7ffff7f9a9e0 (LWP 11145)):
#0  0x00007ffff0fa004c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb427303d in LinuxSampler::Condition::WaitIf (this=0x7db6ac0, 
    bCondition=true, TimeoutSeconds=0, TimeoutNanoSeconds=0)
    at Condition.cpp:299
#2  0x00007fffb4273b94 in LinuxSampler::Thread::StopThread (this=0x7db6a70)
    at Thread.cpp:197
#3  0x00007fffb41f7ce1 in LinuxSampler::EngineBase<LinuxSampler::sfz::Voice, sfz::Region, sfz::Region, LinuxSampler::sfz::DiskThread, LinuxSampler::sfz::InstrumentResourceManager, sfz::Instrument>::~EngineBase (this=0x7fffb30950a0, 
    __in_chrg=<optimized out>) at ../EngineBase.h:77
#4  0x00007fffb41f6179 in LinuxSampler::sfz::Engine::~Engine (
    this=0x7fffb30950a0, __in_chrg=<optimized out>) at Engine.cpp:50
#5  0x00007fffb4213611 in LinuxSampler::AbstractEngine::FreeEngine (pChannel=
    0x7fffb2eccee0, pDevice=0x7fffb3094d10) at AbstractEngine.cpp:115
#6  0x00007fffb41f40c2 in LinuxSampler::EngineChannelBase<LinuxSampler::sfz::Voice, sfz::Region, sfz::Instrument>::DisconnectAudioOutputDevice (
    this=0x7fffb2eccee0) at ../EngineChannelBase.h:196
#7  0x00007fffb4136881 in LinuxSampler::SamplerChannel::~SamplerChannel (
    this=0x7fff9cd2ccb0, __in_chrg=<optimized out>) at Sampler.cpp:61
#8  0x00007fffb4136939 in LinuxSampler::SamplerChannel::~SamplerChannel (
    this=0x7fff9cd2ccb0, __in_chrg=<optimized out>) at Sampler.cpp:69
---Type <return> to continue, or q <return> to quit---
#9  0x00007fffb4137e40 in LinuxSampler::Sampler::RemoveSamplerChannel (
    this=0x7c31ce0, pSamplerChannel=0x7fff9cd2ccb0) at Sampler.cpp:528
#10 0x00007fffb422c660 in LinuxSampler::Plugin::RemoveChannels (this=0x7c31670)
    at Plugin.cpp:291
#11 0x00007fffb422d53c in LinuxSampler::Plugin::SetState (this=0x7c31670, 
    State=...) at Plugin.cpp:297
#12 0x00007fffd5f828e5 in (anonymous namespace)::PluginLv2::Restore (
    this=0x7c31670, retrieve=<optimized out>, handle=<optimized out>)
    at PluginLv2.cpp:177
#13 0x00007ffff72434f3 in ARDOUR::LV2Plugin::set_state (this=0x7c2c4f0, 
    node=..., version=3000) at ../libs/ardour/lv2_plugin_lilv.cc:788
#14 0x00007ffff706a930 in ARDOUR::PluginInsert::set_state (this=0x7c299f0, 
    node=..., version=3000) at ../libs/ardour/plugin_insert.cc:1007
#15 0x00007ffff70cb1f8 in ARDOUR::Route::set_processor_state (this=0x7c03830, 
    node=...) at ../libs/ardour/route.cc:2372
#16 0x00007ffff70c80d7 in ARDOUR::Route::_set_state (this=0x7c03830, node=..., 
    version=3000) at ../libs/ardour/route.cc:1925
#17 0x00007ffff7235c63 in ARDOUR::Track::_set_state (this=0x7c03830, node=..., 
    version=3000) at ../libs/ardour/track.cc:94
#18 0x00007ffff6fec0bb in ARDOUR::MidiTrack::_set_state (this=0x7c03830, 
    node=..., version=3000) at ../libs/ardour/midi_track.cc:147
#19 0x00007ffff6fec079 in ARDOUR::MidiTrack::set_state (this=0x7c03830, 
    node=..., version=3000) at ../libs/ardour/midi_track.cc:139
---Type <return> to continue, or q <return> to quit---
#20 0x00007ffff71ae018 in ARDOUR::Session::XMLRouteFactory (this=0x4489000, 
    node=..., version=3000) at ../libs/ardour/session_state.cc:1498
#21 0x00007ffff71ada63 in ARDOUR::Session::load_routes (this=0x4489000, 
    node=..., version=3000) at ../libs/ardour/session_state.cc:1446
#22 0x00007ffff71ad0cd in ARDOUR::Session::set_state (this=0x4489000, 
    node=..., version=3000) at ../libs/ardour/session_state.cc:1376
#23 0x00007ffff71a5c24 in ARDOUR::Session::second_stage_init (this=0x4489000)
    at ../libs/ardour/session_state.cc:320
#24 0x00007ffff710a525 in ARDOUR::Session::Session (this=0x4489000, eng=..., 
    fullpath=..., snapshot_name=..., bus_profile=0x0, mix_template=...)
    at ../libs/ardour/session.cc:194
#25 0x00000000012e913a in ARDOUR_UI::load_session (this=0x25774f0, path=..., 
    snap_name=..., mix_template=...) at ../gtk2_ardour/ardour_ui.cc:2804
#26 0x00000000012e8b2d in ARDOUR_UI::get_session_parameters (this=0x25774f0, 
    quit_on_cancel=true, should_be_new=false, load_template=...)
    at ../gtk2_ardour/ardour_ui.cc:2739
#27 0x00000000012df9d9 in ARDOUR_UI::startup (this=0x25774f0)
    at ../gtk2_ardour/ardour_ui.cc:714
#28 0x000000000130c1f9 in sigc::bound_mem_functor0<void, ARDOUR_UI>::operator()
    (this=0x2a3fcf8) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#29 0x00000000013066e2 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, ARDOUR_UI> >::operator() (this=0x2a3fcf0)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
---Type <return> to continue, or q <return> to quit---
#30 0x0000000001300a81 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, ARDOUR_UI>, void>::call_it (rep=0x2a3fcc0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#31 0x00000000012c7ad1 in sigc::internal::signal_emit0<void, sigc::nil>::emit (
    impl=0x2a1ea10) at /usr/include/sigc++-2.0/sigc++/signal.h:776
#32 0x00000000012c97a2 in sigc::signal0<void, sigc::nil>::emit (this=0x25775b0)
    at /usr/include/sigc++-2.0/sigc++/signal.h:2673
#33 0x00000000012c8ada in sigc::signal0<void, sigc::nil>::operator() (
    this=0x25775b0) at /usr/include/sigc++-2.0/sigc++/signal.h:2681
#34 0x00007ffff5429150 in Gtkmm2ext::UI::run (this=0x25774f0, old_receiver=...)
    at ../libs/gtkmm2ext/gtk_ui.cc:266
#35 0x000000000171f4c6 in main (argc=1, argv=0x7fffffffdba8)
    at ../gtk2_ardour/main.cc:557
(gdb) 

pneuman

2011-11-13 02:20

reporter   ~0011979

After updating to the latest SVN LinuxSampler code, I appear to be having the same problem. It's not always reproducible for me, though -- I have had it load successfully on occasion.

I've built LinuxSampler with drobilla's patch applied in order to get its LV2 plugin to work with the updated persist/state extension.

Here's some relevant debug output from just before the crash; note that I only have one LinuxSampler plugin and instrument here, so I'm not sure why it appears to be loading twice:

Done LV2 discovery
Multi-core: got real-time scheduling with priority 65
Starting disk thread...OK
LV2 state path /home/lsd/music/ardour/PianoPlaypen/plugins/1668.rdff
Loading LV2 state from /home/lsd/music/ardour/PianoPlaypen/plugins/1668.rdff
Stopping disk thread...OK
Starting disk thread...OK
Scheduling '/home/lsd/music/samples/linuxsampler/epianos/jrhodes/jRhodes3.sfz' (Index=0) to be loaded in background (if not loaded yet).
Loading sfz file '/home/lsd/music/samples/linuxsampler/epianos/jrhodes/jRhodes3.sfz'...LV2 state path /home/lsd/music/ardour/PianoPlaypen/plugins/1668.rdff
Loading LV2 state from /home/lsd/music/ardour/PianoPlaypen/plugins/1668.rdff
OK
Loading sfz instrument ('/home/lsd/music/samples/linuxsampler/epianos/jrhodes/jRhodes3.sfz',0)...OK
Caching initial samples...Stopping disk thread...OK
Starting disk thread...OK
Scheduling '/home/lsd/music/samples/linuxsampler/epianos/jrhodes/jRhodes3.sfz' (Index=0) to be loaded in background (if not loaded yet).

2011-11-14 14:09

 

linuxsampler-patch-2.patch (19,624 bytes)
Index: src/hostplugins/lv2/lv2_persist.h
===================================================================
--- src/hostplugins/lv2/lv2_persist.h	(revision 2283)
+++ src/hostplugins/lv2/lv2_persist.h	(working copy)
@@ -1,228 +0,0 @@
-/*
-  Copyright 2010-2011 David Robillard <http://drobilla.net>
-  Copyright 2010 Leonard Ritter <paniq@paniq.org>
-
-  This header is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This header is distributed in the hope that it will be useful, but WITHOUT
-  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-  License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with this header; if not, write to the Free Software Foundation,
-  Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
-*/
-
-/**
-   @file
-   C API for the LV2 Persist extension <http://lv2plug.in/ns/ext/persist>.
-*/
-
-#ifndef LV2_PERSIST_H
-#define LV2_PERSIST_H
-
-#include <stdbool.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LV2_PERSIST_URI "http://lv2plug.in/ns/ext/persist"
-
-/**
-   Flags describing value characteristics.
-
-   These flags are used along with the value's type URI to determine how to
-   (de-)serialise the value data, or whether it is even possible to do so.
-*/
-typedef enum {
-
-	/**
-	   Plain Old Data.
-
-	   Values with this flag contain no references to non-persistent or
-	   non-global resources (e.g. pointers, handles, local paths, etc.). It is
-	   safe to copy POD values with a simple memcpy and store them for use at
-	   any time in the future on a machine with a compatible architecture
-	   (e.g. the same endianness and alignment).
-
-	   Implementations MUST NOT attempt to copy or serialise a non-POD value if
-	   they do not understand its type (and thus know how to correctly do so).
-	*/
-	LV2_PERSIST_IS_POD = 1,
-
-	/**
-	   Portable (architecture independent) data.
-
-	   Values with this flag are in a format that is usable on any
-	   architecture, i.e. if the value is saved on one machine it can safely be
-	   restored on another machine regardless of endianness, alignment, etc.
-	*/
-	LV2_PERSIST_IS_PORTABLE = 1 << 1
-
-} LV2_Persist_Flags;
-
-/**
-   A host-provided function to store a property.
-   @param callback_data Must be the callback_data passed to LV2_Persist.save().
-   @param key The key (predicate) to store @a value under (URI mapped integer).
-   @param value Pointer to the value (object) to be stored.
-   @param size The size of the data at @a value in bytes.
-   @param type The type of @a value (URI).
-   @param flags LV2_Persist_Flags for @a value.
-   @return 0 on success, otherwise a non-zero error code.
-
-   The host passes a callback of this type to LV2_Persist.save(). This callback
-   is called repeatedly by the plugin within LV2_Persist.save() to store all
-   the statements that describe its current state.
-
-   The host MAY fail to store a property if the type is not understood and is
-   not LV2_PERSIST_IS_POD and/or LV2_PERSIST_IS_PORTABLE. Implementations are
-   encouraged to use POD and portable values (e.g. string literals) wherever
-   possible, and use common types (e.g. types from
-   http://lv2plug.in/ns/ext/atom) regardless, since hosts are likely to already
-   contain the necessary implementation.
-
-   Note that @a size MUST be > 0, and @a value MUST point to a valid region of
-   memory @a size bytes long (this is required to make restore unambiguous).
-
-   The plugin MUST NOT attempt to use this function outside of the
-   LV2_Persist.restore() context.
-*/
-typedef int (*LV2_Persist_Store_Function)(
-	void*       callback_data,
-	uint32_t    key,
-	const void* value,
-	size_t      size,
-	uint32_t    type,
-	uint32_t    flags);
-
-/**
-   A host-provided function to retrieve a property.
-   @param callback_data Must be the callback_data passed to LV2_Persist.restore().
-   @param key The key (predicate) of the property to retrieve (URI).
-   @param size (Output) If non-NULL, set to the size of the restored value.
-   @param type (Output) If non-NULL, set to the type of the restored value.
-   @param flags (Output) If non-NULL, set to the LV2_Persist_Flags for
-   the returned value.
-   @return A pointer to the restored value (object), or NULL if no value
-   has been stored under @a key.
-
-   A callback of this type is passed by the host to LV2_Persist.restore(). This
-   callback is called repeatedly by the plugin within LV2_Persist.restore() to
-   retrieve any properties it requires to restore its state.
-
-   The returned value MUST remain valid until LV2_Persist.restore() returns.
-
-   The plugin MUST NOT attempt to use this function, or any value returned from
-   it, outside of the LV2_Persist.restore() context. Returned values MAY be
-   copied for later use if necessary, assuming the plugin knows how to do so
-   correctly (e.g. the value is POD, or the plugin understands the type).
-*/
-typedef const void* (*LV2_Persist_Retrieve_Function)(
-	void*     callback_data,
-	uint32_t  key,
-	size_t*   size,
-	uint32_t* type,
-	uint32_t* flags);
-
-/**
-   Persist Extension Data.
-
-   When the plugin's extension_data is called with argument LV2_PERSIST_URI,
-   the plugin MUST return an LV2_Persist structure, which remains valid for the
-   lifetime of the plugin.
-
-   The host can use the contained function pointers to save and restore the
-   state of a plugin instance at any time (provided the threading restrictions
-   for the given function are met).
-
-   The typical use case is to save the plugin's state when a project is saved,
-   and to restore the state when a project has been loaded. Other uses are
-   possible (e.g. cloning plugin instances or taking a snapshot of plugin
-   state).
-
-   Stored data is only guaranteed to be compatible between instances of plugins
-   with the same URI (i.e. if a change to a plugin would cause a fatal error
-   when restoring state saved by a previous version of that plugin, the plugin
-   URI MUST change just as it must when ports change incompatibly). Plugin
-   authors should consider this possibility, and always store sensible data
-   with meaningful types to avoid such compatibility issues in the future.
-*/
-typedef struct _LV2_Persist {
-
-	/**
-	   Save plugin state using a host-provided @a store callback.
-
-	   @param instance The instance handle of the plugin.
-	   @param store The host-provided store callback.
-	   @param callback_data	An opaque pointer to host data, e.g. the map or
-	   file where the values are to be stored. If @a store is called,
-	   this MUST be passed as its callback_data parameter.
-
-	   The plugin is expected to store everything necessary to completely
-	   restore its state later (possibly much later, in a different process, on
-	   a completely different machine, etc.)
-
-	   The @a callback_data pointer and @a store function MUST NOT be used
-	   beyond the scope of save().
-
-	   This function has its own special threading class: it may not be called
-	   concurrently with any "Instantiation" function, but it may be called
-	   concurrently with functions in any other class, unless the definition of
-	   that class prohibits it (e.g. it may not be called concurrently with a
-	   "Discovery" function, but it may be called concurrently with an "Audio"
-	   function. The plugin is responsible for any locking or lock-free
-	   techniques necessary to make this possible.
-
-	   Note that in the simple case where state is only modified by restore(),
-	   there are no synchronization issues since save() is never called
-	   concurrently with restore() (though run() may read it during a save).
-
-	   Plugins that dynamically modify state while running, however, must take
-	   care to do so in such a way that a concurrent call to save() will save a
-	   consistent representation of plugin state for a single instant in time.
-	*/
-	void (*save)(LV2_Handle                 instance,
-	             LV2_Persist_Store_Function store,
-	             void*                      callback_data);
-
-	/**
-	   Restore plugin state using a host-provided @a retrieve callback.
-
-	   @param instance The instance handle of the plugin.
-	   @param retrieve The host-provided retrieve callback.
-	   @param callback_data	An opaque pointer to host data, e.g. the map or
-	   file from which the values are to be restored. If @a retrieve is
-	   called, this MUST be passed as its callback_data parameter.
-
-	   The plugin MAY assume a restored value was set by a previous call to
-	   LV2_Persist.save() by a plugin with the same URI.
-
-	   The plugin MUST gracefully fall back to a default value when a value can
-	   not be retrieved. This allows the host to reset the plugin state with an
-	   empty map.
-
-	   The @a callback_data pointer and @a store function MUST NOT be used
-	   beyond the scope of restore().
-
-	   This function is in the "Instantiation" threading class as defined by
-	   LV2. This means it MUST NOT be called concurrently with any other
-	   function on the same plugin instance.
-	*/
-	void (*restore)(LV2_Handle                    instance,
-	                LV2_Persist_Retrieve_Function retrieve,
-	                void*                         callback_data);
-
-} LV2_Persist;
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* LV2_PERSIST_H */
Index: src/hostplugins/lv2/PluginLv2.cpp
===================================================================
--- src/hostplugins/lv2/PluginLv2.cpp	(revision 2283)
+++ src/hostplugins/lv2/PluginLv2.cpp	(working copy)
@@ -124,7 +124,7 @@
         return path;
     }
 
-    void PluginLv2::Save(LV2_Persist_Store_Function store, void* host_data) {
+    void PluginLv2::Save(LV2_State_Store_Function store, LV2_State_Handle handle) {
         if (NewFileSupport) {
             char* path = NewFileSupport->new_file_path(PathSupport->host_data,
                                                        "linuxsampler");
@@ -135,35 +135,35 @@
 
             const String abstract_path = PathToState(path);
 
-            store(host_data,
+            store(handle,
                   uri_to_id(NULL, NS_LS "state-file"),
                   abstract_path.c_str(),
                   abstract_path.length() + 1,
                   uri_to_id(NULL, LV2_FILES_URI "#AbstractPath"),
-                  LV2_PERSIST_IS_PORTABLE);
+                  LV2_STATE_IS_PORTABLE);
         } else {
             dmsg(2, ("saving to string\n"));
 
             std::ostringstream out;
             out << GetState();
 
-            store(host_data,
+            store(handle,
                   uri_to_id(NULL, NS_LS "state-string"),
                   out.str().c_str(),
                   out.str().length() + 1,
                   uri_to_id(NULL, NS_ATOM "String"),
-                  LV2_PERSIST_IS_POD | LV2_PERSIST_IS_PORTABLE);
+                  LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
         }
         dmsg(2, ("saving done\n"));
     }
 
-    void PluginLv2::Restore(LV2_Persist_Retrieve_Function retrieve, void* data) {
+    void PluginLv2::Restore(LV2_State_Retrieve_Function retrieve, LV2_State_Handle handle) {
         size_t   size;
         uint32_t type;
         uint32_t flags;
 
         const void* value = retrieve(
-            data,
+            handle,
             uri_to_id(NULL, NS_LS "state-file"),
             &size, &type, &flags);
 
@@ -179,7 +179,7 @@
         }
 
         value = retrieve(
-                data,
+                handle,
                 uri_to_id(NULL, NS_LS "state-string"),
                 &size, &type, &flags);
         if (value) {
@@ -221,12 +221,14 @@
         delete static_cast<PluginLv2*>(instance);
     }
 
-    void save(LV2_Handle handle, LV2_Persist_Store_Function store, void* callback_data) {
-	    return static_cast<PluginLv2*>(handle)->Save(store, callback_data);
+    void save(LV2_Handle handle, LV2_State_Store_Function store, LV2_State_Handle state,
+              uint32_t flags, const LV2_Feature* const* features) {
+        return static_cast<PluginLv2*>(handle)->Save(store, state);
     }
 
-    void restore(LV2_Handle handle, LV2_Persist_Retrieve_Function store, void* callback_data) {
-        return static_cast<PluginLv2*>(handle)->Restore(store, callback_data);
+    void restore(LV2_Handle handle, LV2_State_Retrieve_Function retrieve, LV2_State_Handle state,
+                 uint32_t flags, const LV2_Feature* const* features) {
+        return static_cast<PluginLv2*>(handle)->Restore(retrieve, state);
     }
 
     PluginInfo PluginInfo::Instance;
@@ -240,15 +242,15 @@
         Lv2.instantiate = instantiate;
         Lv2.run = run;
         Lv2.extension_data = extension_data;
-        Persist.save = save;
-        Persist.restore = restore;
+        StateInterface.save = save;
+        StateInterface.restore = restore;
     }
 
 
     const void* extension_data(const char* uri) {
         dmsg(2, ("linuxsampler: extension_data %s\n", uri));
-        if (strcmp(uri, LV2_PERSIST_URI) == 0) {
-            return PluginInfo::Lv2PersistDescriptor();
+        if (strcmp(uri, LV2_STATE_URI "#Interface") == 0) {
+            return PluginInfo::Lv2StateInterface();
         }
         return 0;
     }
Index: src/hostplugins/lv2/linuxsampler.ttl
===================================================================
--- src/hostplugins/lv2/linuxsampler.ttl	(revision 2283)
+++ src/hostplugins/lv2/linuxsampler.ttl	(working copy)
@@ -8,7 +8,7 @@
     doap:name "LinuxSampler" ;
     doap:license <http://linuxsampler.org/downloads.html#exception> ;
     lv2:optionalFeature lv2:hardRtCapable ;
-    lv2:optionalFeature <http://lv2plug.in/ns/ext/persist> ;
+    lv2:extensionData <http://lv2plug.in/ns/ext/state#Interface> ;
     lv2:optionalFeature <http://lv2plug.in/ns/ext/files#pathSupport> ;
     lv2:optionalFeature <http://lv2plug.in/ns/ext/files#newFileSupport> ;
     lv2:optionalFeature <http://lv2plug.in/ns/ext/uri-map> ;
Index: src/hostplugins/lv2/PluginLv2.h
===================================================================
--- src/hostplugins/lv2/PluginLv2.h	(revision 2283)
+++ src/hostplugins/lv2/PluginLv2.h	(working copy)
@@ -23,7 +23,7 @@
 
 #include <lv2.h>
 #include "lv2_event.h"
-#include "lv2_persist.h"
+#include "lv2_state.h"
 #include "lv2_uri_map.h"
 #include "lv2_files.h"
 #include "../../drivers/Plugin.h"
@@ -39,8 +39,8 @@
         void Activate();
         void Run(uint32_t SampleCount);
         void Deactivate();
-        void Save(LV2_Persist_Store_Function store, void* data);
-        void Restore(LV2_Persist_Retrieve_Function retrieve, void* data);
+        void Save(LV2_State_Store_Function store, void* data);
+        void Restore(LV2_State_Retrieve_Function retrieve, void* data);
 
 	protected:
         virtual String PathToState(const String& string);
@@ -65,12 +65,12 @@
         static const LV2_Descriptor* Lv2Descriptor() {
             return &Instance.Lv2;
         }
-        static const LV2_Persist* Lv2PersistDescriptor() {
-            return &Instance.Persist;
+        static const LV2_State_Interface* Lv2StateInterface() {
+            return &Instance.StateInterface;
         }
     private:
         LV2_Descriptor Lv2;
-        LV2_Persist Persist;
+        LV2_State_Interface StateInterface;
 
         PluginInfo();
         static PluginInfo Instance;
@@ -88,13 +88,13 @@
         static void cleanup(LV2_Handle instance);
         static const void* extension_data(const char* uri);
 
-        static void save(LV2_Handle                 handle,
-                         LV2_Persist_Store_Function store,
-                         void*                      data);
+        static void save(LV2_Handle               handle,
+                         LV2_State_Store_Function store,
+                         void*                    data);
 
-        static void restore(LV2_Handle                    handle,
-                            LV2_Persist_Retrieve_Function retrieve,
-                            void*                         data);
+        static void restore(LV2_Handle                  handle,
+                            LV2_State_Retrieve_Function retrieve,
+                            void*                       data);
     }
 }
 
Index: src/hostplugins/lv2/Makefile.am
===================================================================
--- src/hostplugins/lv2/Makefile.am	(revision 2283)
+++ src/hostplugins/lv2/Makefile.am	(working copy)
@@ -5,7 +5,7 @@
 plugin_DATA = manifest.ttl linuxsampler.ttl
 
 linuxsampler_la_SOURCES = PluginLv2.cpp PluginLv2.h \
-	lv2_event.h lv2_persist.h lv2_uri_map.h lv2_files.h
+	lv2_event.h lv2_state.h lv2_uri_map.h lv2_files.h
 linuxsampler_la_LDFLAGS = -module -avoid-version
 linuxsampler_la_LIBADD = $(top_builddir)/src/liblinuxsampler.la
 endif
Index: src/engines/sfz/InstrumentResourceManager.cpp
===================================================================
--- src/engines/sfz/InstrumentResourceManager.cpp	(revision 2283)
+++ src/engines/sfz/InstrumentResourceManager.cpp	(working copy)
@@ -146,8 +146,8 @@
 
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
+	Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+	AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         
         // and we save this to check if we need to reallocate for a engine with higher value of 'MaxSamplesPerSecond'
         pEntry->MaxSamplesPerCycle =
Index: src/engines/gig/InstrumentResourceManager.cpp
===================================================================
--- src/engines/gig/InstrumentResourceManager.cpp	(revision 2283)
+++ src/engines/gig/InstrumentResourceManager.cpp	(working copy)
@@ -604,9 +604,8 @@
 
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
-        
+        Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+        AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         // and we save this to check if we need to reallocate for a engine with higher value of 'MaxSamplesPerSecond'
         pEntry->MaxSamplesPerCycle =
             (pDevice) ? pDevice->MaxSamplesPerCycle() : DefaultMaxSamplesPerCycle();
@@ -628,8 +627,8 @@
         
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
+        Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+        AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         
         uint maxSamplesPerCycle =
             (pDevice) ? pDevice->MaxSamplesPerCycle() : DefaultMaxSamplesPerCycle();

cth103

2011-11-14 14:09

administrator   ~0011996

Last edited: 2011-11-14 14:09

Could you try replacing drobilla's patch with the attached one, to see if that makes any difference?

pneuman

2011-11-15 22:18

reporter   ~0012066

I've just tried your patch, against the latest LinuxSampler code and loading it in to Ardour 3 from the latest SVN code, and the problem persists. I'll attach an updated backtrace.

2011-11-15 22:18

 

ardour-linuxsampler-backtrace-2.txt (35,110 bytes)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd977d700 (LWP 2749)]
0x00007fffd98eb382 in LinuxSampler::sfz::InstrumentResourceManager::OnBorrow (
    this=0x7fffd9be2d20, pResource=0x1485e4f0, pConsumer=0x14858118, 
    pArg=<optimized out>) at InstrumentResourceManager.cpp:174
174	            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
(gdb) thread apply all bt

Thread 99 (Thread 0x7fffb3fff700 (LWP 2758)):
#0  0x00007ffff0c6c3cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff43be465 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
#2  0x00007ffff40df43f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff4132811 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 98 (Thread 0x7fffb0ff9700 (LWP 2757)):
#0  0x00007ffff0c6c3cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff43be465 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
#2  0x00007ffff40df43f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff4132811 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff0c67efc in start_thread ()
---Type <return> to continue, or q <return> to quit---
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 97 (Thread 0x7fffafff7700 (LWP 2756)):
#0  0x00007ffff0c6c3cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff43be465 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
#2  0x00007ffff40df43f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff4132811 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 96 (Thread 0x7fffb87f0700 (LWP 2755)):
#0  0x00007ffff0c6f8dd in nanosleep ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff41336d2 in g_usleep ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0

#2  0x00007ffff6de235a in ARDOUR::AudioEngine::meter_thread (this=0x2bff240)
---Type <return> to continue, or q <return> to quit---
    at ../libs/ardour/audioengine.cc:692
#3  0x00007ffff6e01df6 in boost::_mfi::mf0<void, ARDOUR::AudioEngine>::operator() (this=0xec64720, p=0x2bff240)
    at /usr/include/boost/bind/mem_fn_template.hpp:49
#4  0x00007ffff6dfd422 in boost::_bi::list1<boost::_bi::value<ARDOUR::AudioEngine*> >::operator()<boost::_mfi::mf0<void, ARDOUR::AudioEngine>, boost::_bi::list0> (this=0xec64730, f=..., a=...) at /usr/include/boost/bind/bind.hpp:253
#5  0x00007ffff6df8e6d in boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::AudioEngine>, boost::_bi::list1<boost::_bi::value<ARDOUR::AudioEngine*> > >::operator() (this=0xec64720) at /usr/include/boost/bind/bind_template.hpp:20
#6  0x00007ffff6df4112 in sigc::adaptor_functor<boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::AudioEngine>, boost::_bi::list1<boost::_bi::value<ARDOUR::AudioEngine*> > > >::operator() (this=0xec64720)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#7  0x00007ffff6defa6c in sigc::internal::slot_call0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::AudioEngine>, boost::_bi::list1<boost::_bi::value<ARDOUR::AudioEngine*> > >, void>::call_it (rep=0xec646f0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#8  0x00007ffff4a54b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#9  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
---Type <return> to continue, or q <return> to quit---
#12 0x0000000000000000 in ?? ()

Thread 95 (Thread 0x7fffaeff5700 (LWP 2754)):
#0  0x00007ffff0c6c3cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb937d832 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb9178143 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb937d71d in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 93 (Thread 0x7fffd809e700 (LWP 2752)):
#0  0x00007fffefa4b51d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffefa79154 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fffd98f0f4b in LinuxSampler::DiskThreadBase<sfz::Region, LinuxSampler::sfz::InstrumentResourceManager>::Main (this=0xf4defa0)
    at ../common/DiskThreadBase.h:515
#3  0x00007fffd9973bf4 in LinuxSampler::__pthread_launcher (thread=0xf4defa0)
    at Thread.cpp:398
#4  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#5  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 90 (Thread 0x7fffd977d700 (LWP 2749)):
#0  0x00007fffd98eb382 in LinuxSampler::sfz::InstrumentResourceManager::OnBorrow (this=0x7fffd9be2d20, pResource=0x1485e4f0, pConsumer=0x14858118, 
    pArg=<optimized out>) at InstrumentResourceManager.cpp:174
#1  0x00007fffd98f27c1 in Borrow (bLock=true, pConsumer=0x14858118, Key=access outside bounds of object referenced via synthetic pointer
)
    at ../../common/ResourceManager.h:226
#2  LinuxSampler::sfz::EngineChannel::LoadInstrument (this=0x14857ab0)
    at EngineChannel.cpp:108
#3  0x00007fffd991de32 in LinuxSampler::InstrumentManagerThread::Main (
    this=0x7fffd9be3180) at InstrumentManagerThread.cpp:119
#4  0x00007fffd9973bf4 in LinuxSampler::__pthread_launcher (
    thread=0x7fffd9be3180) at Thread.cpp:398
#5  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 84 (Thread 0x7fffdaf71700 (LWP 2743)):
#0  0x00007fffefa4b51d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffefa4b3bc in sleep () from /lib/x86_64-linux-gnu/libc.so.6
---Type <return> to continue, or q <return> to quit---
#2  0x00007fffd992c43a in LinuxSampler::EventThread::Main (this=0xec85630)
    at Plugin.cpp:91
#3  0x00007fffd9973bf4 in LinuxSampler::__pthread_launcher (thread=0xec85630)
    at Thread.cpp:398
#4  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 83 (Thread 0x7fffdaff2700 (LWP 2742)):
#0  0x00007fffefa78913 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffd9883eb3 in LinuxSampler::LSCPServer::Main (this=0xec84410)
    at lscpserver.cpp:534
#2  0x00007fffd9973bf4 in LinuxSampler::__pthread_launcher (thread=0xec84410)
    at Thread.cpp:398
#3  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 80 (Thread 0x7fffae7f4700 (LWP 2739)):
#0  0x00007ffff0c6c04c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#1  0x00007fffb937d867 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb90947ac in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb9094a69 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007fffb937d71d in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#5  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 65 (Thread 0x7fffdbeb2700 (LWP 2724)):
#0  0x00007ffff0c6c3cb in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb92a15ce in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb93238f5 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb92de080 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007fffb92de201 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#5  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 64 (Thread 0x7fffda6af700 (LWP 2723)):
#0  0x00007ffff0c6f8dd in nanosleep ()
---Type <return> to continue, or q <return> to quit---
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fffb92a0efe in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#2  0x00007fffb936b164 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#3  0x00007fffb91f8612 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#4  0x00007fffb92de080 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#5  0x00007fffb92de201 in ?? () from /usr/lib/lxvst/Pianoteq PLAY_x64.so
#6  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 63 (Thread 0x7fffaf7f6700 (LWP 2722)):
#0  0x00007fffefa73773 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff410af68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff410b792 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff4fa5c7f in BaseUI::main_thread (this=0x457a990)
    at ../libs/pbd/base_ui.cc:77
#4  0x00007ffff4fa7023 in sigc::bound_mem_functor0<void, BaseUI>::operator() (
    this=0x457afe8) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#5  0x00007ffff4fa6e88 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, BaseUI> >::operator() (this=0x457afe0)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
---Type <return> to continue, or q <return> to quit---
#6  0x00007ffff4fa6bf9 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, BaseUI>, void>::call_it (rep=0x457afb0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#7  0x00007ffff4a54b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#8  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 62 (Thread 0x7fffdb52f820 (LWP 2721)):
#0  0x00007fffefa73773 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6e5f1cf in ARDOUR::Butler::thread_work (this=0x445f5f0)
    at ../libs/ardour/butler.cc:153
#2  0x00007ffff6e5f129 in ARDOUR::Butler::_thread_work (arg=0x445f5f0)
    at ../libs/ardour/butler.cc:137
#3  0x00007ffff4fdbabc in fake_thread_start (arg=0x4513c50)
    at ../libs/pbd/pthread_utils.cc:81
#4  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

---Type <return> to continue, or q <return> to quit---
Thread 61 (Thread 0x7fffdb5b1700 (LWP 2720)):
#0  0x00007ffff0c6e300 in sem_wait ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff6f3e392 in PBD::ProcessSemaphore::wait (this=0x4460c88)
    at /home/lsd/ardour3/3.0/libs/pbd/pbd/semutils.h:41
#2  0x00007ffff6f3be7f in ARDOUR::Graph::restart_cycle (this=0x4460ba0)
    at ../libs/ardour/graph.cc:263
#3  0x00007ffff6f3be49 in ARDOUR::Graph::dec_ref (this=0x4460ba0)
    at ../libs/ardour/graph.cc:250
#4  0x00007ffff6f42bb6 in ARDOUR::GraphNode::finish (this=0x4573700, chain=1)
    at ../libs/ardour/graphnode.cc:71
#5  0x00007ffff6f3c9ff in ARDOUR::Graph::run_one (this=0x4460ba0)
    at ../libs/ardour/graph.cc:403
#6  0x00007ffff6f3ce98 in ARDOUR::Graph::main_thread (this=0x4460ba0)
    at ../libs/ardour/graph.cc:478
#7  0x00007ffff6f42514 in boost::_mfi::mf0<void, ARDOUR::Graph>::operator() (
    this=0x7fffdb5b0bc8, p=0x4460ba0)
    at /usr/include/boost/bind/mem_fn_template.hpp:49
#8  0x00007ffff6f41f20 in boost::_bi::list1<boost::_bi::value<ARDOUR::Graph*> >::operator()<boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list0> (
    this=0x7fffdb5b0bd8, f=..., a=...) at /usr/include/boost/bind/bind.hpp:253
#9  0x00007ffff6f41acb in boost::_bi::bind_t<void, boost::_mfi::mf0<void, ARDOUR::Graph>, boost::_bi::list1<boost::_bi::value<ARDOUR::Graph*> > >::operator() (
---Type <return> to continue, or q <return> to quit---
    this=0x7fffdb5b0bc8) at /usr/include/boost/bind/bind_template.hpp:20
#10 0x00007ffff6f4159f 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 /usr/include/boost/function/function_template.hpp:153
#11 0x0000000001348eac in boost::function0<void>::operator() (
    this=0x7fffdb5b0bc0)
    at /usr/include/boost/function/function_template.hpp:1013
#12 0x00007ffff6de5109 in ARDOUR::AudioEngine::_start_process_thread (
    arg=0x4471030) at ../libs/ardour/audioengine.cc:1476
#13 0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#14 0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x0000000000000000 in ?? ()

Thread 60 (Thread 0x7ffff7e81700 (LWP 2719)):
#0  0x00007fffefa73773 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff0e85756 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#2  0x00007ffff0e85ada in jack_cycle_wait ()
   from /usr/lib/x86_64-linux-gnu/libjack.so.0
#3  0x00007ffff6de156a in ARDOUR::AudioEngine::process_thread (this=0x2bff240)
    at ../libs/ardour/audioengine.cc:441
#4  0x00007ffff6de0fa4 in ARDOUR::AudioEngine::_process_thread (arg=0x2bff240)
---Type <return> to continue, or q <return> to quit---
    at ../libs/ardour/audioengine.cc:352
#5  0x00007ffff0e859d2 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#6  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7fffdaeb0700 (LWP 2668)):
#0  0x00007ffff0c6c04c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff0e86f93 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#2  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#3  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fffe1aa8700 (LWP 2659)):
#0  0x00007ffff0c6c04c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff6d73a4d in ARDOUR::Analyser::work ()
    at ../libs/ardour/analyser.cc:85
#2  0x00007ffff6d737e5 in analyser_work () at ../libs/ardour/analyser.cc:49

#3  0x00000000018ed01b in sigc::pointer_functor0<void>::operator() (
---Type <return> to continue, or q <return> to quit---
    this=0x2814718) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
#4  0x00000000018ea9be in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator() (this=0x2814710)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#5  0x00000000018e7b85 in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it (rep=0x28146e0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#6  0x00007ffff4a54b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#7  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fffe22a9700 (LWP 2658)):
#0  0x00007ffff0c6c04c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff7219f09 in peak_thread_work ()
    at ../libs/ardour/source_factory.cc:68
#2  0x00000000018ed01b in sigc::pointer_functor0<void>::operator() (
    this=0x2812778) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
#3  0x00000000018ea9be in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator() (this=0x2812770)
---Type <return> to continue, or q <return> to quit---
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#4  0x00000000018e7b85 in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it (rep=0x2812740)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#5  0x00007ffff4a54b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#6  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fffe2aaa700 (LWP 2657)):
#0  0x00007ffff0c6c04c in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff7219f09 in peak_thread_work ()
    at ../libs/ardour/source_factory.cc:68
#2  0x00000000018ed01b in sigc::pointer_functor0<void>::operator() (
    this=0x2814f38) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
#3  0x00000000018ea9be in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator() (this=0x2814f30)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#4  0x00000000018e7b85 in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it (rep=0x2814f00)
---Type <return> to continue, or q <return> to quit---
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#5  0x00007ffff4a54b3d in ?? () from /usr/lib/libglibmm-2.4.so.1
#6  0x00007ffff41302b6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fffe32ab700 (LWP 2656)):
#0  0x00007fffefa4b51d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffefa79154 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x0000000001b359cf in gui_event_loop (ptr=0x0)
    at ../gtk2_ardour/vstfxwin.cc:382
#3  0x00007ffff0c67efc in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007fffefa7f89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffff7f9a9e0 (LWP 2653)):
#0  0x00007ffff380b750 in gdk_region_new ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#1  0x00007ffff380b90b in gdk_region_copy ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#2  0x00007ffff381c1f1 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#3  0x00007ffff381cff3 in gdk_window_new ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#4  0x00007ffff3b4e58b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#5  0x00007ffff287be3d in Gtk::Widget_Class::realize_callback(_GtkWidget*) ()
   from /usr/lib/libgtkmm-2.4.so.1
#6  0x00007ffff47d50a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7  0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff3ce2ace in gtk_widget_realize ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#11 0x00007ffff3ce31b8 in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#12 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#13 0x00007ffff3b4321f in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x00007ffff3c49558 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#21 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#25 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#26 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#27 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#28 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#33 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#34 0x00007ffff3b5a7cb in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#35 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007ffff47e681a in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#38 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#39 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#40 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#41 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#42 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#43 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#44 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#45 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#46 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#47 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#48 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#49 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#50 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#51 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#52 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#53 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#54 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#55 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#56 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#57 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#58 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#59 0x00007ffff47f0852 in g_signal_emit ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#60 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#61 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#62 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#63 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#64 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#65 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#66 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#67 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#68 0x00007ffff3bb7d78 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#69 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#70 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#71 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#72 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#73 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#74 0x00007ffff3c49558 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#75 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#76 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#77 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#78 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#79 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#80 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#81 0x00007ffff3bee62f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#82 0x00007ffff3b4321f in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#83 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#84 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#85 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#86 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#87 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#88 0x00007ffff3bee62f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#89 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#90 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#91 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#92 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#93 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#94 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#95 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#96 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#97 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#98 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#99 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#100 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#101 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#102 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#103 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#104 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#105 0x00007ffff47e681a in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#106 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#107 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#108 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#109 0x00007ffff3b0e92b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#110 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#111 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#112 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#113 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#114 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#115 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#116 0x00007ffff3b0e95b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#117 0x00007ffff3b4321f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#118 0x00007ffff47d4ffa in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#119 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#120 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#121 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#122 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#123 0x00007ffff3cf480a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#124 0x00007ffff287bf7d in Gtk::Widget_Class::map_callback(_GtkWidget*) ()
   from /usr/lib/libgtkmm-2.4.so.1
#125 0x00007ffff47d50a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#126 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#127 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#128 0x00007ffff47f0852 in g_signal_emit ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#129 0x00007ffff3ce318e in gtk_widget_map ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#130 0x00007ffff3cecf30 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#131 0x00007ffff287c0bd in Gtk::Widget_Class::show_callback(_GtkWidget*) ()
   from /usr/lib/libgtkmm-2.4.so.1
#132 0x00007ffff47d50a4 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#133 0x00007ffff47e681a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#134 0x00007ffff47f06b1 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#135 0x00007ffff47f0852 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#136 0x00007ffff3ce3a86 in gtk_widget_show ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#137 0x00007ffff287c200 in Gtk::Widget_Class::show_all_vfunc_callback(_GtkWidget*) () from /usr/lib/libgtkmm-2.4.so.1
#138 0x00000000014a0df4 in Editor::show_window (this=0x3c22200)
    at ../gtk2_ardour/editor.cc:848
#139 0x0000000001359ebb in ARDOUR_UI::goto_editor_window (this=0x25b44f0)
    at ../gtk2_ardour/ardour_ui_dependents.cc:103
---Type <return> to continue, or q <return> to quit---
#140 0x000000000130bcd7 in ARDOUR_UI::load_session (this=0x25b44f0, path=..., 
    snap_name=..., mix_template=...) at ../gtk2_ardour/ardour_ui.cc:2892
#141 0x000000000130b3df in ARDOUR_UI::get_session_parameters (this=0x25b44f0, 
    quit_on_cancel=true, should_be_new=false, load_template=...)
    at ../gtk2_ardour/ardour_ui.cc:2745
#142 0x000000000130228b in ARDOUR_UI::startup (this=0x25b44f0)
    at ../gtk2_ardour/ardour_ui.cc:720
#143 0x000000000132eaab in sigc::bound_mem_functor0<void, ARDOUR_UI>::operator() (this=0x2a7fce8) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#144 0x0000000001328f94 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, ARDOUR_UI> >::operator() (this=0x2a7fce0)
    at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#145 0x0000000001323333 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, ARDOUR_UI>, void>::call_it (rep=0x2a7fcb0)
    at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#146 0x00000000012ea269 in sigc::internal::signal_emit0<void, sigc::nil>::emit
    (impl=0x26b2e50) at /usr/include/sigc++-2.0/sigc++/signal.h:776
#147 0x00000000012ebf3a in sigc::signal0<void, sigc::nil>::emit (
    this=0x25b45b0) at /usr/include/sigc++-2.0/sigc++/signal.h:2673
#148 0x00000000012eb272 in sigc::signal0<void, sigc::nil>::operator() (
    this=0x25b45b0) at /usr/include/sigc++-2.0/sigc++/signal.h:2681
#149 0x00007ffff542d0c0 in Gtkmm2ext::UI::run (this=0x25b44f0, old_receiver=
    ...) at ../libs/gtkmm2ext/gtk_ui.cc:266
---Type <return> to continue, or q <return> to quit---
#150 0x0000000001749611 in main (argc=1, argv=0x7fffffffdad8)
    at ../gtk2_ardour/main.cc:555

2011-11-15 22:44

 

linuxsampler-patch-3.patch (20,229 bytes)
Index: src/hostplugins/lv2/lv2_persist.h
===================================================================
--- src/hostplugins/lv2/lv2_persist.h	(revision 2283)
+++ src/hostplugins/lv2/lv2_persist.h	(working copy)
@@ -1,228 +0,0 @@
-/*
-  Copyright 2010-2011 David Robillard <http://drobilla.net>
-  Copyright 2010 Leonard Ritter <paniq@paniq.org>
-
-  This header is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This header is distributed in the hope that it will be useful, but WITHOUT
-  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-  License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with this header; if not, write to the Free Software Foundation,
-  Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
-*/
-
-/**
-   @file
-   C API for the LV2 Persist extension <http://lv2plug.in/ns/ext/persist>.
-*/
-
-#ifndef LV2_PERSIST_H
-#define LV2_PERSIST_H
-
-#include <stdbool.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LV2_PERSIST_URI "http://lv2plug.in/ns/ext/persist"
-
-/**
-   Flags describing value characteristics.
-
-   These flags are used along with the value's type URI to determine how to
-   (de-)serialise the value data, or whether it is even possible to do so.
-*/
-typedef enum {
-
-	/**
-	   Plain Old Data.
-
-	   Values with this flag contain no references to non-persistent or
-	   non-global resources (e.g. pointers, handles, local paths, etc.). It is
-	   safe to copy POD values with a simple memcpy and store them for use at
-	   any time in the future on a machine with a compatible architecture
-	   (e.g. the same endianness and alignment).
-
-	   Implementations MUST NOT attempt to copy or serialise a non-POD value if
-	   they do not understand its type (and thus know how to correctly do so).
-	*/
-	LV2_PERSIST_IS_POD = 1,
-
-	/**
-	   Portable (architecture independent) data.
-
-	   Values with this flag are in a format that is usable on any
-	   architecture, i.e. if the value is saved on one machine it can safely be
-	   restored on another machine regardless of endianness, alignment, etc.
-	*/
-	LV2_PERSIST_IS_PORTABLE = 1 << 1
-
-} LV2_Persist_Flags;
-
-/**
-   A host-provided function to store a property.
-   @param callback_data Must be the callback_data passed to LV2_Persist.save().
-   @param key The key (predicate) to store @a value under (URI mapped integer).
-   @param value Pointer to the value (object) to be stored.
-   @param size The size of the data at @a value in bytes.
-   @param type The type of @a value (URI).
-   @param flags LV2_Persist_Flags for @a value.
-   @return 0 on success, otherwise a non-zero error code.
-
-   The host passes a callback of this type to LV2_Persist.save(). This callback
-   is called repeatedly by the plugin within LV2_Persist.save() to store all
-   the statements that describe its current state.
-
-   The host MAY fail to store a property if the type is not understood and is
-   not LV2_PERSIST_IS_POD and/or LV2_PERSIST_IS_PORTABLE. Implementations are
-   encouraged to use POD and portable values (e.g. string literals) wherever
-   possible, and use common types (e.g. types from
-   http://lv2plug.in/ns/ext/atom) regardless, since hosts are likely to already
-   contain the necessary implementation.
-
-   Note that @a size MUST be > 0, and @a value MUST point to a valid region of
-   memory @a size bytes long (this is required to make restore unambiguous).
-
-   The plugin MUST NOT attempt to use this function outside of the
-   LV2_Persist.restore() context.
-*/
-typedef int (*LV2_Persist_Store_Function)(
-	void*       callback_data,
-	uint32_t    key,
-	const void* value,
-	size_t      size,
-	uint32_t    type,
-	uint32_t    flags);
-
-/**
-   A host-provided function to retrieve a property.
-   @param callback_data Must be the callback_data passed to LV2_Persist.restore().
-   @param key The key (predicate) of the property to retrieve (URI).
-   @param size (Output) If non-NULL, set to the size of the restored value.
-   @param type (Output) If non-NULL, set to the type of the restored value.
-   @param flags (Output) If non-NULL, set to the LV2_Persist_Flags for
-   the returned value.
-   @return A pointer to the restored value (object), or NULL if no value
-   has been stored under @a key.
-
-   A callback of this type is passed by the host to LV2_Persist.restore(). This
-   callback is called repeatedly by the plugin within LV2_Persist.restore() to
-   retrieve any properties it requires to restore its state.
-
-   The returned value MUST remain valid until LV2_Persist.restore() returns.
-
-   The plugin MUST NOT attempt to use this function, or any value returned from
-   it, outside of the LV2_Persist.restore() context. Returned values MAY be
-   copied for later use if necessary, assuming the plugin knows how to do so
-   correctly (e.g. the value is POD, or the plugin understands the type).
-*/
-typedef const void* (*LV2_Persist_Retrieve_Function)(
-	void*     callback_data,
-	uint32_t  key,
-	size_t*   size,
-	uint32_t* type,
-	uint32_t* flags);
-
-/**
-   Persist Extension Data.
-
-   When the plugin's extension_data is called with argument LV2_PERSIST_URI,
-   the plugin MUST return an LV2_Persist structure, which remains valid for the
-   lifetime of the plugin.
-
-   The host can use the contained function pointers to save and restore the
-   state of a plugin instance at any time (provided the threading restrictions
-   for the given function are met).
-
-   The typical use case is to save the plugin's state when a project is saved,
-   and to restore the state when a project has been loaded. Other uses are
-   possible (e.g. cloning plugin instances or taking a snapshot of plugin
-   state).
-
-   Stored data is only guaranteed to be compatible between instances of plugins
-   with the same URI (i.e. if a change to a plugin would cause a fatal error
-   when restoring state saved by a previous version of that plugin, the plugin
-   URI MUST change just as it must when ports change incompatibly). Plugin
-   authors should consider this possibility, and always store sensible data
-   with meaningful types to avoid such compatibility issues in the future.
-*/
-typedef struct _LV2_Persist {
-
-	/**
-	   Save plugin state using a host-provided @a store callback.
-
-	   @param instance The instance handle of the plugin.
-	   @param store The host-provided store callback.
-	   @param callback_data	An opaque pointer to host data, e.g. the map or
-	   file where the values are to be stored. If @a store is called,
-	   this MUST be passed as its callback_data parameter.
-
-	   The plugin is expected to store everything necessary to completely
-	   restore its state later (possibly much later, in a different process, on
-	   a completely different machine, etc.)
-
-	   The @a callback_data pointer and @a store function MUST NOT be used
-	   beyond the scope of save().
-
-	   This function has its own special threading class: it may not be called
-	   concurrently with any "Instantiation" function, but it may be called
-	   concurrently with functions in any other class, unless the definition of
-	   that class prohibits it (e.g. it may not be called concurrently with a
-	   "Discovery" function, but it may be called concurrently with an "Audio"
-	   function. The plugin is responsible for any locking or lock-free
-	   techniques necessary to make this possible.
-
-	   Note that in the simple case where state is only modified by restore(),
-	   there are no synchronization issues since save() is never called
-	   concurrently with restore() (though run() may read it during a save).
-
-	   Plugins that dynamically modify state while running, however, must take
-	   care to do so in such a way that a concurrent call to save() will save a
-	   consistent representation of plugin state for a single instant in time.
-	*/
-	void (*save)(LV2_Handle                 instance,
-	             LV2_Persist_Store_Function store,
-	             void*                      callback_data);
-
-	/**
-	   Restore plugin state using a host-provided @a retrieve callback.
-
-	   @param instance The instance handle of the plugin.
-	   @param retrieve The host-provided retrieve callback.
-	   @param callback_data	An opaque pointer to host data, e.g. the map or
-	   file from which the values are to be restored. If @a retrieve is
-	   called, this MUST be passed as its callback_data parameter.
-
-	   The plugin MAY assume a restored value was set by a previous call to
-	   LV2_Persist.save() by a plugin with the same URI.
-
-	   The plugin MUST gracefully fall back to a default value when a value can
-	   not be retrieved. This allows the host to reset the plugin state with an
-	   empty map.
-
-	   The @a callback_data pointer and @a store function MUST NOT be used
-	   beyond the scope of restore().
-
-	   This function is in the "Instantiation" threading class as defined by
-	   LV2. This means it MUST NOT be called concurrently with any other
-	   function on the same plugin instance.
-	*/
-	void (*restore)(LV2_Handle                    instance,
-	                LV2_Persist_Retrieve_Function retrieve,
-	                void*                         callback_data);
-
-} LV2_Persist;
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* LV2_PERSIST_H */
Index: src/hostplugins/lv2/PluginLv2.cpp
===================================================================
--- src/hostplugins/lv2/PluginLv2.cpp	(revision 2283)
+++ src/hostplugins/lv2/PluginLv2.cpp	(working copy)
@@ -124,7 +124,7 @@
         return path;
     }
 
-    void PluginLv2::Save(LV2_Persist_Store_Function store, void* host_data) {
+    void PluginLv2::Save(LV2_State_Store_Function store, LV2_State_Handle handle) {
         if (NewFileSupport) {
             char* path = NewFileSupport->new_file_path(PathSupport->host_data,
                                                        "linuxsampler");
@@ -135,35 +135,35 @@
 
             const String abstract_path = PathToState(path);
 
-            store(host_data,
+            store(handle,
                   uri_to_id(NULL, NS_LS "state-file"),
                   abstract_path.c_str(),
                   abstract_path.length() + 1,
                   uri_to_id(NULL, LV2_FILES_URI "#AbstractPath"),
-                  LV2_PERSIST_IS_PORTABLE);
+                  LV2_STATE_IS_PORTABLE);
         } else {
             dmsg(2, ("saving to string\n"));
 
             std::ostringstream out;
             out << GetState();
 
-            store(host_data,
+            store(handle,
                   uri_to_id(NULL, NS_LS "state-string"),
                   out.str().c_str(),
                   out.str().length() + 1,
                   uri_to_id(NULL, NS_ATOM "String"),
-                  LV2_PERSIST_IS_POD | LV2_PERSIST_IS_PORTABLE);
+                  LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
         }
         dmsg(2, ("saving done\n"));
     }
 
-    void PluginLv2::Restore(LV2_Persist_Retrieve_Function retrieve, void* data) {
+    void PluginLv2::Restore(LV2_State_Retrieve_Function retrieve, LV2_State_Handle handle) {
         size_t   size;
         uint32_t type;
         uint32_t flags;
 
         const void* value = retrieve(
-            data,
+            handle,
             uri_to_id(NULL, NS_LS "state-file"),
             &size, &type, &flags);
 
@@ -179,7 +179,7 @@
         }
 
         value = retrieve(
-                data,
+                handle,
                 uri_to_id(NULL, NS_LS "state-string"),
                 &size, &type, &flags);
         if (value) {
@@ -221,12 +221,14 @@
         delete static_cast<PluginLv2*>(instance);
     }
 
-    void save(LV2_Handle handle, LV2_Persist_Store_Function store, void* callback_data) {
-	    return static_cast<PluginLv2*>(handle)->Save(store, callback_data);
+    void save(LV2_Handle handle, LV2_State_Store_Function store, LV2_State_Handle state,
+              uint32_t flags, const LV2_Feature* const* features) {
+        return static_cast<PluginLv2*>(handle)->Save(store, state);
     }
 
-    void restore(LV2_Handle handle, LV2_Persist_Retrieve_Function store, void* callback_data) {
-        return static_cast<PluginLv2*>(handle)->Restore(store, callback_data);
+    void restore(LV2_Handle handle, LV2_State_Retrieve_Function retrieve, LV2_State_Handle state,
+                 uint32_t flags, const LV2_Feature* const* features) {
+        return static_cast<PluginLv2*>(handle)->Restore(retrieve, state);
     }
 
     PluginInfo PluginInfo::Instance;
@@ -240,15 +242,15 @@
         Lv2.instantiate = instantiate;
         Lv2.run = run;
         Lv2.extension_data = extension_data;
-        Persist.save = save;
-        Persist.restore = restore;
+        StateInterface.save = save;
+        StateInterface.restore = restore;
     }
 
 
     const void* extension_data(const char* uri) {
         dmsg(2, ("linuxsampler: extension_data %s\n", uri));
-        if (strcmp(uri, LV2_PERSIST_URI) == 0) {
-            return PluginInfo::Lv2PersistDescriptor();
+        if (strcmp(uri, LV2_STATE_URI "#Interface") == 0) {
+            return PluginInfo::Lv2StateInterface();
         }
         return 0;
     }
Index: src/hostplugins/lv2/linuxsampler.ttl
===================================================================
--- src/hostplugins/lv2/linuxsampler.ttl	(revision 2283)
+++ src/hostplugins/lv2/linuxsampler.ttl	(working copy)
@@ -8,7 +8,7 @@
     doap:name "LinuxSampler" ;
     doap:license <http://linuxsampler.org/downloads.html#exception> ;
     lv2:optionalFeature lv2:hardRtCapable ;
-    lv2:optionalFeature <http://lv2plug.in/ns/ext/persist> ;
+    lv2:extensionData <http://lv2plug.in/ns/ext/state#Interface> ;
     lv2:optionalFeature <http://lv2plug.in/ns/ext/files#pathSupport> ;
     lv2:optionalFeature <http://lv2plug.in/ns/ext/files#newFileSupport> ;
     lv2:optionalFeature <http://lv2plug.in/ns/ext/uri-map> ;
Index: src/hostplugins/lv2/PluginLv2.h
===================================================================
--- src/hostplugins/lv2/PluginLv2.h	(revision 2283)
+++ src/hostplugins/lv2/PluginLv2.h	(working copy)
@@ -23,7 +23,7 @@
 
 #include <lv2.h>
 #include "lv2_event.h"
-#include "lv2_persist.h"
+#include "lv2_state.h"
 #include "lv2_uri_map.h"
 #include "lv2_files.h"
 #include "../../drivers/Plugin.h"
@@ -39,8 +39,8 @@
         void Activate();
         void Run(uint32_t SampleCount);
         void Deactivate();
-        void Save(LV2_Persist_Store_Function store, void* data);
-        void Restore(LV2_Persist_Retrieve_Function retrieve, void* data);
+        void Save(LV2_State_Store_Function store, void* data);
+        void Restore(LV2_State_Retrieve_Function retrieve, void* data);
 
 	protected:
         virtual String PathToState(const String& string);
@@ -65,12 +65,12 @@
         static const LV2_Descriptor* Lv2Descriptor() {
             return &Instance.Lv2;
         }
-        static const LV2_Persist* Lv2PersistDescriptor() {
-            return &Instance.Persist;
+        static const LV2_State_Interface* Lv2StateInterface() {
+            return &Instance.StateInterface;
         }
     private:
         LV2_Descriptor Lv2;
-        LV2_Persist Persist;
+        LV2_State_Interface StateInterface;
 
         PluginInfo();
         static PluginInfo Instance;
@@ -88,13 +88,13 @@
         static void cleanup(LV2_Handle instance);
         static const void* extension_data(const char* uri);
 
-        static void save(LV2_Handle                 handle,
-                         LV2_Persist_Store_Function store,
-                         void*                      data);
+        static void save(LV2_Handle               handle,
+                         LV2_State_Store_Function store,
+                         void*                    data);
 
-        static void restore(LV2_Handle                    handle,
-                            LV2_Persist_Retrieve_Function retrieve,
-                            void*                         data);
+        static void restore(LV2_Handle                  handle,
+                            LV2_State_Retrieve_Function retrieve,
+                            void*                       data);
     }
 }
 
Index: src/hostplugins/lv2/Makefile.am
===================================================================
--- src/hostplugins/lv2/Makefile.am	(revision 2283)
+++ src/hostplugins/lv2/Makefile.am	(working copy)
@@ -5,7 +5,7 @@
 plugin_DATA = manifest.ttl linuxsampler.ttl
 
 linuxsampler_la_SOURCES = PluginLv2.cpp PluginLv2.h \
-	lv2_event.h lv2_persist.h lv2_uri_map.h lv2_files.h
+	lv2_event.h lv2_state.h lv2_uri_map.h lv2_files.h
 linuxsampler_la_LDFLAGS = -module -avoid-version
 linuxsampler_la_LIBADD = $(top_builddir)/src/liblinuxsampler.la
 endif
Index: src/engines/sfz/InstrumentResourceManager.cpp
===================================================================
--- src/engines/sfz/InstrumentResourceManager.cpp	(revision 2283)
+++ src/engines/sfz/InstrumentResourceManager.cpp	(working copy)
@@ -146,8 +146,8 @@
 
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
+	Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+	AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         
         // and we save this to check if we need to reallocate for a engine with higher value of 'MaxSamplesPerSecond'
         pEntry->MaxSamplesPerCycle =
@@ -170,8 +170,8 @@
         
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
+	Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+        AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         
         uint maxSamplesPerCycle =
             (pDevice) ? pDevice->MaxSamplesPerCycle() : DefaultMaxSamplesPerCycle();
Index: src/engines/gig/InstrumentResourceManager.cpp
===================================================================
--- src/engines/gig/InstrumentResourceManager.cpp	(revision 2283)
+++ src/engines/gig/InstrumentResourceManager.cpp	(working copy)
@@ -604,9 +604,8 @@
 
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
-        
+        Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+        AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         // and we save this to check if we need to reallocate for a engine with higher value of 'MaxSamplesPerSecond'
         pEntry->MaxSamplesPerCycle =
             (pDevice) ? pDevice->MaxSamplesPerCycle() : DefaultMaxSamplesPerCycle();
@@ -628,8 +627,8 @@
         
         // (try to resolve the audio device context)
         EngineChannel* pEngineChannel = dynamic_cast<EngineChannel*>(pConsumer);
-        AudioOutputDevice* pDevice = 
-            (pEngineChannel) ? dynamic_cast<Engine*>(pEngineChannel->GetEngine())->pAudioOutputDevice : NULL;
+        Engine* pEngine = dynamic_cast<Engine*>(pEngineChannel->GetEngine());
+        AudioOutputDevice* pDevice = (pEngine) ? pEngine->pAudioOutputDevice : NULL;
         
         uint maxSamplesPerCycle =
             (pDevice) ? pDevice->MaxSamplesPerCycle() : DefaultMaxSamplesPerCycle();

cth103

2011-11-15 22:44

administrator   ~0012068

Sorry, my patch was incomplete. Could you try again with the -3.patch ?

pneuman

2011-11-15 23:19

reporter   ~0012073

New patch looks great so far! I've opened a couple of different sessions several times each, and haven't had any further crashes.

Chuck

2011-11-17 10:12

reporter   ~0012103

I've been unable to verify the patch for several reasons. First, the
symptoms keep changing. Over the last couple of days, I've compiled
numerous revisions from svn to try to figure out exactly when these
changes ocurred, and have come to the following conclusions: All
versions up to, and including, r10552 save the state of linuxsampler on
exit, and attempt to load the offending SFZ instrument on the next
restart, resulting in a segmentation fault. Beginning with r10553,
Ardour no longer saves the state of linuxsampler, and no longer attempts
to reload the SFZ if it was saved by a version prior to r10553. Then,
beginning with r10606, Ardour refused to start at all, saying "No panner
found" and "Assertion `pi' failed". This ocurred at least up through
r10617, but I didn't attempt to try anything newer until r10644, which
now runs again, but still doesn't attempt to save linuxsampler's state
on exit or reload instruments on restart. I currently have r10656
compiling as I write this.

Since the newest releases aren't trying to load the SFZ's when they
start, I can't test if your linuxsampler patch fixes the problem on
those, so I decided to try it out on r10552 (the last release that did
try to load them), but linuxsampler won't compile with that patch due
to a missing lv2_state.h file. Looking at the patch, it seems that in
src/hostplugins/lv2/PluginLv2.h, '#include "lv2_persist.h"' was changed
to '#include "lv2_state.h"', and lv2_persist.h was removed, but no
lv2_state.h was added to take it's place, which explains the error, and
yet pneuman seemed to be able to test it. How is that?

pneuman

2011-11-18 04:54

reporter   ~0012114

It looks like I do have an "lv2_state.h", but you're right -- it's not in the attached patch. It looks like my copy of it is left over from applying drobilla's original patch. I used an svn revert to back out the changes made by applying drobilla's patch, but that ignored the lv2_state.h file, so it was still there.

I'll attach my lv2_state.h file to this ticket; if you drop that in to the src/hostplugins/lv2 directory of the linuxsampler source, the plugin should build.

Chuck

2011-11-18 22:43

reporter   ~0012117

pneuman, did you forget to attach that file? I don't see it here.

2011-11-18 22:44

 

lv2_state.h (10,781 bytes)

pneuman

2011-11-18 22:44

reporter   ~0012118

Ah, I did sorry :) File is now attached.

Chuck

2011-11-18 22:50

reporter   ~0012119

That was quick. Thanks.

Chuck

2011-11-19 02:50

reporter   ~0012121

Well, now that I've had a chance to try the patched linuxsampler, I don't
think it has any advantages over the unpatched one. When used with one
of the older revisions of Ardour 3 that saved instruments on exit and
reloaded them when restarted, it no longer crashes Ardour, but that's
because it no longer saves and reloads instruments, which is exactly
what I'm getting with the unpatched linuxsampler with the more recent
revisions of Ardour, as I've already stated. Isn't Ardour supposed to
reload whatever instruments you had loaded when the session was saved,
so you don't have to remember exactly which instruments you were using
and load them manually each time you start Ardour?

pneuman

2011-11-19 03:40

reporter   ~0012122

Yep, that's exactly the point of using the plugin, and if you use the patched plugin with the current Ardour 3 SVN code, it should work (or at least, it does for me)

The reason for the problems you've been seeing is a shift in the LV2 plugin spec for saving complex plugin states, from the "Persist" extension to the new "State" extension. Ardour 3 now implements the State extension, but not Persist, which is why the LinuxSampler plugin, which uses Persist, stopped having it state restored at startup. The patch updates the LinuxSampler plugin to use the State extension instead.

I'm not sure if the actual crashes are related to any of this; I suspect that the patch also fixes whatever bug in the LinuxSampler plugin that was causing it to crash.

Chuck

2011-11-19 16:00

reporter   ~0012127

Okay, I tried the patched linuxsampler on the older Ardour releases
because that was where I was seeing the segmentation faults. I didn't
realize it was supposed to also fix the bug of not saving/loading
instruments. I guess this bug report is resolved by the patch.

Unfortunately, the patch causes another problem, though. If I try
to edit a GIG file by clicking on "Edit" of JSampler, linuxsampler
crashes, and so does Ardour. I've confirmed that this doesn't happen
with the unpatched linuxsampler, so the patch is introducing this bug.

Actually, there are two bugs: (1) linuxsampler crashing, and (2) Ardour
crashing. I don't think Ardour should crash every time a plugin crashes.
I should probably create another bug report here for that, but where do
I report a bug for linuxsampler, which is a bug in a patch that isn't
currently a part of either Ardour or linuxsampler?

Chuck

2011-12-03 23:04

reporter   ~0012293

This bug is back. Rui Nuno Capela applied drobilla's patch to the svn
repository for LinuxSampler, but it wasn't the patch in found here, so
it didn't fix the bug, and now I can't patch the current source from
svn, so I'm forced to use an older (patched) release. I've reported the
bug in LinuxSampler's bug tracker, but it seems it's being ignored.
I've seen no acknowledgement that anyone has even looked at the bug
report. I've also found that the patched version is only a partial fix.
I thought I had checked it with SF2's, but apparently I hadn't, so the
fix found here only fixes the problem for SFZ's, which is mostly what I
needed fixed, but it still isn't complete. Anyway, to sum it up: The
current LinuxSampler from svn crashes Ardour 3 if a session is loaded
that contains the LinuxSampler plugin with either an SFZ or an SF2
instrument loaded, and a patched LinuxSampler from svn release 2290
(using linuxsampler-patch-3.patch from here plus the missing lv2_state.h
file, also found here) crashes Ardour 3 if a session is loaded that
contains the LinuxSampler plugin with an SF2 instrument loaded (but
does not crash if it has an SFZ instrument loaded).

EdwardDiehl

2012-01-01 21:37

reporter   ~0012510

I also find that linuxsampler sessions are not being restored, despite having applied the patch of bug 4462. Here is error I get trying to restore linuxsampler with the Salamander Grand Piano:

Scheduling
'/mdkhome/sound/recording/ardour3/111230/plugins/464/SalamanderGrandPianoV3.sfz'
(Index=0) to be loaded in background (if not loaded yet).

OK

Loading sfz instrument
('/mdkhome/sound/recording/ardour3/111230/plugins/464/SalamanderGrandPianoV3.sfz',0)...OK

Caching initial samples...sfz::Engine error: Failed to load
instrument, cause:
/mdkhome/sound/recording/ardour3/111230/plugins/464/44.1khz16bit/A0v1.wav:
Can't get sample info: System error : No such file or directory.

Loading sfz instrument
('/mdkhome/sound/recording/ardour3/111230/plugins/464/SalamanderGrandPianoV3.sfz',0)...OK

Caching initial samples...sfz::Engine error: Failed to load
instrument, cause:
/mdkhome/sound/recording/ardour3/111230/plugins/464/44.1khz16bit/A0v1.wav:
Can't get sample info: System error : No such file or directory.

-----------------------
It would seem that LinuxSampler is trying to load the samples from the Ardour
session "plugins" subdirectory, rather from the directory where the samples are
actually stored.

cth103

2012-06-20 19:03

administrator   ~0013644

Linuxsampler SVN with A3 SVN works fine for me; is this still a problem?

Issue History

Date Modified Username Field Change
2011-11-11 19:23 Chuck New Issue
2011-11-12 10:00 cth103 cost => 0.00
2011-11-12 10:00 cth103 Target Version => 3.0-beta1
2011-11-12 10:01 cth103 Relationship added related to 0004375
2011-11-13 02:14 pneuman File Added: ardour-linuxsampler-backtrace.txt
2011-11-13 02:20 pneuman Note Added: 0011979
2011-11-14 11:48 cth103 Status new => feedback
2011-11-14 14:09 cth103 File Added: linuxsampler-patch-2.patch
2011-11-14 14:09 cth103 Note Added: 0011996
2011-11-14 14:09 cth103 Note Edited: 0011996
2011-11-15 15:48 cth103 Target Version 3.0-beta1 => 3.0-beta2
2011-11-15 22:18 pneuman Note Added: 0012066
2011-11-15 22:18 pneuman File Added: ardour-linuxsampler-backtrace-2.txt
2011-11-15 22:44 cth103 File Added: linuxsampler-patch-3.patch
2011-11-15 22:44 cth103 Note Added: 0012068
2011-11-15 23:19 pneuman Note Added: 0012073
2011-11-17 10:12 Chuck Note Added: 0012103
2011-11-18 04:54 pneuman Note Added: 0012114
2011-11-18 22:43 Chuck Note Added: 0012117
2011-11-18 22:44 pneuman File Added: lv2_state.h
2011-11-18 22:44 pneuman Note Added: 0012118
2011-11-18 22:50 Chuck Note Added: 0012119
2011-11-19 02:50 Chuck Note Added: 0012121
2011-11-19 03:40 pneuman Note Added: 0012122
2011-11-19 16:00 Chuck Note Added: 0012127
2011-12-03 23:04 Chuck Note Added: 0012293
2012-01-01 21:37 EdwardDiehl Note Added: 0012510
2012-01-10 20:45 cth103 Target Version 3.0-beta2 => 3.0-beta3
2012-02-14 17:20 paul Target Version 3.0-beta3 => 3.0 beta4
2012-04-23 22:01 cth103 Status feedback => acknowledged
2012-05-23 15:08 cth103 Target Version 3.0 beta4 => 3.0
2012-06-20 19:03 cth103 Note Added: 0013644
2012-06-20 19:03 cth103 Status acknowledged => feedback