Bug 227 - Linuxsampler from latest svn crashes after first note
Summary: Linuxsampler from latest svn crashes after first note
Status: CLOSED FIXED
Alias: None
Product: LinuxSampler
Classification: Unclassified
Component: drivers (show other bugs)
Version: SVN Trunk
Hardware: PC Linux
: P5 critical
Assignee: Christian Schoenebeck
URL:
: 226 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-29 15:29 CEST by Victor
Modified: 2015-03-09 17:12 CET (History)
3 users (show)

See Also:


Attachments
Proposed fix. (1.33 KB, patch)
2014-06-29 19:37 CEST, Christian Schoenebeck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor 2014-06-29 15:29:04 CEST
Using linuxsampler built from svn on updated Arch. That is LinuxSampler 1.0.0.svn54
Linuxsampler crashes after playing first note. I tried with various instruments, sfz and gig backend. I load lscp files and drive linuxsampler from Ardour (as standalone, not as plugin).

Reverting to an older version which I had solved the problem. That version is 1.0.0.svn21

I tried building with debugging symbols as advised on bugs.linuxsampler.org:   CXXFLAGS="-O2 -g3" ./configure && make. However I'm not sure it took the flags into account as the console output looks pretty meager in this respect:

[tor@balena linuxsampler-svn]$ linuxsampler &
[1] 11110
[tor@balena linuxsampler-svn]$ LinuxSampler 1.0.0.svn54
Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck
Copyright (C) 2005-2014 Christian Schoenebeck
Detected features: MMX SSE SSE2
Automatic Stacktrace: Off
Creating Sampler...OK
Registered sampler engines: 'GIG','SF2','SFZ'
Registered MIDI input drivers: ALSA,JACK
Registered audio output drivers: ALSA,JACK
Loading instrument editor plugins...OK
Registered instrument editors: 
Registered internal effect systems: LADSPA
Registered internal effects: 335
Starting LSCP network server (0.0.0.0:8888)...OK
LinuxSampler initialization completed. :-)

LSCPServer: Client connection established on socket:7.
libjackBufferSizeCallback(128)
Jack: Cannot connect port 'LinuxSampler:0' to port 'NONE'
Jack: Cannot connect port 'LinuxSampler:1' to port 'NONE'
libjackBufferSizeCallback(128)
Jack: Cannot connect port 'She:0' to port 'NONE'
Jack: Cannot connect port 'She:1' to port 'NONE'
Starting disk thread...OK
Instantiating LADSPA effect 'triplePara'.
LADSPA effect 'triplePara' activated.
Instantiating LADSPA effect 'triplePara'.
LADSPA effect 'triplePara' activated.
EQ support: Triple band parametric with shelves
Instantiating LADSPA effect 'triplePara'.
LADSPA effect 'triplePara' activated.
[... repeated many times...]
Scheduling '/home/tor/soundfonts/PomPom_soundfont/PomPom.sfz' (Index=0) to be loaded in background (if not loaded yet).
Loading sfz file '/home/tor/soundfonts/PomPom_soundfont/PomPom.sfz'...OK
Loading sfz instrument ('/home/tor/soundfonts/PomPom_soundfont/PomPom.sfz',0)...OK
Caching initial samples...OK
Starting disk thread...OK
Instantiating LADSPA effect 'triplePara'.
LADSPA effect 'triplePara' activated.
[...repeated many times...]
Scheduling '/home/tor/soundfonts/PomPom_soundfont/PomPom.sfz' (Index=0) to be loaded in background (if not loaded yet).

[1]+  Segmentation fault      linuxsampler
Comment 1 Christian Schoenebeck 2014-06-29 16:54:28 CEST
A backtrace is required to investigate this:

CXXFLAGS="-O0 -g3" ./configure && make
libtool --mode=execute gdb --arg src/linuxsampler
run

the sampler should now be running as usual, just attached to the GNU debugger. So use the sampler, reproduce the crash, and after it happened, type

bt

Then paste the printed back trace.

