Csound Csound-dev Csound-tekno Search About

[Csnd] Crash + Windows + csound~/csoundapi~ + Csound compiled from cvs

Date2010-08-07 07:13
Fromdp51
Subject[Csnd] Crash + Windows + csound~/csoundapi~ + Csound compiled from cvs
Hi,

I posted a bug report on sourceforge, but I'm sending this to the list just
in case
it was missed or didn't contain enough info.

After compiling Csound on Windows 7 using cvs 2010/8/6, I think I found a
bug that
is related to CSOUND->inchnls.  I've attached 
http://csound.1045644.n5.nabble.com/file/n2267286/tests.zip tests.zip  which
contains a Max patch
and a PD patch that demonstrates the bug.  Steps to show bug:

1) compile Csound from cvs
2) open patch
3) turn on DSP

Should hear nothing but a sine wave, but it's a sine wave mixed with some
noise.

4) close the patch

At this point, Max or PD will crash.  I think it's caused by memory
corruption.  I
also think it's related to CSOUND->inchnls and
csoundSetHostImplementedAudio() as
I can't reproduce the error in Qutecsound.  If I compile Csound by hacking
oload() in
Engine/otran.c by changing this line:

    case 4:  p->nchnls = (int) (conval + FL(0.5));  break;

to:

    case 4:  p->inchnls = p->nchnls = (int) (conval + FL(0.5));  break;

it fixes the problem.  Without this hack, inchnls always equals 1 (the
default value.)
By the way, this bug was first introduced sometime between February and
March.
my hope is that this bug can be addressed before the upcoming Windows
release.

Thanks,

Davis

Date2010-08-07 11:34
FromVictor Lazzarini
Subject[Csnd] Re: Crash + Windows + csound~/csoundapi~ + Csound compiled from cvs
I think your fix is the correct one (not a hack). This is because  
nchnls_i is supposed to default to nchnls if not present. Maybe John  
can confirm it?

Victor

On 7 Aug 2010, at 07:13, dp51 wrote:

>
> Hi,
>
> I posted a bug report on sourceforge, but I'm sending this to the  
> list just
> in case
> it was missed or didn't contain enough info.
>
> After compiling Csound on Windows 7 using cvs 2010/8/6, I think I  
> found a
> bug that
> is related to CSOUND->inchnls.  I've attached
> http://csound.1045644.n5.nabble.com/file/n2267286/tests.zip  
> tests.zip  which
> contains a Max patch
> and a PD patch that demonstrates the bug.  Steps to show bug:
>
> 1) compile Csound from cvs
> 2) open patch
> 3) turn on DSP
>
> Should hear nothing but a sine wave, but it's a sine wave mixed with  
> some
> noise.
>
> 4) close the patch
>
> At this point, Max or PD will crash.  I think it's caused by memory
> corruption.  I
> also think it's related to CSOUND->inchnls and
> csoundSetHostImplementedAudio() as
> I can't reproduce the error in Qutecsound.  If I compile Csound by  
> hacking
> oload() in
> Engine/otran.c by changing this line:
>
>    case 4:  p->nchnls = (int) (conval + FL(0.5));  break;
>
> to:
>
>    case 4:  p->inchnls = p->nchnls = (int) (conval + FL(0.5));  break;
>
> it fixes the problem.  Without this hack, inchnls always equals 1 (the
> default value.)
> By the way, this bug was first introduced sometime between February  
> and
> March.
> my hope is that this bug can be addressed before the upcoming Windows
> release.
>
> Thanks,
>
> Davis
> -- 
> View this message in context: http://csound.1045644.n5.nabble.com/Crash-Windows-csound-csoundapi-Csound-compiled-from-cvs-tp2267286p2267286.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"