[ecasound] bad_alloc exception in ecasound 2.5.2, 2.6.0 and -git

From: Krzysztof Foltman <wdev@email-addr-hidden>
Date: Sun Feb 22 2009 - 11:09:41 EET

Hi,

I'm trying to run ecasound with a rather simple script (below), and I'm
getting a bad_alloc exception after a few seconds.

The script is:
# general
-b:128 -r:50 -z:intbuf -z:db,100000 -n:"recording" -X -z:noxruns
-z:nopsr -z:mixmode,avg

# audio inputs
-a:jack-input -f:f32_le,2,44100 -i:jack_alsa,,
-a:vocal-input,piano-input,output -f:f32_le,2,44100 -i:loop,1

# audio outputs
-a:jack-input -f:f32_le,2,44100 -o:loop,1
-a:vocal-input -f:f32_le,2,44100 -o:vocal.wav,
-a:piano-input -f:f32_le,2,44100 -o:piano.wav,
-a:output -f:f32_le,2,44100 -o:jack_alsa,,

This is the backtrace I get from the crash:

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb51b0b90 (LWP 11673)]
0xb80cd424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb80cd424 in __kernel_vsyscall ()
#1 0xb7c41085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7c42a01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7e69ea8 in __gnu_cxx::__verbose_terminate_handler () at
../../.././libstdc++-v3/libsupc++/vterminate.cc:98
#4 0xb7e677f5 in __cxxabiv1::__terminate (handler=0xb7e69d50
<__gnu_cxx::__verbose_terminate_handler()>) at
../../.././libstdc++-v3/libsupc++/eh_terminate.cc:43
#5 0xb7e67832 in std::terminate () at
../../.././libstdc++-v3/libsupc++/eh_terminate.cc:53
#6 0xb7e6796a in __cxa_throw (obj=0x9839ef8, tinfo=0xb7e95814,
dest=0xb7e68430 <~bad_alloc>) at
../../.././libstdc++-v3/libsupc++/eh_throw.cc:76
#7 0xb7e68553 in operator new (sz=12) at
../../.././libstdc++-v3/libsupc++/new_op.cc:63
#8 0x0817ec27 in AUDIO_IO_JACK_MANAGER::get_object_list
(this=0x973bd80) at
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.3/../../../../include/c++/4.3.3/ext/new_allocator.h:92
#9 0x0817f10e in AUDIO_IO_JACK_MANAGER::get_node (this=0x973bd80,
client_id=2) at audioio_jack_manager.cpp:1248
#10 0x0817f23a in AUDIO_IO_JACK_MANAGER::write_samples (this=0x6,
client_id=2, target_buffer=0x973de58, samples=128) at
audioio_jack_manager.cpp:1628
#11 0x0817b8d2 in AUDIO_IO_JACK::write_samples (this=0x973dcf8,
target_buffer=0x973de58, samples=128) at audioio_jack.cpp:230
#12 0x080fbe01 in AUDIO_IO_BUFFERED::write_buffer (this=0x973dcf8,
sbuf=0x9741620) at audioio-buffered.cpp:107
#13 0x0811faf3 in ECA_ENGINE::mix_to_outputs (this=0x9918790,
skip_realtime_target_outputs=false) at eca-engine.cpp:1740
#14 0x08124178 in ECA_ENGINE::engine_iteration (this=0x9918790) at
eca-engine.cpp:561
#15 0x0817f51d in eca_jack_process_engine_iteration (nframes=128,
arg=<value optimized out>) at audioio_jack_manager.cpp:453
#16 0x0817f776 in eca_jack_process_callback (nframes=128, arg=0x973bd80)
at audioio_jack_manager.cpp:561
#17 0xb8014c78 in Jack::JackClient::Execute () from
/usr/local/lib/libjack.so.0
#18 0xb802b638 in Jack::JackPosixThread::ThreadHandler () from
/usr/local/lib/libjack.so.0
#19 0xb7d9d4fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#20 0xb7cece5e in clone () from /lib/tls/i686/cmov/libc.so.6

Probably useless, because some memory corruption seems to happen before
that allocation. I've tried to run it in valgrind, to be able to find
out where the specific memory corruption might occur, but only got this
warning (which seems unrelated):

==11826==
==11826== Conditional jump or move depends on uninitialised value(s)
==11826== at 0x8185360: AUDIO_IO_JACK_MANAGER::open(int)
(audioio_jack_manager.cpp:1534)
==11826== by 0x817C74C: AUDIO_IO_JACK::open() (audioio_jack.cpp:106)
==11826== by 0x80A3C54:
ECA_CHAINSETUP::enable_audio_object_helper(AUDIO_IO*) const
(eca-chainsetup.cpp:1770)
==11826== by 0x80B2A42: ECA_CHAINSETUP::enable()
(eca-chainsetup.cpp:1818)
==11826== by 0x80943BA: ECA_SESSION::connect_chainsetup()
(eca-session.cpp:373)
==11826== by 0x80959FA:
ECA_SESSION::interpret_chainsetup_option(std::string const&)
(eca-session.cpp:600)
==11826== by 0x8095DD6:
ECA_SESSION::interpret_general_options(std::vector<std::string,
std::allocator<std::string> > const&, std::vector<std::string,
std::allocator<std::string> >*) (eca-session.cpp:493)
==11826== by 0x8095EB6: ECA_SESSION::ECA_SESSION(COMMAND_LINE&)
(eca-session.cpp:92)
==11826== by 0x808E6A2: main (ecasound.cpp:307)
jack_client_new: deprecated

and no crash.

This is happening with JACK2 (jackdmp) - didn't try with JACK1 yet.

Krzysztof

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sun Feb 22 12:15:01 2009

This archive was generated by hypermail 2.1.8 : Sun Feb 22 2009 - 12:15:02 EET