Re: [ecasound] Sometimes ecasound-2.4.3 says it's recording and it isn't and it crashes

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Wed Nov 09 2005 - 10:52:22 EET

On Fri, 4 Nov 2005, Avuton Olrich wrote:

> I have been having a couple of problems, methods of debugging aren't
> getting me too far. One thing I notice here is it is not showing the
> full filename in the core, but otherwise I'm not much help.
> 1) Sometimes on exit of ecasound, when I CTRL-C out I get a core, when
> I get a bt on the core it's not too useful:

Hmm, this doesn't sound good. My guess is that is related ALSA somehow
(you could try reproducing the problem replacing "alsahw" with "rtnull").

> Core was generated by `ecasound_debug -r -i alsahw,0,0 -o
> /mnt/aux/Tmp/new_wavs/2005-11-04_698976000_h'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x080f1c00 in ECA_CONTROL_BASE::is_engine_started ()
> (gdb) bt
> #0 0x080f1c00 in ECA_CONTROL_BASE::is_engine_started ()
> #1 0x080f1c8c in ECA_CONTROL_BASE::is_running ()
> #2 0x080f345d in ECA_CONTROL_BASE::run ()
> #3 0x0808ebf8 in main ()
> (gdb)

Hmm, try "info threads", switch to another thread with "thread NUMBER",
and then do another "bt". The above seems to be backtrace from the control
(non-rt, doesn't do any processing) thread. You could also try running
ecasound under gdb, this can sometimes produces better backtraces.

> 2) Sometimes when recording I'm not getting a valid wav file,
> sometimes when using 'aplay' to test if it's working or not, it
> refuses to play it, exiting with no error message (is there a better
> way to test the validity of a wav file?).

As others mentioned, if ecasound does not exit cleanly (like the segfault
case you've traced about), the wav header won't be correctly updated.
Also, for +2GB files, you should really use something else than .wav (the
RIFF headers don't allow for longer files). Ecasound will be happy to
write even larger .wavs (and it can read them later), but the header will
only list the first +2GB.

Btw, you can also use libsndfile for .wav processing in ecasound:

ecasound -i alsa,default -o sndfile,.wav,foo.wav

  links, my public keys, etc at
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play:
Ecasound-list mailing list
Received on Wed Nov 9 12:15:05 2005

This archive was generated by hypermail 2.1.8 : Wed Nov 09 2005 - 12:15:05 EET