I have also updated the website with these instructions now.
Comment 2 Drumfix 2014-06-29 18:34:05 CEST
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff4bb9700 (LWP 13647)]
0x00007ffff79521cc in RTListBase<LinuxSampler::ScriptEvent>::isEmpty (this=0x8)
    at ../common/../../common/Pool.h:304
304                return _begin.next == &_end;
(gdb) bt
#0  0x00007ffff79521cc in RTListBase<LinuxSampler::ScriptEvent>::isEmpty (
    this=0x8) at ../common/../../common/Pool.h:304
#1  0x00007ffff79535b6 in RTList<LinuxSampler::ScriptEvent>::clear (this=0x0)
    at ../common/../../common/Pool.h:475
#2  0x00007ffff79960b6 in LinuxSampler::MidiKeyboardManager<LinuxSampler::sf2::Voice>::FreeKey (this=0x7fffe407bd00, pKey=0x7fffe52afff8)
    at ../common/MidiKeyboardManager.h:348
#3  0x00007ffff7995998 in LinuxSampler::MidiKeyboardManager<LinuxSampler::sf2::Voice>::FreeAllInactiveKyes (this=0x7fffe407bd00)
    at ../common/MidiKeyboardManager.h:368
#4  0x00007ffff7994200 in LinuxSampler::EngineBase<LinuxSampler::sf2::Voice, sf2::Region, sf2::Region, LinuxSampler::sf2::DiskThread, LinuxSampler::sf2::InstrumentResourceManager, sf2::Preset>::PostProcess (this=0x7fffe402d5a0,
    pEngineChannel=0x7fffe407b990) at ../EngineBase.h:1089
#5  0x00007ffff7991348 in LinuxSampler::EngineBase<LinuxSampler::sf2::Voice, sf2::Region, sf2::Region, LinuxSampler::sf2::DiskThread, LinuxSampler::sf2::InstrumentResourceManager, sf2::Preset>::RenderAudio (this=0x7fffe402d5a0,
    Samples=256) at ../EngineBase.h:178
#6  0x00007ffff7a39314 in LinuxSampler::AudioOutputDevice::RenderAudio (
    this=0x7fffe4012670, Samples=256) at AudioOutputDevice.cpp:372
#7  0x00007ffff7a4c415 in LinuxSampler::AudioOutputDeviceJack::Process (
    this=0x7fffe4012670, Samples=256) at AudioOutputDeviceJack.cpp:253
#8  0x00007ffff7a4cad5 in LinuxSampler::JackClient::Process (
---Type <return> to continue, or q <return> to quit---
    this=0x7fffe401bad0, Samples=256) at AudioOutputDeviceJack.cpp:386
#9  0x00007ffff7a4c894 in LinuxSampler::linuxsampler_libjack_process_callback (
    nframes=256, arg=0x7fffe401bad0) at AudioOutputDeviceJack.cpp:332
#10 0x00007ffff639074c in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#11 0x00007ffff6390654 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#12 0x00007ffff638e279 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#13 0x00007ffff63ad858 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0
#14 0x00007ffff6e55182 in start_thread (arg=0x7ffff4bb9700)
    at pthread_create.c:312
#15 0x00007ffff6b8230d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111


This is with a sf2 loaded
Comment 3 Christian Schoenebeck 2014-06-29 19:37:05 CEST
Created attachment 63 [details]
Proposed fix.

Try the attached patch whether it fixes this bug.

cd linuxsampler
patch -p0 < /wherever/bug227.patch
make
Comment 4 Drumfix 2014-06-29 20:21:29 CEST
Patch works. Thanks
Comment 5 Christian Schoenebeck 2014-06-29 21:36:46 CEST
*** Bug 226 has been marked as a duplicate of this bug. ***
Comment 6 Christian Schoenebeck 2014-06-29 21:40:39 CEST
Fix committed to SVN (r2659, v1.0.0.svn55).

Thanks!
Comment 7 Victor 2014-06-30 21:02:13 CEST
(In reply to comment #6)
> Fix committed to SVN (r2659, v1.0.0.svn55).
> 
> Thanks!

Works here too. Thanks !