Csound Csound-dev Csound-tekno Search About

[Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score

Date2010-01-07 20:15
FromAndres Cabrera
Subject[Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score
Hi,

More information:

I'm getting crashes when using the -iadc flag (it was not due to f
statements as reported earlier). The error occurs both using the API
and the command line program

The error is occuring in line 866 of the function:

static inline void sndfilein_(CSOUND *csound, MYFLT scaleFac)

in file InOut/libsnd.c:

      csound->spin[i] = ST(inbuf)[bufpos++] * scaleFac;

Anyone else seeing this?

Cheers,
Andrés


On Thu, Jan 7, 2010 at 9:20 AM, Andres Cabrera  wrote:
> Hi all,
>
> Is it just something I'm doing in QuteCsound or are other API users now getting:
>
> *** internal error: mcalloc() called with zero nbytes
>
> and crashes whenever an f statement is in the score?
>
> It doesn't happen with the csound command line....
>
> Cheers,
> Andrés
>



-- 


Andrés

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-07 20:31
FromAndres Cabrera
SubjectRe: [Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score
Hi,


I've just tried the tarball for the 5.11 release, and it doesn't have
this problem.

The problem appeared very recently, probably due to some commit this
past week...

HTH.

Cheers,
Andres

On Thu, Jan 7, 2010 at 8:15 PM, Andres Cabrera  wrote:
> Hi,
>
> More information:
>
> I'm getting crashes when using the -iadc flag (it was not due to f
> statements as reported earlier). The error occurs both using the API
> and the command line program
>
> The error is occuring in line 866 of the function:
>
> static inline void sndfilein_(CSOUND *csound, MYFLT scaleFac)
>
> in file InOut/libsnd.c:
>
>      csound->spin[i] = ST(inbuf)[bufpos++] * scaleFac;
>
> Anyone else seeing this?
>
> Cheers,
> Andrés
>
>
> On Thu, Jan 7, 2010 at 9:20 AM, Andres Cabrera  wrote:
>> Hi all,
>>
>> Is it just something I'm doing in QuteCsound or are other API users now getting:
>>
>> *** internal error: mcalloc() called with zero nbytes
>>
>> and crashes whenever an f statement is in the score?
>>
>> It doesn't happen with the csound command line....
>>
>> Cheers,
>> Andrés
>>
>
>
>
> --
>
>
> Andrés
>



-- 


Andrés

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-08 12:56
Fromjohn ffitch
SubjectRe: [Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score
(I tried to reply to this last night but the **** mailer lost the
message)

There have been two changes of which I am aware involving spin

1: I added code that allows spin and spout to have a different number
of channels, but I think that is not activated

2: Mike added some API functions to access spin/spout recently

I have tried adding -iadc and it did not lead to a crash.  Do I have
top read the input as well?

==John ffitch

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-08 15:10
Fromjohn ffitch
SubjectRe: [Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score
I can reproduce your error, or something similar.  Tried with a simple
csound orcestra to copy in to out
PortAudio: selected input device '/dev/dsp'
 *** internal error: mcalloc() called with zero nbytes
 *** internal error: mcalloc() called with zero nbytes
reading 0-byte blks of shorts from adc (RAW)
writing 512-byte blks of shorts to test.wav (WAV)

and then a crash at InOut/libsnd.c:866
866           csound->spin[i] = ST(inbuf)[bufpos++] * scaleFac;

I note that csound->spin has a silly value, so this looks like the
initialisation stuff, and so my fault.  


 Looking closer....
The zero lengths come from portaudio module
#1  0x00007fffef734c98 in set_device_params (csound=0x6ef6a0, dev=0x77ba20, 
    parm=0x7fffffffdea0, play=) at InOut/rtpa.c:631
631         dev->buf = (float*) p->Calloc(p, (size_t) (parm->bufSamp_SW
632                                                    * parm->nChannels
633                                                    * (int) sizeof(float)));

and parm->bufSamp_SW is zero.  rtpa.c has not been changed for over a
year; maybe PortAudio has changed?

==John ffitch

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-08 16:20
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score
I think I found it and fixed.  It was an incomplete edit from 4 weeks ago,
and entirely my fault
==John ff


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-08 16:59
FromAndres Cabrera
SubjectRe: [Cs-dev] Crashing when -iadc is used was: Re: Crashing when f statement present in score
Great! Thanks.

Cheers,
Andres

On 1/8/10, jpff@cs.bath.ac.uk  wrote:
> I think I found it and fixed.  It was an incomplete edit from 4 weeks ago,
> and entirely my fault
> ==John ff
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-- 


Andrés

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net