Csound Csound-dev Csound-tekno Search About

[Cs-dev] csound6 sprintf bug

Date2013-04-17 10:47
Fromhackbarth
Subject[Cs-dev] csound6 sprintf bug
hello,

the following code worked in cs5, but i now get a "semantic error" in
csound6 (built yesterday).  below is the csd and the resulting error (os x
doubles)







sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1

ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat", sr


endin



i 1 0 1
e




error:  Unable to find opcode entry for 'sprintf' with matching argument
types:
Found: S sprintf Sr
Line: 11 Loc: 1
Parsing failed due to 1 semantic error!
WARNING: Stopping on parser failure





--
View this message in context: http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-17 11:07
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Hi Ben,

Thanks very much for reporting and sending in this CSD.  I've added it
to the test suite here locally and will look into the bug now.

steven

On Wed, Apr 17, 2013 at 10:47 AM, hackbarth  wrote:
> hello,
>
> the following code worked in cs5, but i now get a "semantic error" in
> csound6 (built yesterday).  below is the csd and the resulting error (os x
> doubles)
>
>
> 
> 
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
> instr 1
>
> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat", sr
>
>
> endin
> 
> 
>
> i 1 0 1
> e
> 
> 
>
>
> error:  Unable to find opcode entry for 'sprintf' with matching argument
> types:
> Found: S sprintf Sr
> Line: 11 Loc: 1
> Parsing failed due to 1 semantic error!
> WARNING: Stopping on parser failure
>
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-17 11:50
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Hi Ben,

It should be fixed up now with latest in GIT.  The issue was that the
T arg type wasn't matching against r- type vars.  In the example, the
issue presented due to the use of sr in the sprintf line.  Thanks
again for reporting it!

steven

On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi  wrote:
> Hi Ben,
>
> Thanks very much for reporting and sending in this CSD.  I've added it
> to the test suite here locally and will look into the bug now.
>
> steven
>
> On Wed, Apr 17, 2013 at 10:47 AM, hackbarth  wrote:
>> hello,
>>
>> the following code worked in cs5, but i now get a "semantic error" in
>> csound6 (built yesterday).  below is the csd and the resulting error (os x
>> doubles)
>>
>>
>> 
>> 
>> 
>> 
>>
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs  = 1
>>
>> instr 1
>>
>> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat", sr
>>
>>
>> endin
>> 
>> 
>>
>> i 1 0 1
>> e
>> 
>> 
>>
>>
>> error:  Unable to find opcode entry for 'sprintf' with matching argument
>> types:
>> Found: S sprintf Sr
>> Line: 11 Loc: 1
>> Parsing failed due to 1 semantic error!
>> WARNING: Stopping on parser failure
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-17 18:42
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
cool, thank you steven.  it works now!

i'm am running into some other issues that i'm having trouble distilling into a simple csd.  but below is my best shot.

the bug has to do with labels for goto statements which are embedded in if-endif blocks.  as before, the code below works in cs5, but i get errors in cs6.  i get no errors if i remove the if statements and just do the loops.


<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1
iToggle = 1

if (iToggle == 0) then
    iNumberChildren = 5
    SampleSetChildrenLoop:
        print iNumberChildren
        iNumberChildren = iNumberChildren - 1
    if (iNumberChildren > 0.) goto SampleSetChildrenLoop
else   
    iLop = 5
    Looper:
        print iLop
        iLop = iLop - 1
    if (iLop > 0.) goto Looper
endif

endin
</CsInstruments>
<CsScore>

i 1 0 1
e
</CsScore>
</CsoundSynthesizer>


Parsing successful!
error:  Variable 'SampleSetChildrenLoop' used before defined
Parsing failed due to 1 semantic error!
WARNING: Stopping on parser failure

cannot compile orchestra


--  ben


On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

It should be fixed up now with latest in GIT.  The issue was that the
T arg type wasn't matching against r- type vars.  In the example, the
issue presented due to the use of sr in the sprintf line.  Thanks
again for reporting it!

steven

On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Ben,
>
> Thanks very much for reporting and sending in this CSD.  I've added it
> to the test suite here locally and will look into the bug now.
>
> steven
>
> On Wed, Apr 17, 2013 at 10:47 AM, hackbarth <hackbarth@gmail.com> wrote:
>> hello,
>>
>> the following code worked in cs5, but i now get a "semantic error" in
>> csound6 (built yesterday).  below is the csd and the resulting error (os x
>> doubles)
>>
>>
>> <CsoundSynthesizer>
>> <CsOptions>
>> </CsOptions>
>> <CsInstruments>
>>
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs  = 1
>>
>> instr 1
>>
>> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat", sr
>>
>>
>> endin
>> </CsInstruments>
>> <CsScore>
>>
>> i 1 0 1
>> e
>> </CsScore>
>> </CsoundSynthesizer>
>>
>>
>> error:  Unable to find opcode entry for 'sprintf' with matching argument
>> types:
>> Found: S sprintf Sr
>> Line: 11 Loc: 1
>> Parsing failed due to 1 semantic error!
>> WARNING: Stopping on parser failure
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-04-17 19:10
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Hi Ben,

Thanks for sending this test! Contributing these kinds of focused
tests are extremely appreciated.  I'll take a look now and will reply
once things are sorted out.

Thanks!
steven

On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth  wrote:
> cool, thank you steven.  it works now!
>
> i'm am running into some other issues that i'm having trouble distilling
> into a simple csd.  but below is my best shot.
>
> the bug has to do with labels for goto statements which are embedded in
> if-endif blocks.  as before, the code below works in cs5, but i get errors
> in cs6.  i get no errors if i remove the if statements and just do the
> loops.
>
>
> 
> 
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
> instr 1
> iToggle = 1
>
> if (iToggle == 0) then
>     iNumberChildren = 5
>     SampleSetChildrenLoop:
>         print iNumberChildren
>         iNumberChildren = iNumberChildren - 1
>     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
> else
>     iLop = 5
>     Looper:
>         print iLop
>         iLop = iLop - 1
>     if (iLop > 0.) goto Looper
> endif
>
>
> endin
> 
> 
>
> i 1 0 1
> e
> 
> 
>
>
> Parsing successful!
> error:  Variable 'SampleSetChildrenLoop' used before defined
>
> Parsing failed due to 1 semantic error!
> WARNING: Stopping on parser failure
>
> cannot compile orchestra
>
>
> --  ben
>
>
> On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi  wrote:
>>
>> Hi Ben,
>>
>> It should be fixed up now with latest in GIT.  The issue was that the
>> T arg type wasn't matching against r- type vars.  In the example, the
>> issue presented due to the use of sr in the sprintf line.  Thanks
>> again for reporting it!
>>
>> steven
>>
>> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi  wrote:
>> > Hi Ben,
>> >
>> > Thanks very much for reporting and sending in this CSD.  I've added it
>> > to the test suite here locally and will look into the bug now.
>> >
>> > steven
>> >
>> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth  wrote:
>> >> hello,
>> >>
>> >> the following code worked in cs5, but i now get a "semantic error" in
>> >> csound6 (built yesterday).  below is the csd and the resulting error
>> >> (os x
>> >> doubles)
>> >>
>> >>
>> >> 
>> >> 
>> >> 
>> >> 
>> >>
>> >> sr = 44100
>> >> ksmps = 32
>> >> nchnls = 2
>> >> 0dbfs  = 1
>> >>
>> >> instr 1
>> >>
>> >> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat", sr
>> >>
>> >>
>> >> endin
>> >> 
>> >> 
>> >>
>> >> i 1 0 1
>> >> e
>> >> 
>> >> 
>> >>
>> >>
>> >> error:  Unable to find opcode entry for 'sprintf' with matching
>> >> argument
>> >> types:
>> >> Found: S sprintf Sr
>> >> Line: 11 Loc: 1
>> >> Parsing failed due to 1 semantic error!
>> >> WARNING: Stopping on parser failure
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-18 00:00
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
no problem steven.  i'll keep em coming.

--  ben


On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

Thanks for sending this test! Contributing these kinds of focused
tests are extremely appreciated.  I'll take a look now and will reply
once things are sorted out.

Thanks!
steven

On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> cool, thank you steven.  it works now!
>
> i'm am running into some other issues that i'm having trouble distilling
> into a simple csd.  but below is my best shot.
>
> the bug has to do with labels for goto statements which are embedded in
> if-endif blocks.  as before, the code below works in cs5, but i get errors
> in cs6.  i get no errors if i remove the if statements and just do the
> loops.
>
>
> <CsoundSynthesizer>
> <CsOptions>
> </CsOptions>
> <CsInstruments>
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
> instr 1
> iToggle = 1
>
> if (iToggle == 0) then
>     iNumberChildren = 5
>     SampleSetChildrenLoop:
>         print iNumberChildren
>         iNumberChildren = iNumberChildren - 1
>     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
> else
>     iLop = 5
>     Looper:
>         print iLop
>         iLop = iLop - 1
>     if (iLop > 0.) goto Looper
> endif
>
>
> endin
> </CsInstruments>
> <CsScore>
>
> i 1 0 1
> e
> </CsScore>
> </CsoundSynthesizer>
>
>
> Parsing successful!
> error:  Variable 'SampleSetChildrenLoop' used before defined
>
> Parsing failed due to 1 semantic error!
> WARNING: Stopping on parser failure
>
> cannot compile orchestra
>
>
> --  ben
>
>
> On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> Hi Ben,
>>
>> It should be fixed up now with latest in GIT.  The issue was that the
>> T arg type wasn't matching against r- type vars.  In the example, the
>> issue presented due to the use of sr in the sprintf line.  Thanks
>> again for reporting it!
>>
>> steven
>>
>> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Hi Ben,
>> >
>> > Thanks very much for reporting and sending in this CSD.  I've added it
>> > to the test suite here locally and will look into the bug now.
>> >
>> > steven
>> >
>> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth <hackbarth@gmail.com> wrote:
>> >> hello,
>> >>
>> >> the following code worked in cs5, but i now get a "semantic error" in
>> >> csound6 (built yesterday).  below is the csd and the resulting error
>> >> (os x
>> >> doubles)
>> >>
>> >>
>> >> <CsoundSynthesizer>
>> >> <CsOptions>
>> >> </CsOptions>
>> >> <CsInstruments>
>> >>
>> >> sr = 44100
>> >> ksmps = 32
>> >> nchnls = 2
>> >> 0dbfs  = 1
>> >>
>> >> instr 1
>> >>
>> >> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat", sr
>> >>
>> >>
>> >> endin
>> >> </CsInstruments>
>> >> <CsScore>
>> >>
>> >> i 1 0 1
>> >> e
>> >> </CsScore>
>> >> </CsoundSynthesizer>
>> >>
>> >>
>> >> error:  Unable to find opcode entry for 'sprintf' with matching
>> >> argument
>> >> types:
>> >> Found: S sprintf Sr
>> >> Line: 11 Loc: 1
>> >> Parsing failed due to 1 semantic error!
>> >> WARNING: Stopping on parser failure
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-04-18 15:35
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Hi Ben,

The label list function was not properly going down the TREE*
structure to gather all labels, so the ones within if-blocks and until
blocks did not work.  I tested with your example (added to csdtests
now) and it seems to work alright now.  Could you pull and test there?
 I get the expected output now:

instr 1:  iLop = 5.000
instr 1:  iLop = 4.000
instr 1:  iLop = 3.000
instr 1:  iLop = 2.000
instr 1:  iLop = 1.000

Thanks again for the report!
steven


On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth  wrote:
> no problem steven.  i'll keep em coming.
>
> --  ben
>
>
> On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi  wrote:
>>
>> Hi Ben,
>>
>> Thanks for sending this test! Contributing these kinds of focused
>> tests are extremely appreciated.  I'll take a look now and will reply
>> once things are sorted out.
>>
>> Thanks!
>> steven
>>
>> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth 
>> wrote:
>> > cool, thank you steven.  it works now!
>> >
>> > i'm am running into some other issues that i'm having trouble distilling
>> > into a simple csd.  but below is my best shot.
>> >
>> > the bug has to do with labels for goto statements which are embedded in
>> > if-endif blocks.  as before, the code below works in cs5, but i get
>> > errors
>> > in cs6.  i get no errors if i remove the if statements and just do the
>> > loops.
>> >
>> >
>> > 
>> > 
>> > 
>> > 
>> >
>> > sr = 44100
>> > ksmps = 32
>> > nchnls = 2
>> > 0dbfs  = 1
>> >
>> > instr 1
>> > iToggle = 1
>> >
>> > if (iToggle == 0) then
>> >     iNumberChildren = 5
>> >     SampleSetChildrenLoop:
>> >         print iNumberChildren
>> >         iNumberChildren = iNumberChildren - 1
>> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> > else
>> >     iLop = 5
>> >     Looper:
>> >         print iLop
>> >         iLop = iLop - 1
>> >     if (iLop > 0.) goto Looper
>> > endif
>> >
>> >
>> > endin
>> > 
>> > 
>> >
>> > i 1 0 1
>> > e
>> > 
>> > 
>> >
>> >
>> > Parsing successful!
>> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >
>> > Parsing failed due to 1 semantic error!
>> > WARNING: Stopping on parser failure
>> >
>> > cannot compile orchestra
>> >
>> >
>> > --  ben
>> >
>> >
>> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi  wrote:
>> >>
>> >> Hi Ben,
>> >>
>> >> It should be fixed up now with latest in GIT.  The issue was that the
>> >> T arg type wasn't matching against r- type vars.  In the example, the
>> >> issue presented due to the use of sr in the sprintf line.  Thanks
>> >> again for reporting it!
>> >>
>> >> steven
>> >>
>> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi  wrote:
>> >> > Hi Ben,
>> >> >
>> >> > Thanks very much for reporting and sending in this CSD.  I've added
>> >> > it
>> >> > to the test suite here locally and will look into the bug now.
>> >> >
>> >> > steven
>> >> >
>> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth 
>> >> > wrote:
>> >> >> hello,
>> >> >>
>> >> >> the following code worked in cs5, but i now get a "semantic error"
>> >> >> in
>> >> >> csound6 (built yesterday).  below is the csd and the resulting error
>> >> >> (os x
>> >> >> doubles)
>> >> >>
>> >> >>
>> >> >> 
>> >> >> 
>> >> >> 
>> >> >> 
>> >> >>
>> >> >> sr = 44100
>> >> >> ksmps = 32
>> >> >> nchnls = 2
>> >> >> 0dbfs  = 1
>> >> >>
>> >> >> instr 1
>> >> >>
>> >> >> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >> >> sr
>> >> >>
>> >> >>
>> >> >> endin
>> >> >> 
>> >> >> 
>> >> >>
>> >> >> i 1 0 1
>> >> >> e
>> >> >> 
>> >> >> 
>> >> >>
>> >> >>
>> >> >> error:  Unable to find opcode entry for 'sprintf' with matching
>> >> >> argument
>> >> >> types:
>> >> >> Found: S sprintf Sr
>> >> >> Line: 11 Loc: 1
>> >> >> Parsing failed due to 1 semantic error!
>> >> >> WARNING: Stopping on parser failure
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------------
>> >> >> Precog is a next-generation analytics platform capable of advanced
>> >> >> analytics on semi-structured data. The platform includes APIs for
>> >> >> building
>> >> >> apps and a phenomenal toolset for data science. Developers can use
>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >> >> account!
>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >> _______________________________________________
>> >> >> Csound-devel mailing list
>> >> >> Csound-devel@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Precog is a next-generation analytics platform capable of advanced
>> > analytics on semi-structured data. The platform includes APIs for
>> > building
>> > apps and a phenomenal toolset for data science. Developers can use
>> > our toolset for easy data analysis & visualization. Get a free account!
>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-18 17:27
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
hi steven,

thank you, this issue to be resolved now. 

i'm excited about the new language features of cs6, so i'm try to debug a rather large project (the orchestra is ~14000 lines).  unfortunately i am now running into segfaults without an error messages.  i'll poke around a bit more later this evening and see if i can isolate the problem.

thanks for all of your hard work.

--  ben


On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

The label list function was not properly going down the TREE*
structure to gather all labels, so the ones within if-blocks and until
blocks did not work.  I tested with your example (added to csdtests
now) and it seems to work alright now.  Could you pull and test there?
 I get the expected output now:

instr 1:  iLop = 5.000
instr 1:  iLop = 4.000
instr 1:  iLop = 3.000
instr 1:  iLop = 2.000
instr 1:  iLop = 1.000

Thanks again for the report!
steven


On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> no problem steven.  i'll keep em coming.
>
> --  ben
>
>
> On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> Hi Ben,
>>
>> Thanks for sending this test! Contributing these kinds of focused
>> tests are extremely appreciated.  I'll take a look now and will reply
>> once things are sorted out.
>>
>> Thanks!
>> steven
>>
>> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth <hackbarth@gmail.com>
>> wrote:
>> > cool, thank you steven.  it works now!
>> >
>> > i'm am running into some other issues that i'm having trouble distilling
>> > into a simple csd.  but below is my best shot.
>> >
>> > the bug has to do with labels for goto statements which are embedded in
>> > if-endif blocks.  as before, the code below works in cs5, but i get
>> > errors
>> > in cs6.  i get no errors if i remove the if statements and just do the
>> > loops.
>> >
>> >
>> > <CsoundSynthesizer>
>> > <CsOptions>
>> > </CsOptions>
>> > <CsInstruments>
>> >
>> > sr = 44100
>> > ksmps = 32
>> > nchnls = 2
>> > 0dbfs  = 1
>> >
>> > instr 1
>> > iToggle = 1
>> >
>> > if (iToggle == 0) then
>> >     iNumberChildren = 5
>> >     SampleSetChildrenLoop:
>> >         print iNumberChildren
>> >         iNumberChildren = iNumberChildren - 1
>> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> > else
>> >     iLop = 5
>> >     Looper:
>> >         print iLop
>> >         iLop = iLop - 1
>> >     if (iLop > 0.) goto Looper
>> > endif
>> >
>> >
>> > endin
>> > </CsInstruments>
>> > <CsScore>
>> >
>> > i 1 0 1
>> > e
>> > </CsScore>
>> > </CsoundSynthesizer>
>> >
>> >
>> > Parsing successful!
>> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >
>> > Parsing failed due to 1 semantic error!
>> > WARNING: Stopping on parser failure
>> >
>> > cannot compile orchestra
>> >
>> >
>> > --  ben
>> >
>> >
>> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>
>> >> Hi Ben,
>> >>
>> >> It should be fixed up now with latest in GIT.  The issue was that the
>> >> T arg type wasn't matching against r- type vars.  In the example, the
>> >> issue presented due to the use of sr in the sprintf line.  Thanks
>> >> again for reporting it!
>> >>
>> >> steven
>> >>
>> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >> > Hi Ben,
>> >> >
>> >> > Thanks very much for reporting and sending in this CSD.  I've added
>> >> > it
>> >> > to the test suite here locally and will look into the bug now.
>> >> >
>> >> > steven
>> >> >
>> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth <hackbarth@gmail.com>
>> >> > wrote:
>> >> >> hello,
>> >> >>
>> >> >> the following code worked in cs5, but i now get a "semantic error"
>> >> >> in
>> >> >> csound6 (built yesterday).  below is the csd and the resulting error
>> >> >> (os x
>> >> >> doubles)
>> >> >>
>> >> >>
>> >> >> <CsoundSynthesizer>
>> >> >> <CsOptions>
>> >> >> </CsOptions>
>> >> >> <CsInstruments>
>> >> >>
>> >> >> sr = 44100
>> >> >> ksmps = 32
>> >> >> nchnls = 2
>> >> >> 0dbfs  = 1
>> >> >>
>> >> >> instr 1
>> >> >>
>> >> >> ShrtfL sprintf "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >> >> sr
>> >> >>
>> >> >>
>> >> >> endin
>> >> >> </CsInstruments>
>> >> >> <CsScore>
>> >> >>
>> >> >> i 1 0 1
>> >> >> e
>> >> >> </CsScore>
>> >> >> </CsoundSynthesizer>
>> >> >>
>> >> >>
>> >> >> error:  Unable to find opcode entry for 'sprintf' with matching
>> >> >> argument
>> >> >> types:
>> >> >> Found: S sprintf Sr
>> >> >> Line: 11 Loc: 1
>> >> >> Parsing failed due to 1 semantic error!
>> >> >> WARNING: Stopping on parser failure
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------------
>> >> >> Precog is a next-generation analytics platform capable of advanced
>> >> >> analytics on semi-structured data. The platform includes APIs for
>> >> >> building
>> >> >> apps and a phenomenal toolset for data science. Developers can use
>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >> >> account!
>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >> _______________________________________________
>> >> >> Csound-devel mailing list
>> >> >> Csound-devel@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Precog is a next-generation analytics platform capable of advanced
>> > analytics on semi-structured data. The platform includes APIs for
>> > building
>> > apps and a phenomenal toolset for data science. Developers can use
>> > our toolset for easy data analysis & visualization. Get a free account!
>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-04-18 17:33
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Thanks Ben too for contributing your time to test!

I too am starting to run my projects with CS6 to check for errors.
Most of my project shave a lot of code so they stress csound a bit
more but make it a lot harder to figure out bugs.  I'm sure we'll get
through all the bugs soon enough though. :)

On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth  wrote:
> hi steven,
>
> thank you, this issue to be resolved now.
>
> i'm excited about the new language features of cs6, so i'm try to debug a
> rather large project (the orchestra is ~14000 lines).  unfortunately i am
> now running into segfaults without an error messages.  i'll poke around a
> bit more later this evening and see if i can isolate the problem.
>
> thanks for all of your hard work.
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi  wrote:
>>
>> Hi Ben,
>>
>> The label list function was not properly going down the TREE*
>> structure to gather all labels, so the ones within if-blocks and until
>> blocks did not work.  I tested with your example (added to csdtests
>> now) and it seems to work alright now.  Could you pull and test there?
>>  I get the expected output now:
>>
>> instr 1:  iLop = 5.000
>> instr 1:  iLop = 4.000
>> instr 1:  iLop = 3.000
>> instr 1:  iLop = 2.000
>> instr 1:  iLop = 1.000
>>
>> Thanks again for the report!
>> steven
>>
>>
>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth 
>> wrote:
>> > no problem steven.  i'll keep em coming.
>> >
>> > --  ben
>> >
>> >
>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi  wrote:
>> >>
>> >> Hi Ben,
>> >>
>> >> Thanks for sending this test! Contributing these kinds of focused
>> >> tests are extremely appreciated.  I'll take a look now and will reply
>> >> once things are sorted out.
>> >>
>> >> Thanks!
>> >> steven
>> >>
>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth 
>> >> wrote:
>> >> > cool, thank you steven.  it works now!
>> >> >
>> >> > i'm am running into some other issues that i'm having trouble
>> >> > distilling
>> >> > into a simple csd.  but below is my best shot.
>> >> >
>> >> > the bug has to do with labels for goto statements which are embedded
>> >> > in
>> >> > if-endif blocks.  as before, the code below works in cs5, but i get
>> >> > errors
>> >> > in cs6.  i get no errors if i remove the if statements and just do
>> >> > the
>> >> > loops.
>> >> >
>> >> >
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> >
>> >> > sr = 44100
>> >> > ksmps = 32
>> >> > nchnls = 2
>> >> > 0dbfs  = 1
>> >> >
>> >> > instr 1
>> >> > iToggle = 1
>> >> >
>> >> > if (iToggle == 0) then
>> >> >     iNumberChildren = 5
>> >> >     SampleSetChildrenLoop:
>> >> >         print iNumberChildren
>> >> >         iNumberChildren = iNumberChildren - 1
>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >> > else
>> >> >     iLop = 5
>> >> >     Looper:
>> >> >         print iLop
>> >> >         iLop = iLop - 1
>> >> >     if (iLop > 0.) goto Looper
>> >> > endif
>> >> >
>> >> >
>> >> > endin
>> >> > 
>> >> > 
>> >> >
>> >> > i 1 0 1
>> >> > e
>> >> > 
>> >> > 
>> >> >
>> >> >
>> >> > Parsing successful!
>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >> >
>> >> > Parsing failed due to 1 semantic error!
>> >> > WARNING: Stopping on parser failure
>> >> >
>> >> > cannot compile orchestra
>> >> >
>> >> >
>> >> > --  ben
>> >> >
>> >> >
>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi 
>> >> > wrote:
>> >> >>
>> >> >> Hi Ben,
>> >> >>
>> >> >> It should be fixed up now with latest in GIT.  The issue was that
>> >> >> the
>> >> >> T arg type wasn't matching against r- type vars.  In the example,
>> >> >> the
>> >> >> issue presented due to the use of sr in the sprintf line.  Thanks
>> >> >> again for reporting it!
>> >> >>
>> >> >> steven
>> >> >>
>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi 
>> >> >> wrote:
>> >> >> > Hi Ben,
>> >> >> >
>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >> >> > added
>> >> >> > it
>> >> >> > to the test suite here locally and will look into the bug now.
>> >> >> >
>> >> >> > steven
>> >> >> >
>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth 
>> >> >> > wrote:
>> >> >> >> hello,
>> >> >> >>
>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >> >> >> error"
>> >> >> >> in
>> >> >> >> csound6 (built yesterday).  below is the csd and the resulting
>> >> >> >> error
>> >> >> >> (os x
>> >> >> >> doubles)
>> >> >> >>
>> >> >> >>
>> >> >> >> 
>> >> >> >> 
>> >> >> >> 
>> >> >> >> 
>> >> >> >>
>> >> >> >> sr = 44100
>> >> >> >> ksmps = 32
>> >> >> >> nchnls = 2
>> >> >> >> 0dbfs  = 1
>> >> >> >>
>> >> >> >> instr 1
>> >> >> >>
>> >> >> >> ShrtfL sprintf
>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >> >> >> sr
>> >> >> >>
>> >> >> >>
>> >> >> >> endin
>> >> >> >> 
>> >> >> >> 
>> >> >> >>
>> >> >> >> i 1 0 1
>> >> >> >> e
>> >> >> >> 
>> >> >> >> 
>> >> >> >>
>> >> >> >>
>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with matching
>> >> >> >> argument
>> >> >> >> types:
>> >> >> >> Found: S sprintf Sr
>> >> >> >> Line: 11 Loc: 1
>> >> >> >> Parsing failed due to 1 semantic error!
>> >> >> >> WARNING: Stopping on parser failure
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> >> >> >>
>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> >> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ------------------------------------------------------------------------------
>> >> >> >> Precog is a next-generation analytics platform capable of
>> >> >> >> advanced
>> >> >> >> analytics on semi-structured data. The platform includes APIs for
>> >> >> >> building
>> >> >> >> apps and a phenomenal toolset for data science. Developers can
>> >> >> >> use
>> >> >> >> our toolset for easy data analysis & visualization. Get a free
>> >> >> >> account!
>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >> >> _______________________________________________
>> >> >> >> Csound-devel mailing list
>> >> >> >> Csound-devel@lists.sourceforge.net
>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------------
>> >> >> Precog is a next-generation analytics platform capable of advanced
>> >> >> analytics on semi-structured data. The platform includes APIs for
>> >> >> building
>> >> >> apps and a phenomenal toolset for data science. Developers can use
>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >> >> account!
>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >> _______________________________________________
>> >> >> Csound-devel mailing list
>> >> >> Csound-devel@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Precog is a next-generation analytics platform capable of advanced
>> >> > analytics on semi-structured data. The platform includes APIs for
>> >> > building
>> >> > apps and a phenomenal toolset for data science. Developers can use
>> >> > our toolset for easy data analysis & visualization. Get a free
>> >> > account!
>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Precog is a next-generation analytics platform capable of advanced
>> > analytics on semi-structured data. The platform includes APIs for
>> > building
>> > apps and a phenomenal toolset for data science. Developers can use
>> > our toolset for easy data analysis & visualization. Get a free account!
>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-18 17:58
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
BTW Ben, not sure if your projects use nested if-thens, but I'm
finding it's a cause of problems.  I'm getting odd parsing issues in
one project, and odd runtime behavior in a test.csd I just wrote.
Looking through the issue now, but thought it worth mentioning as it
might be a possible root cause for your projects.

On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi  wrote:
> Thanks Ben too for contributing your time to test!
>
> I too am starting to run my projects with CS6 to check for errors.
> Most of my project shave a lot of code so they stress csound a bit
> more but make it a lot harder to figure out bugs.  I'm sure we'll get
> through all the bugs soon enough though. :)
>
> On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth  wrote:
>> hi steven,
>>
>> thank you, this issue to be resolved now.
>>
>> i'm excited about the new language features of cs6, so i'm try to debug a
>> rather large project (the orchestra is ~14000 lines).  unfortunately i am
>> now running into segfaults without an error messages.  i'll poke around a
>> bit more later this evening and see if i can isolate the problem.
>>
>> thanks for all of your hard work.
>>
>> --  ben
>>
>>
>> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi  wrote:
>>>
>>> Hi Ben,
>>>
>>> The label list function was not properly going down the TREE*
>>> structure to gather all labels, so the ones within if-blocks and until
>>> blocks did not work.  I tested with your example (added to csdtests
>>> now) and it seems to work alright now.  Could you pull and test there?
>>>  I get the expected output now:
>>>
>>> instr 1:  iLop = 5.000
>>> instr 1:  iLop = 4.000
>>> instr 1:  iLop = 3.000
>>> instr 1:  iLop = 2.000
>>> instr 1:  iLop = 1.000
>>>
>>> Thanks again for the report!
>>> steven
>>>
>>>
>>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth 
>>> wrote:
>>> > no problem steven.  i'll keep em coming.
>>> >
>>> > --  ben
>>> >
>>> >
>>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi  wrote:
>>> >>
>>> >> Hi Ben,
>>> >>
>>> >> Thanks for sending this test! Contributing these kinds of focused
>>> >> tests are extremely appreciated.  I'll take a look now and will reply
>>> >> once things are sorted out.
>>> >>
>>> >> Thanks!
>>> >> steven
>>> >>
>>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth 
>>> >> wrote:
>>> >> > cool, thank you steven.  it works now!
>>> >> >
>>> >> > i'm am running into some other issues that i'm having trouble
>>> >> > distilling
>>> >> > into a simple csd.  but below is my best shot.
>>> >> >
>>> >> > the bug has to do with labels for goto statements which are embedded
>>> >> > in
>>> >> > if-endif blocks.  as before, the code below works in cs5, but i get
>>> >> > errors
>>> >> > in cs6.  i get no errors if i remove the if statements and just do
>>> >> > the
>>> >> > loops.
>>> >> >
>>> >> >
>>> >> > 
>>> >> > 
>>> >> > 
>>> >> > 
>>> >> >
>>> >> > sr = 44100
>>> >> > ksmps = 32
>>> >> > nchnls = 2
>>> >> > 0dbfs  = 1
>>> >> >
>>> >> > instr 1
>>> >> > iToggle = 1
>>> >> >
>>> >> > if (iToggle == 0) then
>>> >> >     iNumberChildren = 5
>>> >> >     SampleSetChildrenLoop:
>>> >> >         print iNumberChildren
>>> >> >         iNumberChildren = iNumberChildren - 1
>>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>>> >> > else
>>> >> >     iLop = 5
>>> >> >     Looper:
>>> >> >         print iLop
>>> >> >         iLop = iLop - 1
>>> >> >     if (iLop > 0.) goto Looper
>>> >> > endif
>>> >> >
>>> >> >
>>> >> > endin
>>> >> > 
>>> >> > 
>>> >> >
>>> >> > i 1 0 1
>>> >> > e
>>> >> > 
>>> >> > 
>>> >> >
>>> >> >
>>> >> > Parsing successful!
>>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>>> >> >
>>> >> > Parsing failed due to 1 semantic error!
>>> >> > WARNING: Stopping on parser failure
>>> >> >
>>> >> > cannot compile orchestra
>>> >> >
>>> >> >
>>> >> > --  ben
>>> >> >
>>> >> >
>>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi 
>>> >> > wrote:
>>> >> >>
>>> >> >> Hi Ben,
>>> >> >>
>>> >> >> It should be fixed up now with latest in GIT.  The issue was that
>>> >> >> the
>>> >> >> T arg type wasn't matching against r- type vars.  In the example,
>>> >> >> the
>>> >> >> issue presented due to the use of sr in the sprintf line.  Thanks
>>> >> >> again for reporting it!
>>> >> >>
>>> >> >> steven
>>> >> >>
>>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi 
>>> >> >> wrote:
>>> >> >> > Hi Ben,
>>> >> >> >
>>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>>> >> >> > added
>>> >> >> > it
>>> >> >> > to the test suite here locally and will look into the bug now.
>>> >> >> >
>>> >> >> > steven
>>> >> >> >
>>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth 
>>> >> >> > wrote:
>>> >> >> >> hello,
>>> >> >> >>
>>> >> >> >> the following code worked in cs5, but i now get a "semantic
>>> >> >> >> error"
>>> >> >> >> in
>>> >> >> >> csound6 (built yesterday).  below is the csd and the resulting
>>> >> >> >> error
>>> >> >> >> (os x
>>> >> >> >> doubles)
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>
>>> >> >> >> sr = 44100
>>> >> >> >> ksmps = 32
>>> >> >> >> nchnls = 2
>>> >> >> >> 0dbfs  = 1
>>> >> >> >>
>>> >> >> >> instr 1
>>> >> >> >>
>>> >> >> >> ShrtfL sprintf
>>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>>> >> >> >> sr
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> endin
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>
>>> >> >> >> i 1 0 1
>>> >> >> >> e
>>> >> >> >> 
>>> >> >> >> 
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with matching
>>> >> >> >> argument
>>> >> >> >> types:
>>> >> >> >> Found: S sprintf Sr
>>> >> >> >> Line: 11 Loc: 1
>>> >> >> >> Parsing failed due to 1 semantic error!
>>> >> >> >> WARNING: Stopping on parser failure
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> --
>>> >> >> >> View this message in context:
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>>> >> >> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ------------------------------------------------------------------------------
>>> >> >> >> Precog is a next-generation analytics platform capable of
>>> >> >> >> advanced
>>> >> >> >> analytics on semi-structured data. The platform includes APIs for
>>> >> >> >> building
>>> >> >> >> apps and a phenomenal toolset for data science. Developers can
>>> >> >> >> use
>>> >> >> >> our toolset for easy data analysis & visualization. Get a free
>>> >> >> >> account!
>>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> >> >> _______________________________________________
>>> >> >> >> Csound-devel mailing list
>>> >> >> >> Csound-devel@lists.sourceforge.net
>>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> ------------------------------------------------------------------------------
>>> >> >> Precog is a next-generation analytics platform capable of advanced
>>> >> >> analytics on semi-structured data. The platform includes APIs for
>>> >> >> building
>>> >> >> apps and a phenomenal toolset for data science. Developers can use
>>> >> >> our toolset for easy data analysis & visualization. Get a free
>>> >> >> account!
>>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> >> _______________________________________________
>>> >> >> Csound-devel mailing list
>>> >> >> Csound-devel@lists.sourceforge.net
>>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > ------------------------------------------------------------------------------
>>> >> > Precog is a next-generation analytics platform capable of advanced
>>> >> > analytics on semi-structured data. The platform includes APIs for
>>> >> > building
>>> >> > apps and a phenomenal toolset for data science. Developers can use
>>> >> > our toolset for easy data analysis & visualization. Get a free
>>> >> > account!
>>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> > _______________________________________________
>>> >> > Csound-devel mailing list
>>> >> > Csound-devel@lists.sourceforge.net
>>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Precog is a next-generation analytics platform capable of advanced
>>> >> analytics on semi-structured data. The platform includes APIs for
>>> >> building
>>> >> apps and a phenomenal toolset for data science. Developers can use
>>> >> our toolset for easy data analysis & visualization. Get a free account!
>>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> _______________________________________________
>>> >> Csound-devel mailing list
>>> >> Csound-devel@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >
>>> >
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Precog is a next-generation analytics platform capable of advanced
>>> > analytics on semi-structured data. The platform includes APIs for
>>> > building
>>> > apps and a phenomenal toolset for data science. Developers can use
>>> > our toolset for easy data analysis & visualization. Get a free account!
>>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>>> > _______________________________________________
>>> > Csound-devel mailing list
>>> > Csound-devel@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Precog is a next-generation analytics platform capable of advanced
>>> analytics on semi-structured data. The platform includes APIs for building
>>> apps and a phenomenal toolset for data science. Developers can use
>>> our toolset for easy data analysis & visualization. Get a free account!
>>> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-18 19:27
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Following up, I'm not quite sure what's going on, as the AST's that
are generated and expanded look to be the same between csound5 and
csound6 for a test example I have, but exhibit different runtime
behavior.  Looks like this will take a while to sort out.

On Thu, Apr 18, 2013 at 5:58 PM, Steven Yi  wrote:
> BTW Ben, not sure if your projects use nested if-thens, but I'm
> finding it's a cause of problems.  I'm getting odd parsing issues in
> one project, and odd runtime behavior in a test.csd I just wrote.
> Looking through the issue now, but thought it worth mentioning as it
> might be a possible root cause for your projects.
>
> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi  wrote:
>> Thanks Ben too for contributing your time to test!
>>
>> I too am starting to run my projects with CS6 to check for errors.
>> Most of my project shave a lot of code so they stress csound a bit
>> more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> through all the bugs soon enough though. :)
>>
>> On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth  wrote:
>>> hi steven,
>>>
>>> thank you, this issue to be resolved now.
>>>
>>> i'm excited about the new language features of cs6, so i'm try to debug a
>>> rather large project (the orchestra is ~14000 lines).  unfortunately i am
>>> now running into segfaults without an error messages.  i'll poke around a
>>> bit more later this evening and see if i can isolate the problem.
>>>
>>> thanks for all of your hard work.
>>>
>>> --  ben
>>>
>>>
>>> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi  wrote:
>>>>
>>>> Hi Ben,
>>>>
>>>> The label list function was not properly going down the TREE*
>>>> structure to gather all labels, so the ones within if-blocks and until
>>>> blocks did not work.  I tested with your example (added to csdtests
>>>> now) and it seems to work alright now.  Could you pull and test there?
>>>>  I get the expected output now:
>>>>
>>>> instr 1:  iLop = 5.000
>>>> instr 1:  iLop = 4.000
>>>> instr 1:  iLop = 3.000
>>>> instr 1:  iLop = 2.000
>>>> instr 1:  iLop = 1.000
>>>>
>>>> Thanks again for the report!
>>>> steven
>>>>
>>>>
>>>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth 
>>>> wrote:
>>>> > no problem steven.  i'll keep em coming.
>>>> >
>>>> > --  ben
>>>> >
>>>> >
>>>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi  wrote:
>>>> >>
>>>> >> Hi Ben,
>>>> >>
>>>> >> Thanks for sending this test! Contributing these kinds of focused
>>>> >> tests are extremely appreciated.  I'll take a look now and will reply
>>>> >> once things are sorted out.
>>>> >>
>>>> >> Thanks!
>>>> >> steven
>>>> >>
>>>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth 
>>>> >> wrote:
>>>> >> > cool, thank you steven.  it works now!
>>>> >> >
>>>> >> > i'm am running into some other issues that i'm having trouble
>>>> >> > distilling
>>>> >> > into a simple csd.  but below is my best shot.
>>>> >> >
>>>> >> > the bug has to do with labels for goto statements which are embedded
>>>> >> > in
>>>> >> > if-endif blocks.  as before, the code below works in cs5, but i get
>>>> >> > errors
>>>> >> > in cs6.  i get no errors if i remove the if statements and just do
>>>> >> > the
>>>> >> > loops.
>>>> >> >
>>>> >> >
>>>> >> > 
>>>> >> > 
>>>> >> > 
>>>> >> > 
>>>> >> >
>>>> >> > sr = 44100
>>>> >> > ksmps = 32
>>>> >> > nchnls = 2
>>>> >> > 0dbfs  = 1
>>>> >> >
>>>> >> > instr 1
>>>> >> > iToggle = 1
>>>> >> >
>>>> >> > if (iToggle == 0) then
>>>> >> >     iNumberChildren = 5
>>>> >> >     SampleSetChildrenLoop:
>>>> >> >         print iNumberChildren
>>>> >> >         iNumberChildren = iNumberChildren - 1
>>>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>>>> >> > else
>>>> >> >     iLop = 5
>>>> >> >     Looper:
>>>> >> >         print iLop
>>>> >> >         iLop = iLop - 1
>>>> >> >     if (iLop > 0.) goto Looper
>>>> >> > endif
>>>> >> >
>>>> >> >
>>>> >> > endin
>>>> >> > 
>>>> >> > 
>>>> >> >
>>>> >> > i 1 0 1
>>>> >> > e
>>>> >> > 
>>>> >> > 
>>>> >> >
>>>> >> >
>>>> >> > Parsing successful!
>>>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>>>> >> >
>>>> >> > Parsing failed due to 1 semantic error!
>>>> >> > WARNING: Stopping on parser failure
>>>> >> >
>>>> >> > cannot compile orchestra
>>>> >> >
>>>> >> >
>>>> >> > --  ben
>>>> >> >
>>>> >> >
>>>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi 
>>>> >> > wrote:
>>>> >> >>
>>>> >> >> Hi Ben,
>>>> >> >>
>>>> >> >> It should be fixed up now with latest in GIT.  The issue was that
>>>> >> >> the
>>>> >> >> T arg type wasn't matching against r- type vars.  In the example,
>>>> >> >> the
>>>> >> >> issue presented due to the use of sr in the sprintf line.  Thanks
>>>> >> >> again for reporting it!
>>>> >> >>
>>>> >> >> steven
>>>> >> >>
>>>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi 
>>>> >> >> wrote:
>>>> >> >> > Hi Ben,
>>>> >> >> >
>>>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>>>> >> >> > added
>>>> >> >> > it
>>>> >> >> > to the test suite here locally and will look into the bug now.
>>>> >> >> >
>>>> >> >> > steven
>>>> >> >> >
>>>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth 
>>>> >> >> > wrote:
>>>> >> >> >> hello,
>>>> >> >> >>
>>>> >> >> >> the following code worked in cs5, but i now get a "semantic
>>>> >> >> >> error"
>>>> >> >> >> in
>>>> >> >> >> csound6 (built yesterday).  below is the csd and the resulting
>>>> >> >> >> error
>>>> >> >> >> (os x
>>>> >> >> >> doubles)
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> 
>>>> >> >> >> 
>>>> >> >> >> 
>>>> >> >> >> 
>>>> >> >> >>
>>>> >> >> >> sr = 44100
>>>> >> >> >> ksmps = 32
>>>> >> >> >> nchnls = 2
>>>> >> >> >> 0dbfs  = 1
>>>> >> >> >>
>>>> >> >> >> instr 1
>>>> >> >> >>
>>>> >> >> >> ShrtfL sprintf
>>>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>>>> >> >> >> sr
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> endin
>>>> >> >> >> 
>>>> >> >> >> 
>>>> >> >> >>
>>>> >> >> >> i 1 0 1
>>>> >> >> >> e
>>>> >> >> >> 
>>>> >> >> >> 
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with matching
>>>> >> >> >> argument
>>>> >> >> >> types:
>>>> >> >> >> Found: S sprintf Sr
>>>> >> >> >> Line: 11 Loc: 1
>>>> >> >> >> Parsing failed due to 1 semantic error!
>>>> >> >> >> WARNING: Stopping on parser failure
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> --
>>>> >> >> >> View this message in context:
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>>>> >> >> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >>
>>>> >> >> >> ------------------------------------------------------------------------------
>>>> >> >> >> Precog is a next-generation analytics platform capable of
>>>> >> >> >> advanced
>>>> >> >> >> analytics on semi-structured data. The platform includes APIs for
>>>> >> >> >> building
>>>> >> >> >> apps and a phenomenal toolset for data science. Developers can
>>>> >> >> >> use
>>>> >> >> >> our toolset for easy data analysis & visualization. Get a free
>>>> >> >> >> account!
>>>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>>> >> >> >> _______________________________________________
>>>> >> >> >> Csound-devel mailing list
>>>> >> >> >> Csound-devel@lists.sourceforge.net
>>>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >> ------------------------------------------------------------------------------
>>>> >> >> Precog is a next-generation analytics platform capable of advanced
>>>> >> >> analytics on semi-structured data. The platform includes APIs for
>>>> >> >> building
>>>> >> >> apps and a phenomenal toolset for data science. Developers can use
>>>> >> >> our toolset for easy data analysis & visualization. Get a free
>>>> >> >> account!
>>>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>>> >> >> _______________________________________________
>>>> >> >> Csound-devel mailing list
>>>> >> >> Csound-devel@lists.sourceforge.net
>>>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > ------------------------------------------------------------------------------
>>>> >> > Precog is a next-generation analytics platform capable of advanced
>>>> >> > analytics on semi-structured data. The platform includes APIs for
>>>> >> > building
>>>> >> > apps and a phenomenal toolset for data science. Developers can use
>>>> >> > our toolset for easy data analysis & visualization. Get a free
>>>> >> > account!
>>>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>>>> >> > _______________________________________________
>>>> >> > Csound-devel mailing list
>>>> >> > Csound-devel@lists.sourceforge.net
>>>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> ------------------------------------------------------------------------------
>>>> >> Precog is a next-generation analytics platform capable of advanced
>>>> >> analytics on semi-structured data. The platform includes APIs for
>>>> >> building
>>>> >> apps and a phenomenal toolset for data science. Developers can use
>>>> >> our toolset for easy data analysis & visualization. Get a free account!
>>>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>>> >> _______________________________________________
>>>> >> Csound-devel mailing list
>>>> >> Csound-devel@lists.sourceforge.net
>>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > ------------------------------------------------------------------------------
>>>> > Precog is a next-generation analytics platform capable of advanced
>>>> > analytics on semi-structured data. The platform includes APIs for
>>>> > building
>>>> > apps and a phenomenal toolset for data science. Developers can use
>>>> > our toolset for easy data analysis & visualization. Get a free account!
>>>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>>>> > _______________________________________________
>>>> > Csound-devel mailing list
>>>> > Csound-devel@lists.sourceforge.net
>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> >
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Precog is a next-generation analytics platform capable of advanced
>>>> analytics on semi-structured data. The platform includes APIs for building
>>>> apps and a phenomenal toolset for data science. Developers can use
>>>> our toolset for easy data analysis & visualization. Get a free account!
>>>> http://www2.precog.com/precogplatform/slashdotnewsletter
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Precog is a next-generation analytics platform capable of advanced
>>> analytics on semi-structured data. The platform includes APIs for building
>>> apps and a phenomenal toolset for data science. Developers can use
>>> our toolset for easy data analysis & visualization. Get a free account!
>>> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-18 20:04
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
hi steven,

these days i write orchestras that only have a few instruments, but with lots of switches inside to make it easy to chain together different dsp routines.  so, yeah, i'm knee-deep in conditionals :)

please let me know if i assist with any other testing.  happy to help out where i can.


--  ben


On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
BTW Ben, not sure if your projects use nested if-thens, but I'm
finding it's a cause of problems.  I'm getting odd parsing issues in
one project, and odd runtime behavior in a test.csd I just wrote.
Looking through the issue now, but thought it worth mentioning as it
might be a possible root cause for your projects.

On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
> Thanks Ben too for contributing your time to test!
>
> I too am starting to run my projects with CS6 to check for errors.
> Most of my project shave a lot of code so they stress csound a bit
> more but make it a lot harder to figure out bugs.  I'm sure we'll get
> through all the bugs soon enough though. :)
>
> On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
>> hi steven,
>>
>> thank you, this issue to be resolved now.
>>
>> i'm excited about the new language features of cs6, so i'm try to debug a
>> rather large project (the orchestra is ~14000 lines).  unfortunately i am
>> now running into segfaults without an error messages.  i'll poke around a
>> bit more later this evening and see if i can isolate the problem.
>>
>> thanks for all of your hard work.
>>
>> --  ben
>>
>>
>> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> Hi Ben,
>>>
>>> The label list function was not properly going down the TREE*
>>> structure to gather all labels, so the ones within if-blocks and until
>>> blocks did not work.  I tested with your example (added to csdtests
>>> now) and it seems to work alright now.  Could you pull and test there?
>>>  I get the expected output now:
>>>
>>> instr 1:  iLop = 5.000
>>> instr 1:  iLop = 4.000
>>> instr 1:  iLop = 3.000
>>> instr 1:  iLop = 2.000
>>> instr 1:  iLop = 1.000
>>>
>>> Thanks again for the report!
>>> steven
>>>
>>>
>>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com>
>>> wrote:
>>> > no problem steven.  i'll keep em coming.
>>> >
>>> > --  ben
>>> >
>>> >
>>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>> >>
>>> >> Hi Ben,
>>> >>
>>> >> Thanks for sending this test! Contributing these kinds of focused
>>> >> tests are extremely appreciated.  I'll take a look now and will reply
>>> >> once things are sorted out.
>>> >>
>>> >> Thanks!
>>> >> steven
>>> >>
>>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth <hackbarth@gmail.com>
>>> >> wrote:
>>> >> > cool, thank you steven.  it works now!
>>> >> >
>>> >> > i'm am running into some other issues that i'm having trouble
>>> >> > distilling
>>> >> > into a simple csd.  but below is my best shot.
>>> >> >
>>> >> > the bug has to do with labels for goto statements which are embedded
>>> >> > in
>>> >> > if-endif blocks.  as before, the code below works in cs5, but i get
>>> >> > errors
>>> >> > in cs6.  i get no errors if i remove the if statements and just do
>>> >> > the
>>> >> > loops.
>>> >> >
>>> >> >
>>> >> > <CsoundSynthesizer>
>>> >> > <CsOptions>
>>> >> > </CsOptions>
>>> >> > <CsInstruments>
>>> >> >
>>> >> > sr = 44100
>>> >> > ksmps = 32
>>> >> > nchnls = 2
>>> >> > 0dbfs  = 1
>>> >> >
>>> >> > instr 1
>>> >> > iToggle = 1
>>> >> >
>>> >> > if (iToggle == 0) then
>>> >> >     iNumberChildren = 5
>>> >> >     SampleSetChildrenLoop:
>>> >> >         print iNumberChildren
>>> >> >         iNumberChildren = iNumberChildren - 1
>>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>>> >> > else
>>> >> >     iLop = 5
>>> >> >     Looper:
>>> >> >         print iLop
>>> >> >         iLop = iLop - 1
>>> >> >     if (iLop > 0.) goto Looper
>>> >> > endif
>>> >> >
>>> >> >
>>> >> > endin
>>> >> > </CsInstruments>
>>> >> > <CsScore>
>>> >> >
>>> >> > i 1 0 1
>>> >> > e
>>> >> > </CsScore>
>>> >> > </CsoundSynthesizer>
>>> >> >
>>> >> >
>>> >> > Parsing successful!
>>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>>> >> >
>>> >> > Parsing failed due to 1 semantic error!
>>> >> > WARNING: Stopping on parser failure
>>> >> >
>>> >> > cannot compile orchestra
>>> >> >
>>> >> >
>>> >> > --  ben
>>> >> >
>>> >> >
>>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> Hi Ben,
>>> >> >>
>>> >> >> It should be fixed up now with latest in GIT.  The issue was that
>>> >> >> the
>>> >> >> T arg type wasn't matching against r- type vars.  In the example,
>>> >> >> the
>>> >> >> issue presented due to the use of sr in the sprintf line.  Thanks
>>> >> >> again for reporting it!
>>> >> >>
>>> >> >> steven
>>> >> >>
>>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com>
>>> >> >> wrote:
>>> >> >> > Hi Ben,
>>> >> >> >
>>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>>> >> >> > added
>>> >> >> > it
>>> >> >> > to the test suite here locally and will look into the bug now.
>>> >> >> >
>>> >> >> > steven
>>> >> >> >
>>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth <hackbarth@gmail.com>
>>> >> >> > wrote:
>>> >> >> >> hello,
>>> >> >> >>
>>> >> >> >> the following code worked in cs5, but i now get a "semantic
>>> >> >> >> error"
>>> >> >> >> in
>>> >> >> >> csound6 (built yesterday).  below is the csd and the resulting
>>> >> >> >> error
>>> >> >> >> (os x
>>> >> >> >> doubles)
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> <CsoundSynthesizer>
>>> >> >> >> <CsOptions>
>>> >> >> >> </CsOptions>
>>> >> >> >> <CsInstruments>
>>> >> >> >>
>>> >> >> >> sr = 44100
>>> >> >> >> ksmps = 32
>>> >> >> >> nchnls = 2
>>> >> >> >> 0dbfs  = 1
>>> >> >> >>
>>> >> >> >> instr 1
>>> >> >> >>
>>> >> >> >> ShrtfL sprintf
>>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>>> >> >> >> sr
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> endin
>>> >> >> >> </CsInstruments>
>>> >> >> >> <CsScore>
>>> >> >> >>
>>> >> >> >> i 1 0 1
>>> >> >> >> e
>>> >> >> >> </CsScore>
>>> >> >> >> </CsoundSynthesizer>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with matching
>>> >> >> >> argument
>>> >> >> >> types:
>>> >> >> >> Found: S sprintf Sr
>>> >> >> >> Line: 11 Loc: 1
>>> >> >> >> Parsing failed due to 1 semantic error!
>>> >> >> >> WARNING: Stopping on parser failure
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> --
>>> >> >> >> View this message in context:
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>>> >> >> >> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ------------------------------------------------------------------------------
>>> >> >> >> Precog is a next-generation analytics platform capable of
>>> >> >> >> advanced
>>> >> >> >> analytics on semi-structured data. The platform includes APIs for
>>> >> >> >> building
>>> >> >> >> apps and a phenomenal toolset for data science. Developers can
>>> >> >> >> use
>>> >> >> >> our toolset for easy data analysis & visualization. Get a free
>>> >> >> >> account!
>>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> >> >> _______________________________________________
>>> >> >> >> Csound-devel mailing list
>>> >> >> >> Csound-devel@lists.sourceforge.net
>>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> ------------------------------------------------------------------------------
>>> >> >> Precog is a next-generation analytics platform capable of advanced
>>> >> >> analytics on semi-structured data. The platform includes APIs for
>>> >> >> building
>>> >> >> apps and a phenomenal toolset for data science. Developers can use
>>> >> >> our toolset for easy data analysis & visualization. Get a free
>>> >> >> account!
>>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> >> _______________________________________________
>>> >> >> Csound-devel mailing list
>>> >> >> Csound-devel@lists.sourceforge.net
>>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > ------------------------------------------------------------------------------
>>> >> > Precog is a next-generation analytics platform capable of advanced
>>> >> > analytics on semi-structured data. The platform includes APIs for
>>> >> > building
>>> >> > apps and a phenomenal toolset for data science. Developers can use
>>> >> > our toolset for easy data analysis & visualization. Get a free
>>> >> > account!
>>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> > _______________________________________________
>>> >> > Csound-devel mailing list
>>> >> > Csound-devel@lists.sourceforge.net
>>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Precog is a next-generation analytics platform capable of advanced
>>> >> analytics on semi-structured data. The platform includes APIs for
>>> >> building
>>> >> apps and a phenomenal toolset for data science. Developers can use
>>> >> our toolset for easy data analysis & visualization. Get a free account!
>>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> >> _______________________________________________
>>> >> Csound-devel mailing list
>>> >> Csound-devel@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >
>>> >
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Precog is a next-generation analytics platform capable of advanced
>>> > analytics on semi-structured data. The platform includes APIs for
>>> > building
>>> > apps and a phenomenal toolset for data science. Developers can use
>>> > our toolset for easy data analysis & visualization. Get a free account!
>>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>>> > _______________________________________________
>>> > Csound-devel mailing list
>>> > Csound-devel@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Precog is a next-generation analytics platform capable of advanced
>>> analytics on semi-structured data. The platform includes APIs for building
>>> apps and a phenomenal toolset for data science. Developers can use
>>> our toolset for easy data analysis & visualization. Get a free account!
>>> http://www2.precog.com/precogplatform/slashdotnewsletter
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-04-19 17:47
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Hi Ben,

Took a while but I think I've managed to fix the if-then issue.  There
was some code that was left-over from Csound5 when I redid tree
expansion that I had to remove as it wasn't necessary, and indeed
caused a bug with the wrong ->next pointer being set.  I'm able to run
the excerpt.csd I had posted to the user list now that uses a fair
amount of if-then's, some nested.

Could you pull from GIT and give the latest a try?

Thanks!
steven

On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth  wrote:
> hi steven,
>
> these days i write orchestras that only have a few instruments, but with
> lots of switches inside to make it easy to chain together different dsp
> routines.  so, yeah, i'm knee-deep in conditionals :)
>
> please let me know if i assist with any other testing.  happy to help out
> where i can.
>
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi  wrote:
>>
>> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> finding it's a cause of problems.  I'm getting odd parsing issues in
>> one project, and odd runtime behavior in a test.csd I just wrote.
>> Looking through the issue now, but thought it worth mentioning as it
>> might be a possible root cause for your projects.
>>
>> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi  wrote:
>> > Thanks Ben too for contributing your time to test!
>> >
>> > I too am starting to run my projects with CS6 to check for errors.
>> > Most of my project shave a lot of code so they stress csound a bit
>> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> > through all the bugs soon enough though. :)
>> >
>> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth 
>> > wrote:
>> >> hi steven,
>> >>
>> >> thank you, this issue to be resolved now.
>> >>
>> >> i'm excited about the new language features of cs6, so i'm try to debug
>> >> a
>> >> rather large project (the orchestra is ~14000 lines).  unfortunately i
>> >> am
>> >> now running into segfaults without an error messages.  i'll poke around
>> >> a
>> >> bit more later this evening and see if i can isolate the problem.
>> >>
>> >> thanks for all of your hard work.
>> >>
>> >> --  ben
>> >>
>> >>
>> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi  wrote:
>> >>>
>> >>> Hi Ben,
>> >>>
>> >>> The label list function was not properly going down the TREE*
>> >>> structure to gather all labels, so the ones within if-blocks and until
>> >>> blocks did not work.  I tested with your example (added to csdtests
>> >>> now) and it seems to work alright now.  Could you pull and test there?
>> >>>  I get the expected output now:
>> >>>
>> >>> instr 1:  iLop = 5.000
>> >>> instr 1:  iLop = 4.000
>> >>> instr 1:  iLop = 3.000
>> >>> instr 1:  iLop = 2.000
>> >>> instr 1:  iLop = 1.000
>> >>>
>> >>> Thanks again for the report!
>> >>> steven
>> >>>
>> >>>
>> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth 
>> >>> wrote:
>> >>> > no problem steven.  i'll keep em coming.
>> >>> >
>> >>> > --  ben
>> >>> >
>> >>> >
>> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi 
>> >>> > wrote:
>> >>> >>
>> >>> >> Hi Ben,
>> >>> >>
>> >>> >> Thanks for sending this test! Contributing these kinds of focused
>> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >>> >> reply
>> >>> >> once things are sorted out.
>> >>> >>
>> >>> >> Thanks!
>> >>> >> steven
>> >>> >>
>> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >>> >> 
>> >>> >> wrote:
>> >>> >> > cool, thank you steven.  it works now!
>> >>> >> >
>> >>> >> > i'm am running into some other issues that i'm having trouble
>> >>> >> > distilling
>> >>> >> > into a simple csd.  but below is my best shot.
>> >>> >> >
>> >>> >> > the bug has to do with labels for goto statements which are
>> >>> >> > embedded
>> >>> >> > in
>> >>> >> > if-endif blocks.  as before, the code below works in cs5, but i
>> >>> >> > get
>> >>> >> > errors
>> >>> >> > in cs6.  i get no errors if i remove the if statements and just
>> >>> >> > do
>> >>> >> > the
>> >>> >> > loops.
>> >>> >> >
>> >>> >> >
>> >>> >> > 
>> >>> >> > 
>> >>> >> > 
>> >>> >> > 
>> >>> >> >
>> >>> >> > sr = 44100
>> >>> >> > ksmps = 32
>> >>> >> > nchnls = 2
>> >>> >> > 0dbfs  = 1
>> >>> >> >
>> >>> >> > instr 1
>> >>> >> > iToggle = 1
>> >>> >> >
>> >>> >> > if (iToggle == 0) then
>> >>> >> >     iNumberChildren = 5
>> >>> >> >     SampleSetChildrenLoop:
>> >>> >> >         print iNumberChildren
>> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >>> >> > else
>> >>> >> >     iLop = 5
>> >>> >> >     Looper:
>> >>> >> >         print iLop
>> >>> >> >         iLop = iLop - 1
>> >>> >> >     if (iLop > 0.) goto Looper
>> >>> >> > endif
>> >>> >> >
>> >>> >> >
>> >>> >> > endin
>> >>> >> > 
>> >>> >> > 
>> >>> >> >
>> >>> >> > i 1 0 1
>> >>> >> > e
>> >>> >> > 
>> >>> >> > 
>> >>> >> >
>> >>> >> >
>> >>> >> > Parsing successful!
>> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >>> >> >
>> >>> >> > Parsing failed due to 1 semantic error!
>> >>> >> > WARNING: Stopping on parser failure
>> >>> >> >
>> >>> >> > cannot compile orchestra
>> >>> >> >
>> >>> >> >
>> >>> >> > --  ben
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi 
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi Ben,
>> >>> >> >>
>> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >>> >> >> that
>> >>> >> >> the
>> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >>> >> >> example,
>> >>> >> >> the
>> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >>> >> >> Thanks
>> >>> >> >> again for reporting it!
>> >>> >> >>
>> >>> >> >> steven
>> >>> >> >>
>> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi 
>> >>> >> >> wrote:
>> >>> >> >> > Hi Ben,
>> >>> >> >> >
>> >>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >>> >> >> > added
>> >>> >> >> > it
>> >>> >> >> > to the test suite here locally and will look into the bug now.
>> >>> >> >> >
>> >>> >> >> > steven
>> >>> >> >> >
>> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >>> >> >> > 
>> >>> >> >> > wrote:
>> >>> >> >> >> hello,
>> >>> >> >> >>
>> >>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >>> >> >> >> error"
>> >>> >> >> >> in
>> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >>> >> >> >> resulting
>> >>> >> >> >> error
>> >>> >> >> >> (os x
>> >>> >> >> >> doubles)
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> 
>> >>> >> >> >> 
>> >>> >> >> >> 
>> >>> >> >> >> 
>> >>> >> >> >>
>> >>> >> >> >> sr = 44100
>> >>> >> >> >> ksmps = 32
>> >>> >> >> >> nchnls = 2
>> >>> >> >> >> 0dbfs  = 1
>> >>> >> >> >>
>> >>> >> >> >> instr 1
>> >>> >> >> >>
>> >>> >> >> >> ShrtfL sprintf
>> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >>> >> >> >> sr
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> endin
>> >>> >> >> >> 
>> >>> >> >> >> 
>> >>> >> >> >>
>> >>> >> >> >> i 1 0 1
>> >>> >> >> >> e
>> >>> >> >> >> 
>> >>> >> >> >> 
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >>> >> >> >> matching
>> >>> >> >> >> argument
>> >>> >> >> >> types:
>> >>> >> >> >> Found: S sprintf Sr
>> >>> >> >> >> Line: 11 Loc: 1
>> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >>> >> >> >> WARNING: Stopping on parser failure
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >>> >> >> >> Nabble.com.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> ------------------------------------------------------------------------------
>> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> >> advanced
>> >>> >> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> >> for
>> >>> >> >> >> building
>> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >>> >> >> >> can
>> >>> >> >> >> use
>> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >>> >> >> >> free
>> >>> >> >> >> account!
>> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> >> _______________________________________________
>> >>> >> >> >> Csound-devel mailing list
>> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> ------------------------------------------------------------------------------
>> >>> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> advanced
>> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> for
>> >>> >> >> building
>> >>> >> >> apps and a phenomenal toolset for data science. Developers can
>> >>> >> >> use
>> >>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> >> account!
>> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> _______________________________________________
>> >>> >> >> Csound-devel mailing list
>> >>> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > ------------------------------------------------------------------------------
>> >>> >> > Precog is a next-generation analytics platform capable of
>> >>> >> > advanced
>> >>> >> > analytics on semi-structured data. The platform includes APIs for
>> >>> >> > building
>> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >>> >> > use
>> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >>> >> > account!
>> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> > _______________________________________________
>> >>> >> > Csound-devel mailing list
>> >>> >> > Csound-devel@lists.sourceforge.net
>> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------------------------
>> >>> >> Precog is a next-generation analytics platform capable of advanced
>> >>> >> analytics on semi-structured data. The platform includes APIs for
>> >>> >> building
>> >>> >> apps and a phenomenal toolset for data science. Developers can use
>> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> account!
>> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> _______________________________________________
>> >>> >> Csound-devel mailing list
>> >>> >> Csound-devel@lists.sourceforge.net
>> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------------------------
>> >>> > Precog is a next-generation analytics platform capable of advanced
>> >>> > analytics on semi-structured data. The platform includes APIs for
>> >>> > building
>> >>> > apps and a phenomenal toolset for data science. Developers can use
>> >>> > our toolset for easy data analysis & visualization. Get a free
>> >>> > account!
>> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> > _______________________________________________
>> >>> > Csound-devel mailing list
>> >>> > Csound-devel@lists.sourceforge.net
>> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Precog is a next-generation analytics platform capable of advanced
>> >>> analytics on semi-structured data. The platform includes APIs for
>> >>> building
>> >>> apps and a phenomenal toolset for data science. Developers can use
>> >>> our toolset for easy data analysis & visualization. Get a free
>> >>> account!
>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-21 17:20
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
hi steven,

i've pulled from git but am still getting segfaults.  i've narrowed my particular problem down to an issue with the "schedule" opcode in csound6:

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr     99
    schedule 100, 0, p3
endin


instr     100
    prints    "------------------------------\n"
endin


</CsInstruments>
<CsScore>
i99 0 1
</CsScore>
</CsoundSynthesizer>


SECTION 1:
new alloc for instr 99:
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score.           overall amps:  0.00000  0.00000
       overall samples out of range:        0        0
0 errors in performance



--  ben


On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

Took a while but I think I've managed to fix the if-then issue.  There
was some code that was left-over from Csound5 when I redid tree
expansion that I had to remove as it wasn't necessary, and indeed
caused a bug with the wrong ->next pointer being set.  I'm able to run
the excerpt.csd I had posted to the user list now that uses a fair
amount of if-then's, some nested.

Could you pull from GIT and give the latest a try?

Thanks!
steven

On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> hi steven,
>
> these days i write orchestras that only have a few instruments, but with
> lots of switches inside to make it easy to chain together different dsp
> routines.  so, yeah, i'm knee-deep in conditionals :)
>
> please let me know if i assist with any other testing.  happy to help out
> where i can.
>
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> finding it's a cause of problems.  I'm getting odd parsing issues in
>> one project, and odd runtime behavior in a test.csd I just wrote.
>> Looking through the issue now, but thought it worth mentioning as it
>> might be a possible root cause for your projects.
>>
>> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Thanks Ben too for contributing your time to test!
>> >
>> > I too am starting to run my projects with CS6 to check for errors.
>> > Most of my project shave a lot of code so they stress csound a bit
>> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> > through all the bugs soon enough though. :)
>> >
>> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com>
>> > wrote:
>> >> hi steven,
>> >>
>> >> thank you, this issue to be resolved now.
>> >>
>> >> i'm excited about the new language features of cs6, so i'm try to debug
>> >> a
>> >> rather large project (the orchestra is ~14000 lines).  unfortunately i
>> >> am
>> >> now running into segfaults without an error messages.  i'll poke around
>> >> a
>> >> bit more later this evening and see if i can isolate the problem.
>> >>
>> >> thanks for all of your hard work.
>> >>
>> >> --  ben
>> >>
>> >>
>> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi Ben,
>> >>>
>> >>> The label list function was not properly going down the TREE*
>> >>> structure to gather all labels, so the ones within if-blocks and until
>> >>> blocks did not work.  I tested with your example (added to csdtests
>> >>> now) and it seems to work alright now.  Could you pull and test there?
>> >>>  I get the expected output now:
>> >>>
>> >>> instr 1:  iLop = 5.000
>> >>> instr 1:  iLop = 4.000
>> >>> instr 1:  iLop = 3.000
>> >>> instr 1:  iLop = 2.000
>> >>> instr 1:  iLop = 1.000
>> >>>
>> >>> Thanks again for the report!
>> >>> steven
>> >>>
>> >>>
>> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com>
>> >>> wrote:
>> >>> > no problem steven.  i'll keep em coming.
>> >>> >
>> >>> > --  ben
>> >>> >
>> >>> >
>> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Hi Ben,
>> >>> >>
>> >>> >> Thanks for sending this test! Contributing these kinds of focused
>> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >>> >> reply
>> >>> >> once things are sorted out.
>> >>> >>
>> >>> >> Thanks!
>> >>> >> steven
>> >>> >>
>> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >>> >> <hackbarth@gmail.com>
>> >>> >> wrote:
>> >>> >> > cool, thank you steven.  it works now!
>> >>> >> >
>> >>> >> > i'm am running into some other issues that i'm having trouble
>> >>> >> > distilling
>> >>> >> > into a simple csd.  but below is my best shot.
>> >>> >> >
>> >>> >> > the bug has to do with labels for goto statements which are
>> >>> >> > embedded
>> >>> >> > in
>> >>> >> > if-endif blocks.  as before, the code below works in cs5, but i
>> >>> >> > get
>> >>> >> > errors
>> >>> >> > in cs6.  i get no errors if i remove the if statements and just
>> >>> >> > do
>> >>> >> > the
>> >>> >> > loops.
>> >>> >> >
>> >>> >> >
>> >>> >> > <CsoundSynthesizer>
>> >>> >> > <CsOptions>
>> >>> >> > </CsOptions>
>> >>> >> > <CsInstruments>
>> >>> >> >
>> >>> >> > sr = 44100
>> >>> >> > ksmps = 32
>> >>> >> > nchnls = 2
>> >>> >> > 0dbfs  = 1
>> >>> >> >
>> >>> >> > instr 1
>> >>> >> > iToggle = 1
>> >>> >> >
>> >>> >> > if (iToggle == 0) then
>> >>> >> >     iNumberChildren = 5
>> >>> >> >     SampleSetChildrenLoop:
>> >>> >> >         print iNumberChildren
>> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >>> >> > else
>> >>> >> >     iLop = 5
>> >>> >> >     Looper:
>> >>> >> >         print iLop
>> >>> >> >         iLop = iLop - 1
>> >>> >> >     if (iLop > 0.) goto Looper
>> >>> >> > endif
>> >>> >> >
>> >>> >> >
>> >>> >> > endin
>> >>> >> > </CsInstruments>
>> >>> >> > <CsScore>
>> >>> >> >
>> >>> >> > i 1 0 1
>> >>> >> > e
>> >>> >> > </CsScore>
>> >>> >> > </CsoundSynthesizer>
>> >>> >> >
>> >>> >> >
>> >>> >> > Parsing successful!
>> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >>> >> >
>> >>> >> > Parsing failed due to 1 semantic error!
>> >>> >> > WARNING: Stopping on parser failure
>> >>> >> >
>> >>> >> > cannot compile orchestra
>> >>> >> >
>> >>> >> >
>> >>> >> > --  ben
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi Ben,
>> >>> >> >>
>> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >>> >> >> that
>> >>> >> >> the
>> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >>> >> >> example,
>> >>> >> >> the
>> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >>> >> >> Thanks
>> >>> >> >> again for reporting it!
>> >>> >> >>
>> >>> >> >> steven
>> >>> >> >>
>> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com>
>> >>> >> >> wrote:
>> >>> >> >> > Hi Ben,
>> >>> >> >> >
>> >>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >>> >> >> > added
>> >>> >> >> > it
>> >>> >> >> > to the test suite here locally and will look into the bug now.
>> >>> >> >> >
>> >>> >> >> > steven
>> >>> >> >> >
>> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >>> >> >> > <hackbarth@gmail.com>
>> >>> >> >> > wrote:
>> >>> >> >> >> hello,
>> >>> >> >> >>
>> >>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >>> >> >> >> error"
>> >>> >> >> >> in
>> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >>> >> >> >> resulting
>> >>> >> >> >> error
>> >>> >> >> >> (os x
>> >>> >> >> >> doubles)
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> <CsoundSynthesizer>
>> >>> >> >> >> <CsOptions>
>> >>> >> >> >> </CsOptions>
>> >>> >> >> >> <CsInstruments>
>> >>> >> >> >>
>> >>> >> >> >> sr = 44100
>> >>> >> >> >> ksmps = 32
>> >>> >> >> >> nchnls = 2
>> >>> >> >> >> 0dbfs  = 1
>> >>> >> >> >>
>> >>> >> >> >> instr 1
>> >>> >> >> >>
>> >>> >> >> >> ShrtfL sprintf
>> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >>> >> >> >> sr
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> endin
>> >>> >> >> >> </CsInstruments>
>> >>> >> >> >> <CsScore>
>> >>> >> >> >>
>> >>> >> >> >> i 1 0 1
>> >>> >> >> >> e
>> >>> >> >> >> </CsScore>
>> >>> >> >> >> </CsoundSynthesizer>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >>> >> >> >> matching
>> >>> >> >> >> argument
>> >>> >> >> >> types:
>> >>> >> >> >> Found: S sprintf Sr
>> >>> >> >> >> Line: 11 Loc: 1
>> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >>> >> >> >> WARNING: Stopping on parser failure
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >>> >> >> >> Nabble.com.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> ------------------------------------------------------------------------------
>> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> >> advanced
>> >>> >> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> >> for
>> >>> >> >> >> building
>> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >>> >> >> >> can
>> >>> >> >> >> use
>> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >>> >> >> >> free
>> >>> >> >> >> account!
>> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> >> _______________________________________________
>> >>> >> >> >> Csound-devel mailing list
>> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> ------------------------------------------------------------------------------
>> >>> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> advanced
>> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> for
>> >>> >> >> building
>> >>> >> >> apps and a phenomenal toolset for data science. Developers can
>> >>> >> >> use
>> >>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> >> account!
>> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> _______________________________________________
>> >>> >> >> Csound-devel mailing list
>> >>> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > ------------------------------------------------------------------------------
>> >>> >> > Precog is a next-generation analytics platform capable of
>> >>> >> > advanced
>> >>> >> > analytics on semi-structured data. The platform includes APIs for
>> >>> >> > building
>> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >>> >> > use
>> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >>> >> > account!
>> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> > _______________________________________________
>> >>> >> > Csound-devel mailing list
>> >>> >> > Csound-devel@lists.sourceforge.net
>> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------------------------
>> >>> >> Precog is a next-generation analytics platform capable of advanced
>> >>> >> analytics on semi-structured data. The platform includes APIs for
>> >>> >> building
>> >>> >> apps and a phenomenal toolset for data science. Developers can use
>> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> account!
>> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> _______________________________________________
>> >>> >> Csound-devel mailing list
>> >>> >> Csound-devel@lists.sourceforge.net
>> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------------------------
>> >>> > Precog is a next-generation analytics platform capable of advanced
>> >>> > analytics on semi-structured data. The platform includes APIs for
>> >>> > building
>> >>> > apps and a phenomenal toolset for data science. Developers can use
>> >>> > our toolset for easy data analysis & visualization. Get a free
>> >>> > account!
>> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> > _______________________________________________
>> >>> > Csound-devel mailing list
>> >>> > Csound-devel@lists.sourceforge.net
>> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Precog is a next-generation analytics platform capable of advanced
>> >>> analytics on semi-structured data. The platform includes APIs for
>> >>> building
>> >>> apps and a phenomenal toolset for data science. Developers can use
>> >>> our toolset for easy data analysis & visualization. Get a free
>> >>> account!
>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-04-21 17:26
FromSteven Yi
SubjectRe: [Cs-dev] csound6 sprintf bug
Hi Ben,

I just tried with latest from GIt but am not getting any errors. Just
to verify, I'm on OSX 10.8.3, running 64-bit OS, and compiling with
MYFLT=double.  Could you tell me again what OS/version you are running
and if you are compiling with doubles or floats?

Thanks!
steven

On Sun, Apr 21, 2013 at 5:20 PM, Ben Hackbarth  wrote:
> hi steven,
>
> i've pulled from git but am still getting segfaults.  i've narrowed my
> particular problem down to an issue with the "schedule" opcode in csound6:
>
> 
> 
> -n
>
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
> instr     99
>     schedule 100, 0, p3
> endin
>
>
> instr     100
>     prints    "------------------------------\n"
> endin
>
>
> 
> 
> i99 0 1
> 
> 
>
>
> SECTION 1:
> new alloc for instr 99:
> Csound tidy up: Segmentation fault
> inactive allocs returned to freespace
> end of score.           overall amps:  0.00000  0.00000
>        overall samples out of range:        0        0
> 0 errors in performance
>
>
>
> --  ben
>
>
> On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi  wrote:
>>
>> Hi Ben,
>>
>> Took a while but I think I've managed to fix the if-then issue.  There
>> was some code that was left-over from Csound5 when I redid tree
>> expansion that I had to remove as it wasn't necessary, and indeed
>> caused a bug with the wrong ->next pointer being set.  I'm able to run
>> the excerpt.csd I had posted to the user list now that uses a fair
>> amount of if-then's, some nested.
>>
>> Could you pull from GIT and give the latest a try?
>>
>> Thanks!
>> steven
>>
>> On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth 
>> wrote:
>> > hi steven,
>> >
>> > these days i write orchestras that only have a few instruments, but with
>> > lots of switches inside to make it easy to chain together different dsp
>> > routines.  so, yeah, i'm knee-deep in conditionals :)
>> >
>> > please let me know if i assist with any other testing.  happy to help
>> > out
>> > where i can.
>> >
>> >
>> > --  ben
>> >
>> >
>> > On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi  wrote:
>> >>
>> >> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> >> finding it's a cause of problems.  I'm getting odd parsing issues in
>> >> one project, and odd runtime behavior in a test.csd I just wrote.
>> >> Looking through the issue now, but thought it worth mentioning as it
>> >> might be a possible root cause for your projects.
>> >>
>> >> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi  wrote:
>> >> > Thanks Ben too for contributing your time to test!
>> >> >
>> >> > I too am starting to run my projects with CS6 to check for errors.
>> >> > Most of my project shave a lot of code so they stress csound a bit
>> >> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> >> > through all the bugs soon enough though. :)
>> >> >
>> >> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth 
>> >> > wrote:
>> >> >> hi steven,
>> >> >>
>> >> >> thank you, this issue to be resolved now.
>> >> >>
>> >> >> i'm excited about the new language features of cs6, so i'm try to
>> >> >> debug
>> >> >> a
>> >> >> rather large project (the orchestra is ~14000 lines).  unfortunately
>> >> >> i
>> >> >> am
>> >> >> now running into segfaults without an error messages.  i'll poke
>> >> >> around
>> >> >> a
>> >> >> bit more later this evening and see if i can isolate the problem.
>> >> >>
>> >> >> thanks for all of your hard work.
>> >> >>
>> >> >> --  ben
>> >> >>
>> >> >>
>> >> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi 
>> >> >> wrote:
>> >> >>>
>> >> >>> Hi Ben,
>> >> >>>
>> >> >>> The label list function was not properly going down the TREE*
>> >> >>> structure to gather all labels, so the ones within if-blocks and
>> >> >>> until
>> >> >>> blocks did not work.  I tested with your example (added to csdtests
>> >> >>> now) and it seems to work alright now.  Could you pull and test
>> >> >>> there?
>> >> >>>  I get the expected output now:
>> >> >>>
>> >> >>> instr 1:  iLop = 5.000
>> >> >>> instr 1:  iLop = 4.000
>> >> >>> instr 1:  iLop = 3.000
>> >> >>> instr 1:  iLop = 2.000
>> >> >>> instr 1:  iLop = 1.000
>> >> >>>
>> >> >>> Thanks again for the report!
>> >> >>> steven
>> >> >>>
>> >> >>>
>> >> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth
>> >> >>> 
>> >> >>> wrote:
>> >> >>> > no problem steven.  i'll keep em coming.
>> >> >>> >
>> >> >>> > --  ben
>> >> >>> >
>> >> >>> >
>> >> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi 
>> >> >>> > wrote:
>> >> >>> >>
>> >> >>> >> Hi Ben,
>> >> >>> >>
>> >> >>> >> Thanks for sending this test! Contributing these kinds of
>> >> >>> >> focused
>> >> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >> >>> >> reply
>> >> >>> >> once things are sorted out.
>> >> >>> >>
>> >> >>> >> Thanks!
>> >> >>> >> steven
>> >> >>> >>
>> >> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >> >>> >> 
>> >> >>> >> wrote:
>> >> >>> >> > cool, thank you steven.  it works now!
>> >> >>> >> >
>> >> >>> >> > i'm am running into some other issues that i'm having trouble
>> >> >>> >> > distilling
>> >> >>> >> > into a simple csd.  but below is my best shot.
>> >> >>> >> >
>> >> >>> >> > the bug has to do with labels for goto statements which are
>> >> >>> >> > embedded
>> >> >>> >> > in
>> >> >>> >> > if-endif blocks.  as before, the code below works in cs5, but
>> >> >>> >> > i
>> >> >>> >> > get
>> >> >>> >> > errors
>> >> >>> >> > in cs6.  i get no errors if i remove the if statements and
>> >> >>> >> > just
>> >> >>> >> > do
>> >> >>> >> > the
>> >> >>> >> > loops.
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > 
>> >> >>> >> > 
>> >> >>> >> > 
>> >> >>> >> > 
>> >> >>> >> >
>> >> >>> >> > sr = 44100
>> >> >>> >> > ksmps = 32
>> >> >>> >> > nchnls = 2
>> >> >>> >> > 0dbfs  = 1
>> >> >>> >> >
>> >> >>> >> > instr 1
>> >> >>> >> > iToggle = 1
>> >> >>> >> >
>> >> >>> >> > if (iToggle == 0) then
>> >> >>> >> >     iNumberChildren = 5
>> >> >>> >> >     SampleSetChildrenLoop:
>> >> >>> >> >         print iNumberChildren
>> >> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >> >>> >> > else
>> >> >>> >> >     iLop = 5
>> >> >>> >> >     Looper:
>> >> >>> >> >         print iLop
>> >> >>> >> >         iLop = iLop - 1
>> >> >>> >> >     if (iLop > 0.) goto Looper
>> >> >>> >> > endif
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > endin
>> >> >>> >> > 
>> >> >>> >> > 
>> >> >>> >> >
>> >> >>> >> > i 1 0 1
>> >> >>> >> > e
>> >> >>> >> > 
>> >> >>> >> > 
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > Parsing successful!
>> >> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >> >>> >> >
>> >> >>> >> > Parsing failed due to 1 semantic error!
>> >> >>> >> > WARNING: Stopping on parser failure
>> >> >>> >> >
>> >> >>> >> > cannot compile orchestra
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > --  ben
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi
>> >> >>> >> > 
>> >> >>> >> > wrote:
>> >> >>> >> >>
>> >> >>> >> >> Hi Ben,
>> >> >>> >> >>
>> >> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >> >>> >> >> that
>> >> >>> >> >> the
>> >> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >> >>> >> >> example,
>> >> >>> >> >> the
>> >> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >> >>> >> >> Thanks
>> >> >>> >> >> again for reporting it!
>> >> >>> >> >>
>> >> >>> >> >> steven
>> >> >>> >> >>
>> >> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi
>> >> >>> >> >> 
>> >> >>> >> >> wrote:
>> >> >>> >> >> > Hi Ben,
>> >> >>> >> >> >
>> >> >>> >> >> > Thanks very much for reporting and sending in this CSD.
>> >> >>> >> >> > I've
>> >> >>> >> >> > added
>> >> >>> >> >> > it
>> >> >>> >> >> > to the test suite here locally and will look into the bug
>> >> >>> >> >> > now.
>> >> >>> >> >> >
>> >> >>> >> >> > steven
>> >> >>> >> >> >
>> >> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >> >>> >> >> > 
>> >> >>> >> >> > wrote:
>> >> >>> >> >> >> hello,
>> >> >>> >> >> >>
>> >> >>> >> >> >> the following code worked in cs5, but i now get a
>> >> >>> >> >> >> "semantic
>> >> >>> >> >> >> error"
>> >> >>> >> >> >> in
>> >> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >> >>> >> >> >> resulting
>> >> >>> >> >> >> error
>> >> >>> >> >> >> (os x
>> >> >>> >> >> >> doubles)
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> 
>> >> >>> >> >> >> 
>> >> >>> >> >> >> 
>> >> >>> >> >> >> 
>> >> >>> >> >> >>
>> >> >>> >> >> >> sr = 44100
>> >> >>> >> >> >> ksmps = 32
>> >> >>> >> >> >> nchnls = 2
>> >> >>> >> >> >> 0dbfs  = 1
>> >> >>> >> >> >>
>> >> >>> >> >> >> instr 1
>> >> >>> >> >> >>
>> >> >>> >> >> >> ShrtfL sprintf
>> >> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >> >>> >> >> >> sr
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> endin
>> >> >>> >> >> >> 
>> >> >>> >> >> >> 
>> >> >>> >> >> >>
>> >> >>> >> >> >> i 1 0 1
>> >> >>> >> >> >> e
>> >> >>> >> >> >> 
>> >> >>> >> >> >> 
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >> >>> >> >> >> matching
>> >> >>> >> >> >> argument
>> >> >>> >> >> >> types:
>> >> >>> >> >> >> Found: S sprintf Sr
>> >> >>> >> >> >> Line: 11 Loc: 1
>> >> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >> >>> >> >> >> WARNING: Stopping on parser failure
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> --
>> >> >>> >> >> >> View this message in context:
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >> >>> >> >> >> Nabble.com.
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> ------------------------------------------------------------------------------
>> >> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >> >>> >> >> >> advanced
>> >> >>> >> >> >> analytics on semi-structured data. The platform includes
>> >> >>> >> >> >> APIs
>> >> >>> >> >> >> for
>> >> >>> >> >> >> building
>> >> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >> >>> >> >> >> can
>> >> >>> >> >> >> use
>> >> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >> >>> >> >> >> free
>> >> >>> >> >> >> account!
>> >> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> >> >> _______________________________________________
>> >> >>> >> >> >> Csound-devel mailing list
>> >> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >> ------------------------------------------------------------------------------
>> >> >>> >> >> Precog is a next-generation analytics platform capable of
>> >> >>> >> >> advanced
>> >> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >> >>> >> >> for
>> >> >>> >> >> building
>> >> >>> >> >> apps and a phenomenal toolset for data science. Developers
>> >> >>> >> >> can
>> >> >>> >> >> use
>> >> >>> >> >> our toolset for easy data analysis & visualization. Get a
>> >> >>> >> >> free
>> >> >>> >> >> account!
>> >> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> >> _______________________________________________
>> >> >>> >> >> Csound-devel mailing list
>> >> >>> >> >> Csound-devel@lists.sourceforge.net
>> >> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > ------------------------------------------------------------------------------
>> >> >>> >> > Precog is a next-generation analytics platform capable of
>> >> >>> >> > advanced
>> >> >>> >> > analytics on semi-structured data. The platform includes APIs
>> >> >>> >> > for
>> >> >>> >> > building
>> >> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >> >>> >> > use
>> >> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >> >>> >> > account!
>> >> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> > _______________________________________________
>> >> >>> >> > Csound-devel mailing list
>> >> >>> >> > Csound-devel@lists.sourceforge.net
>> >> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >> >
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >> ------------------------------------------------------------------------------
>> >> >>> >> Precog is a next-generation analytics platform capable of
>> >> >>> >> advanced
>> >> >>> >> analytics on semi-structured data. The platform includes APIs
>> >> >>> >> for
>> >> >>> >> building
>> >> >>> >> apps and a phenomenal toolset for data science. Developers can
>> >> >>> >> use
>> >> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >> >>> >> account!
>> >> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> _______________________________________________
>> >> >>> >> Csound-devel mailing list
>> >> >>> >> Csound-devel@lists.sourceforge.net
>> >> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> > ------------------------------------------------------------------------------
>> >> >>> > Precog is a next-generation analytics platform capable of
>> >> >>> > advanced
>> >> >>> > analytics on semi-structured data. The platform includes APIs for
>> >> >>> > building
>> >> >>> > apps and a phenomenal toolset for data science. Developers can
>> >> >>> > use
>> >> >>> > our toolset for easy data analysis & visualization. Get a free
>> >> >>> > account!
>> >> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> > _______________________________________________
>> >> >>> > Csound-devel mailing list
>> >> >>> > Csound-devel@lists.sourceforge.net
>> >> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ------------------------------------------------------------------------------
>> >> >>> Precog is a next-generation analytics platform capable of advanced
>> >> >>> analytics on semi-structured data. The platform includes APIs for
>> >> >>> building
>> >> >>> apps and a phenomenal toolset for data science. Developers can use
>> >> >>> our toolset for easy data analysis & visualization. Get a free
>> >> >>> account!
>> >> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> _______________________________________________
>> >> >>> Csound-devel mailing list
>> >> >>> Csound-devel@lists.sourceforge.net
>> >> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------------
>> >> >> Precog is a next-generation analytics platform capable of advanced
>> >> >> analytics on semi-structured data. The platform includes APIs for
>> >> >> building
>> >> >> apps and a phenomenal toolset for data science. Developers can use
>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >> >> account!
>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >> _______________________________________________
>> >> >> Csound-devel mailing list
>> >> >> Csound-devel@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Precog is a next-generation analytics platform capable of advanced
>> > analytics on semi-structured data. The platform includes APIs for
>> > building
>> > apps and a phenomenal toolset for data science. Developers can use
>> > our toolset for easy data analysis & visualization. Get a free account!
>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-04-21 18:31
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
well, this is me. I'll look after it now.
On 21 Apr 2013, at 17:20, Ben Hackbarth wrote:

hi steven,

i've pulled from git but am still getting segfaults.  i've narrowed my particular problem down to an issue with the "schedule" opcode in csound6:

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr     99
    schedule 100, 0, p3
endin


instr     100
    prints    "------------------------------\n"
endin


</CsInstruments>
<CsScore>
i99 0 1
</CsScore>
</CsoundSynthesizer>


SECTION 1:
new alloc for instr 99:
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score.           overall amps:  0.00000  0.00000
       overall samples out of range:        0        0
0 errors in performance



--  ben


On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

Took a while but I think I've managed to fix the if-then issue.  There
was some code that was left-over from Csound5 when I redid tree
expansion that I had to remove as it wasn't necessary, and indeed
caused a bug with the wrong ->next pointer being set.  I'm able to run
the excerpt.csd I had posted to the user list now that uses a fair
amount of if-then's, some nested.

Could you pull from GIT and give the latest a try?

Thanks!
steven

On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> hi steven,
>
> these days i write orchestras that only have a few instruments, but with
> lots of switches inside to make it easy to chain together different dsp
> routines.  so, yeah, i'm knee-deep in conditionals :)
>
> please let me know if i assist with any other testing.  happy to help out
> where i can.
>
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> finding it's a cause of problems.  I'm getting odd parsing issues in
>> one project, and odd runtime behavior in a test.csd I just wrote.
>> Looking through the issue now, but thought it worth mentioning as it
>> might be a possible root cause for your projects.
>>
>> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Thanks Ben too for contributing your time to test!
>> >
>> > I too am starting to run my projects with CS6 to check for errors.
>> > Most of my project shave a lot of code so they stress csound a bit
>> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> > through all the bugs soon enough though. :)
>> >
>> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com>
>> > wrote:
>> >> hi steven,
>> >>
>> >> thank you, this issue to be resolved now.
>> >>
>> >> i'm excited about the new language features of cs6, so i'm try to debug
>> >> a
>> >> rather large project (the orchestra is ~14000 lines).  unfortunately i
>> >> am
>> >> now running into segfaults without an error messages.  i'll poke around
>> >> a
>> >> bit more later this evening and see if i can isolate the problem.
>> >>
>> >> thanks for all of your hard work.
>> >>
>> >> --  ben
>> >>
>> >>
>> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi Ben,
>> >>>
>> >>> The label list function was not properly going down the TREE*
>> >>> structure to gather all labels, so the ones within if-blocks and until
>> >>> blocks did not work.  I tested with your example (added to csdtests
>> >>> now) and it seems to work alright now.  Could you pull and test there?
>> >>>  I get the expected output now:
>> >>>
>> >>> instr 1:  iLop = 5.000
>> >>> instr 1:  iLop = 4.000
>> >>> instr 1:  iLop = 3.000
>> >>> instr 1:  iLop = 2.000
>> >>> instr 1:  iLop = 1.000
>> >>>
>> >>> Thanks again for the report!
>> >>> steven
>> >>>
>> >>>
>> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com>
>> >>> wrote:
>> >>> > no problem steven.  i'll keep em coming.
>> >>> >
>> >>> > --  ben
>> >>> >
>> >>> >
>> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Hi Ben,
>> >>> >>
>> >>> >> Thanks for sending this test! Contributing these kinds of focused
>> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >>> >> reply
>> >>> >> once things are sorted out.
>> >>> >>
>> >>> >> Thanks!
>> >>> >> steven
>> >>> >>
>> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >>> >> <hackbarth@gmail.com>
>> >>> >> wrote:
>> >>> >> > cool, thank you steven.  it works now!
>> >>> >> >
>> >>> >> > i'm am running into some other issues that i'm having trouble
>> >>> >> > distilling
>> >>> >> > into a simple csd.  but below is my best shot.
>> >>> >> >
>> >>> >> > the bug has to do with labels for goto statements which are
>> >>> >> > embedded
>> >>> >> > in
>> >>> >> > if-endif blocks.  as before, the code below works in cs5, but i
>> >>> >> > get
>> >>> >> > errors
>> >>> >> > in cs6.  i get no errors if i remove the if statements and just
>> >>> >> > do
>> >>> >> > the
>> >>> >> > loops.
>> >>> >> >
>> >>> >> >
>> >>> >> > <CsoundSynthesizer>
>> >>> >> > <CsOptions>
>> >>> >> > </CsOptions>
>> >>> >> > <CsInstruments>
>> >>> >> >
>> >>> >> > sr = 44100
>> >>> >> > ksmps = 32
>> >>> >> > nchnls = 2
>> >>> >> > 0dbfs  = 1
>> >>> >> >
>> >>> >> > instr 1
>> >>> >> > iToggle = 1
>> >>> >> >
>> >>> >> > if (iToggle == 0) then
>> >>> >> >     iNumberChildren = 5
>> >>> >> >     SampleSetChildrenLoop:
>> >>> >> >         print iNumberChildren
>> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >>> >> > else
>> >>> >> >     iLop = 5
>> >>> >> >     Looper:
>> >>> >> >         print iLop
>> >>> >> >         iLop = iLop - 1
>> >>> >> >     if (iLop > 0.) goto Looper
>> >>> >> > endif
>> >>> >> >
>> >>> >> >
>> >>> >> > endin
>> >>> >> > </CsInstruments>
>> >>> >> > <CsScore>
>> >>> >> >
>> >>> >> > i 1 0 1
>> >>> >> > e
>> >>> >> > </CsScore>
>> >>> >> > </CsoundSynthesizer>
>> >>> >> >
>> >>> >> >
>> >>> >> > Parsing successful!
>> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >>> >> >
>> >>> >> > Parsing failed due to 1 semantic error!
>> >>> >> > WARNING: Stopping on parser failure
>> >>> >> >
>> >>> >> > cannot compile orchestra
>> >>> >> >
>> >>> >> >
>> >>> >> > --  ben
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi Ben,
>> >>> >> >>
>> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >>> >> >> that
>> >>> >> >> the
>> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >>> >> >> example,
>> >>> >> >> the
>> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >>> >> >> Thanks
>> >>> >> >> again for reporting it!
>> >>> >> >>
>> >>> >> >> steven
>> >>> >> >>
>> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com>
>> >>> >> >> wrote:
>> >>> >> >> > Hi Ben,
>> >>> >> >> >
>> >>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >>> >> >> > added
>> >>> >> >> > it
>> >>> >> >> > to the test suite here locally and will look into the bug now.
>> >>> >> >> >
>> >>> >> >> > steven
>> >>> >> >> >
>> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >>> >> >> > <hackbarth@gmail.com>
>> >>> >> >> > wrote:
>> >>> >> >> >> hello,
>> >>> >> >> >>
>> >>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >>> >> >> >> error"
>> >>> >> >> >> in
>> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >>> >> >> >> resulting
>> >>> >> >> >> error
>> >>> >> >> >> (os x
>> >>> >> >> >> doubles)
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> <CsoundSynthesizer>
>> >>> >> >> >> <CsOptions>
>> >>> >> >> >> </CsOptions>
>> >>> >> >> >> <CsInstruments>
>> >>> >> >> >>
>> >>> >> >> >> sr = 44100
>> >>> >> >> >> ksmps = 32
>> >>> >> >> >> nchnls = 2
>> >>> >> >> >> 0dbfs  = 1
>> >>> >> >> >>
>> >>> >> >> >> instr 1
>> >>> >> >> >>
>> >>> >> >> >> ShrtfL sprintf
>> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >>> >> >> >> sr
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> endin
>> >>> >> >> >> </CsInstruments>
>> >>> >> >> >> <CsScore>
>> >>> >> >> >>
>> >>> >> >> >> i 1 0 1
>> >>> >> >> >> e
>> >>> >> >> >> </CsScore>
>> >>> >> >> >> </CsoundSynthesizer>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >>> >> >> >> matching
>> >>> >> >> >> argument
>> >>> >> >> >> types:
>> >>> >> >> >> Found: S sprintf Sr
>> >>> >> >> >> Line: 11 Loc: 1
>> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >>> >> >> >> WARNING: Stopping on parser failure
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >>> >> >> >> Nabble.com.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> ------------------------------------------------------------------------------
>> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> >> advanced
>> >>> >> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> >> for
>> >>> >> >> >> building
>> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >>> >> >> >> can
>> >>> >> >> >> use
>> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >>> >> >> >> free
>> >>> >> >> >> account!
>> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> >> _______________________________________________
>> >>> >> >> >> Csound-devel mailing list
>> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> ------------------------------------------------------------------------------
>> >>> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> advanced
>> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> for
>> >>> >> >> building
>> >>> >> >> apps and a phenomenal toolset for data science. Developers can
>> >>> >> >> use
>> >>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> >> account!
>> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> _______________________________________________
>> >>> >> >> Csound-devel mailing list
>> >>> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > ------------------------------------------------------------------------------
>> >>> >> > Precog is a next-generation analytics platform capable of
>> >>> >> > advanced
>> >>> >> > analytics on semi-structured data. The platform includes APIs for
>> >>> >> > building
>> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >>> >> > use
>> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >>> >> > account!
>> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> > _______________________________________________
>> >>> >> > Csound-devel mailing list
>> >>> >> > Csound-devel@lists.sourceforge.net
>> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------------------------
>> >>> >> Precog is a next-generation analytics platform capable of advanced
>> >>> >> analytics on semi-structured data. The platform includes APIs for
>> >>> >> building
>> >>> >> apps and a phenomenal toolset for data science. Developers can use
>> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> account!
>> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> _______________________________________________
>> >>> >> Csound-devel mailing list
>> >>> >> Csound-devel@lists.sourceforge.net
>> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------------------------
>> >>> > Precog is a next-generation analytics platform capable of advanced
>> >>> > analytics on semi-structured data. The platform includes APIs for
>> >>> > building
>> >>> > apps and a phenomenal toolset for data science. Developers can use
>> >>> > our toolset for easy data analysis & visualization. Get a free
>> >>> > account!
>> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> > _______________________________________________
>> >>> > Csound-devel mailing list
>> >>> > Csound-devel@lists.sourceforge.net
>> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Precog is a next-generation analytics platform capable of advanced
>> >>> analytics on semi-structured data. The platform includes APIs for
>> >>> building
>> >>> apps and a phenomenal toolset for data science. Developers can use
>> >>> our toolset for easy data analysis & visualization. Get a free
>> >>> account!
>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-04-21 18:37
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
hi steven,

i'm on osx 10.7.5 using doubles (though i think that my kernel supports 32 as well).  my build is pretty much out of the box, save some path settings for python/swig etc.

--  ben


On Sun, Apr 21, 2013 at 6:26 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

I just tried with latest from GIt but am not getting any errors. Just
to verify, I'm on OSX 10.8.3, running 64-bit OS, and compiling with
MYFLT=double.  Could you tell me again what OS/version you are running
and if you are compiling with doubles or floats?

Thanks!
steven

On Sun, Apr 21, 2013 at 5:20 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> hi steven,
>
> i've pulled from git but am still getting segfaults.  i've narrowed my
> particular problem down to an issue with the "schedule" opcode in csound6:
>
> <CsoundSynthesizer>
> <CsOptions>
> -n
>
> </CsOptions>
> <CsInstruments>
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
>
> instr     99
>     schedule 100, 0, p3
> endin
>
>
> instr     100
>     prints    "------------------------------\n"
> endin
>
>
> </CsInstruments>
> <CsScore>
> i99 0 1
> </CsScore>
> </CsoundSynthesizer>
>
>
> SECTION 1:
> new alloc for instr 99:
> Csound tidy up: Segmentation fault
> inactive allocs returned to freespace
> end of score.           overall amps:  0.00000  0.00000
>        overall samples out of range:        0        0
> 0 errors in performance
>
>
>
> --  ben
>
>
> On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> Hi Ben,
>>
>> Took a while but I think I've managed to fix the if-then issue.  There
>> was some code that was left-over from Csound5 when I redid tree
>> expansion that I had to remove as it wasn't necessary, and indeed
>> caused a bug with the wrong ->next pointer being set.  I'm able to run
>> the excerpt.csd I had posted to the user list now that uses a fair
>> amount of if-then's, some nested.
>>
>> Could you pull from GIT and give the latest a try?
>>
>> Thanks!
>> steven
>>
>> On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth <hackbarth@gmail.com>
>> wrote:
>> > hi steven,
>> >
>> > these days i write orchestras that only have a few instruments, but with
>> > lots of switches inside to make it easy to chain together different dsp
>> > routines.  so, yeah, i'm knee-deep in conditionals :)
>> >
>> > please let me know if i assist with any other testing.  happy to help
>> > out
>> > where i can.
>> >
>> >
>> > --  ben
>> >
>> >
>> > On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>
>> >> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> >> finding it's a cause of problems.  I'm getting odd parsing issues in
>> >> one project, and odd runtime behavior in a test.csd I just wrote.
>> >> Looking through the issue now, but thought it worth mentioning as it
>> >> might be a possible root cause for your projects.
>> >>
>> >> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >> > Thanks Ben too for contributing your time to test!
>> >> >
>> >> > I too am starting to run my projects with CS6 to check for errors.
>> >> > Most of my project shave a lot of code so they stress csound a bit
>> >> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> >> > through all the bugs soon enough though. :)
>> >> >
>> >> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com>
>> >> > wrote:
>> >> >> hi steven,
>> >> >>
>> >> >> thank you, this issue to be resolved now.
>> >> >>
>> >> >> i'm excited about the new language features of cs6, so i'm try to
>> >> >> debug
>> >> >> a
>> >> >> rather large project (the orchestra is ~14000 lines).  unfortunately
>> >> >> i
>> >> >> am
>> >> >> now running into segfaults without an error messages.  i'll poke
>> >> >> around
>> >> >> a
>> >> >> bit more later this evening and see if i can isolate the problem.
>> >> >>
>> >> >> thanks for all of your hard work.
>> >> >>
>> >> >> --  ben
>> >> >>
>> >> >>
>> >> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com>
>> >> >> wrote:
>> >> >>>
>> >> >>> Hi Ben,
>> >> >>>
>> >> >>> The label list function was not properly going down the TREE*
>> >> >>> structure to gather all labels, so the ones within if-blocks and
>> >> >>> until
>> >> >>> blocks did not work.  I tested with your example (added to csdtests
>> >> >>> now) and it seems to work alright now.  Could you pull and test
>> >> >>> there?
>> >> >>>  I get the expected output now:
>> >> >>>
>> >> >>> instr 1:  iLop = 5.000
>> >> >>> instr 1:  iLop = 4.000
>> >> >>> instr 1:  iLop = 3.000
>> >> >>> instr 1:  iLop = 2.000
>> >> >>> instr 1:  iLop = 1.000
>> >> >>>
>> >> >>> Thanks again for the report!
>> >> >>> steven
>> >> >>>
>> >> >>>
>> >> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth
>> >> >>> <hackbarth@gmail.com>
>> >> >>> wrote:
>> >> >>> > no problem steven.  i'll keep em coming.
>> >> >>> >
>> >> >>> > --  ben
>> >> >>> >
>> >> >>> >
>> >> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com>
>> >> >>> > wrote:
>> >> >>> >>
>> >> >>> >> Hi Ben,
>> >> >>> >>
>> >> >>> >> Thanks for sending this test! Contributing these kinds of
>> >> >>> >> focused
>> >> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >> >>> >> reply
>> >> >>> >> once things are sorted out.
>> >> >>> >>
>> >> >>> >> Thanks!
>> >> >>> >> steven
>> >> >>> >>
>> >> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >> >>> >> <hackbarth@gmail.com>
>> >> >>> >> wrote:
>> >> >>> >> > cool, thank you steven.  it works now!
>> >> >>> >> >
>> >> >>> >> > i'm am running into some other issues that i'm having trouble
>> >> >>> >> > distilling
>> >> >>> >> > into a simple csd.  but below is my best shot.
>> >> >>> >> >
>> >> >>> >> > the bug has to do with labels for goto statements which are
>> >> >>> >> > embedded
>> >> >>> >> > in
>> >> >>> >> > if-endif blocks.  as before, the code below works in cs5, but
>> >> >>> >> > i
>> >> >>> >> > get
>> >> >>> >> > errors
>> >> >>> >> > in cs6.  i get no errors if i remove the if statements and
>> >> >>> >> > just
>> >> >>> >> > do
>> >> >>> >> > the
>> >> >>> >> > loops.
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > <CsoundSynthesizer>
>> >> >>> >> > <CsOptions>
>> >> >>> >> > </CsOptions>
>> >> >>> >> > <CsInstruments>
>> >> >>> >> >
>> >> >>> >> > sr = 44100
>> >> >>> >> > ksmps = 32
>> >> >>> >> > nchnls = 2
>> >> >>> >> > 0dbfs  = 1
>> >> >>> >> >
>> >> >>> >> > instr 1
>> >> >>> >> > iToggle = 1
>> >> >>> >> >
>> >> >>> >> > if (iToggle == 0) then
>> >> >>> >> >     iNumberChildren = 5
>> >> >>> >> >     SampleSetChildrenLoop:
>> >> >>> >> >         print iNumberChildren
>> >> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >> >>> >> > else
>> >> >>> >> >     iLop = 5
>> >> >>> >> >     Looper:
>> >> >>> >> >         print iLop
>> >> >>> >> >         iLop = iLop - 1
>> >> >>> >> >     if (iLop > 0.) goto Looper
>> >> >>> >> > endif
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > endin
>> >> >>> >> > </CsInstruments>
>> >> >>> >> > <CsScore>
>> >> >>> >> >
>> >> >>> >> > i 1 0 1
>> >> >>> >> > e
>> >> >>> >> > </CsScore>
>> >> >>> >> > </CsoundSynthesizer>
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > Parsing successful!
>> >> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >> >>> >> >
>> >> >>> >> > Parsing failed due to 1 semantic error!
>> >> >>> >> > WARNING: Stopping on parser failure
>> >> >>> >> >
>> >> >>> >> > cannot compile orchestra
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > --  ben
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi
>> >> >>> >> > <stevenyi@gmail.com>
>> >> >>> >> > wrote:
>> >> >>> >> >>
>> >> >>> >> >> Hi Ben,
>> >> >>> >> >>
>> >> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >> >>> >> >> that
>> >> >>> >> >> the
>> >> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >> >>> >> >> example,
>> >> >>> >> >> the
>> >> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >> >>> >> >> Thanks
>> >> >>> >> >> again for reporting it!
>> >> >>> >> >>
>> >> >>> >> >> steven
>> >> >>> >> >>
>> >> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi
>> >> >>> >> >> <stevenyi@gmail.com>
>> >> >>> >> >> wrote:
>> >> >>> >> >> > Hi Ben,
>> >> >>> >> >> >
>> >> >>> >> >> > Thanks very much for reporting and sending in this CSD.
>> >> >>> >> >> > I've
>> >> >>> >> >> > added
>> >> >>> >> >> > it
>> >> >>> >> >> > to the test suite here locally and will look into the bug
>> >> >>> >> >> > now.
>> >> >>> >> >> >
>> >> >>> >> >> > steven
>> >> >>> >> >> >
>> >> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >> >>> >> >> > <hackbarth@gmail.com>
>> >> >>> >> >> > wrote:
>> >> >>> >> >> >> hello,
>> >> >>> >> >> >>
>> >> >>> >> >> >> the following code worked in cs5, but i now get a
>> >> >>> >> >> >> "semantic
>> >> >>> >> >> >> error"
>> >> >>> >> >> >> in
>> >> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >> >>> >> >> >> resulting
>> >> >>> >> >> >> error
>> >> >>> >> >> >> (os x
>> >> >>> >> >> >> doubles)
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> <CsoundSynthesizer>
>> >> >>> >> >> >> <CsOptions>
>> >> >>> >> >> >> </CsOptions>
>> >> >>> >> >> >> <CsInstruments>
>> >> >>> >> >> >>
>> >> >>> >> >> >> sr = 44100
>> >> >>> >> >> >> ksmps = 32
>> >> >>> >> >> >> nchnls = 2
>> >> >>> >> >> >> 0dbfs  = 1
>> >> >>> >> >> >>
>> >> >>> >> >> >> instr 1
>> >> >>> >> >> >>
>> >> >>> >> >> >> ShrtfL sprintf
>> >> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >> >>> >> >> >> sr
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> endin
>> >> >>> >> >> >> </CsInstruments>
>> >> >>> >> >> >> <CsScore>
>> >> >>> >> >> >>
>> >> >>> >> >> >> i 1 0 1
>> >> >>> >> >> >> e
>> >> >>> >> >> >> </CsScore>
>> >> >>> >> >> >> </CsoundSynthesizer>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >> >>> >> >> >> matching
>> >> >>> >> >> >> argument
>> >> >>> >> >> >> types:
>> >> >>> >> >> >> Found: S sprintf Sr
>> >> >>> >> >> >> Line: 11 Loc: 1
>> >> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >> >>> >> >> >> WARNING: Stopping on parser failure
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> --
>> >> >>> >> >> >> View this message in context:
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >> >>> >> >> >> Nabble.com.
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >>
>> >> >>> >> >> >> ------------------------------------------------------------------------------
>> >> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >> >>> >> >> >> advanced
>> >> >>> >> >> >> analytics on semi-structured data. The platform includes
>> >> >>> >> >> >> APIs
>> >> >>> >> >> >> for
>> >> >>> >> >> >> building
>> >> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >> >>> >> >> >> can
>> >> >>> >> >> >> use
>> >> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >> >>> >> >> >> free
>> >> >>> >> >> >> account!
>> >> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> >> >> _______________________________________________
>> >> >>> >> >> >> Csound-devel mailing list
>> >> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >>
>> >> >>> >> >> ------------------------------------------------------------------------------
>> >> >>> >> >> Precog is a next-generation analytics platform capable of
>> >> >>> >> >> advanced
>> >> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >> >>> >> >> for
>> >> >>> >> >> building
>> >> >>> >> >> apps and a phenomenal toolset for data science. Developers
>> >> >>> >> >> can
>> >> >>> >> >> use
>> >> >>> >> >> our toolset for easy data analysis & visualization. Get a
>> >> >>> >> >> free
>> >> >>> >> >> account!
>> >> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> >> _______________________________________________
>> >> >>> >> >> Csound-devel mailing list
>> >> >>> >> >> Csound-devel@lists.sourceforge.net
>> >> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> >
>> >> >>> >> > ------------------------------------------------------------------------------
>> >> >>> >> > Precog is a next-generation analytics platform capable of
>> >> >>> >> > advanced
>> >> >>> >> > analytics on semi-structured data. The platform includes APIs
>> >> >>> >> > for
>> >> >>> >> > building
>> >> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >> >>> >> > use
>> >> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >> >>> >> > account!
>> >> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> > _______________________________________________
>> >> >>> >> > Csound-devel mailing list
>> >> >>> >> > Csound-devel@lists.sourceforge.net
>> >> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >> >
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >> ------------------------------------------------------------------------------
>> >> >>> >> Precog is a next-generation analytics platform capable of
>> >> >>> >> advanced
>> >> >>> >> analytics on semi-structured data. The platform includes APIs
>> >> >>> >> for
>> >> >>> >> building
>> >> >>> >> apps and a phenomenal toolset for data science. Developers can
>> >> >>> >> use
>> >> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >> >>> >> account!
>> >> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> >> _______________________________________________
>> >> >>> >> Csound-devel mailing list
>> >> >>> >> Csound-devel@lists.sourceforge.net
>> >> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> > ------------------------------------------------------------------------------
>> >> >>> > Precog is a next-generation analytics platform capable of
>> >> >>> > advanced
>> >> >>> > analytics on semi-structured data. The platform includes APIs for
>> >> >>> > building
>> >> >>> > apps and a phenomenal toolset for data science. Developers can
>> >> >>> > use
>> >> >>> > our toolset for easy data analysis & visualization. Get a free
>> >> >>> > account!
>> >> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> > _______________________________________________
>> >> >>> > Csound-devel mailing list
>> >> >>> > Csound-devel@lists.sourceforge.net
>> >> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>> >
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ------------------------------------------------------------------------------
>> >> >>> Precog is a next-generation analytics platform capable of advanced
>> >> >>> analytics on semi-structured data. The platform includes APIs for
>> >> >>> building
>> >> >>> apps and a phenomenal toolset for data science. Developers can use
>> >> >>> our toolset for easy data analysis & visualization. Get a free
>> >> >>> account!
>> >> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >>> _______________________________________________
>> >> >>> Csound-devel mailing list
>> >> >>> Csound-devel@lists.sourceforge.net
>> >> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------------
>> >> >> Precog is a next-generation analytics platform capable of advanced
>> >> >> analytics on semi-structured data. The platform includes APIs for
>> >> >> building
>> >> >> apps and a phenomenal toolset for data science. Developers can use
>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >> >> account!
>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> >> _______________________________________________
>> >> >> Csound-devel mailing list
>> >> >> Csound-devel@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Precog is a next-generation analytics platform capable of advanced
>> > analytics on semi-structured data. The platform includes APIs for
>> > building
>> > apps and a phenomenal toolset for data science. Developers can use
>> > our toolset for easy data analysis & visualization. Get a free account!
>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-04-21 18:38
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
Fixed in GIT.
On 21 Apr 2013, at 17:20, Ben Hackbarth wrote:

hi steven,

i've pulled from git but am still getting segfaults.  i've narrowed my particular problem down to an issue with the "schedule" opcode in csound6:

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr     99
    schedule 100, 0, p3
endin


instr     100
    prints    "------------------------------\n"
endin


</CsInstruments>
<CsScore>
i99 0 1
</CsScore>
</CsoundSynthesizer>


SECTION 1:
new alloc for instr 99:
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score.           overall amps:  0.00000  0.00000
       overall samples out of range:        0        0
0 errors in performance



--  ben


On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

Took a while but I think I've managed to fix the if-then issue.  There
was some code that was left-over from Csound5 when I redid tree
expansion that I had to remove as it wasn't necessary, and indeed
caused a bug with the wrong ->next pointer being set.  I'm able to run
the excerpt.csd I had posted to the user list now that uses a fair
amount of if-then's, some nested.

Could you pull from GIT and give the latest a try?

Thanks!
steven

On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> hi steven,
>
> these days i write orchestras that only have a few instruments, but with
> lots of switches inside to make it easy to chain together different dsp
> routines.  so, yeah, i'm knee-deep in conditionals :)
>
> please let me know if i assist with any other testing.  happy to help out
> where i can.
>
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> finding it's a cause of problems.  I'm getting odd parsing issues in
>> one project, and odd runtime behavior in a test.csd I just wrote.
>> Looking through the issue now, but thought it worth mentioning as it
>> might be a possible root cause for your projects.
>>
>> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Thanks Ben too for contributing your time to test!
>> >
>> > I too am starting to run my projects with CS6 to check for errors.
>> > Most of my project shave a lot of code so they stress csound a bit
>> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> > through all the bugs soon enough though. :)
>> >
>> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com>
>> > wrote:
>> >> hi steven,
>> >>
>> >> thank you, this issue to be resolved now.
>> >>
>> >> i'm excited about the new language features of cs6, so i'm try to debug
>> >> a
>> >> rather large project (the orchestra is ~14000 lines).  unfortunately i
>> >> am
>> >> now running into segfaults without an error messages.  i'll poke around
>> >> a
>> >> bit more later this evening and see if i can isolate the problem.
>> >>
>> >> thanks for all of your hard work.
>> >>
>> >> --  ben
>> >>
>> >>
>> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi Ben,
>> >>>
>> >>> The label list function was not properly going down the TREE*
>> >>> structure to gather all labels, so the ones within if-blocks and until
>> >>> blocks did not work.  I tested with your example (added to csdtests
>> >>> now) and it seems to work alright now.  Could you pull and test there?
>> >>>  I get the expected output now:
>> >>>
>> >>> instr 1:  iLop = 5.000
>> >>> instr 1:  iLop = 4.000
>> >>> instr 1:  iLop = 3.000
>> >>> instr 1:  iLop = 2.000
>> >>> instr 1:  iLop = 1.000
>> >>>
>> >>> Thanks again for the report!
>> >>> steven
>> >>>
>> >>>
>> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com>
>> >>> wrote:
>> >>> > no problem steven.  i'll keep em coming.
>> >>> >
>> >>> > --  ben
>> >>> >
>> >>> >
>> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Hi Ben,
>> >>> >>
>> >>> >> Thanks for sending this test! Contributing these kinds of focused
>> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >>> >> reply
>> >>> >> once things are sorted out.
>> >>> >>
>> >>> >> Thanks!
>> >>> >> steven
>> >>> >>
>> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >>> >> <hackbarth@gmail.com>
>> >>> >> wrote:
>> >>> >> > cool, thank you steven.  it works now!
>> >>> >> >
>> >>> >> > i'm am running into some other issues that i'm having trouble
>> >>> >> > distilling
>> >>> >> > into a simple csd.  but below is my best shot.
>> >>> >> >
>> >>> >> > the bug has to do with labels for goto statements which are
>> >>> >> > embedded
>> >>> >> > in
>> >>> >> > if-endif blocks.  as before, the code below works in cs5, but i
>> >>> >> > get
>> >>> >> > errors
>> >>> >> > in cs6.  i get no errors if i remove the if statements and just
>> >>> >> > do
>> >>> >> > the
>> >>> >> > loops.
>> >>> >> >
>> >>> >> >
>> >>> >> > <CsoundSynthesizer>
>> >>> >> > <CsOptions>
>> >>> >> > </CsOptions>
>> >>> >> > <CsInstruments>
>> >>> >> >
>> >>> >> > sr = 44100
>> >>> >> > ksmps = 32
>> >>> >> > nchnls = 2
>> >>> >> > 0dbfs  = 1
>> >>> >> >
>> >>> >> > instr 1
>> >>> >> > iToggle = 1
>> >>> >> >
>> >>> >> > if (iToggle == 0) then
>> >>> >> >     iNumberChildren = 5
>> >>> >> >     SampleSetChildrenLoop:
>> >>> >> >         print iNumberChildren
>> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >>> >> > else
>> >>> >> >     iLop = 5
>> >>> >> >     Looper:
>> >>> >> >         print iLop
>> >>> >> >         iLop = iLop - 1
>> >>> >> >     if (iLop > 0.) goto Looper
>> >>> >> > endif
>> >>> >> >
>> >>> >> >
>> >>> >> > endin
>> >>> >> > </CsInstruments>
>> >>> >> > <CsScore>
>> >>> >> >
>> >>> >> > i 1 0 1
>> >>> >> > e
>> >>> >> > </CsScore>
>> >>> >> > </CsoundSynthesizer>
>> >>> >> >
>> >>> >> >
>> >>> >> > Parsing successful!
>> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >>> >> >
>> >>> >> > Parsing failed due to 1 semantic error!
>> >>> >> > WARNING: Stopping on parser failure
>> >>> >> >
>> >>> >> > cannot compile orchestra
>> >>> >> >
>> >>> >> >
>> >>> >> > --  ben
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi Ben,
>> >>> >> >>
>> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >>> >> >> that
>> >>> >> >> the
>> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >>> >> >> example,
>> >>> >> >> the
>> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >>> >> >> Thanks
>> >>> >> >> again for reporting it!
>> >>> >> >>
>> >>> >> >> steven
>> >>> >> >>
>> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com>
>> >>> >> >> wrote:
>> >>> >> >> > Hi Ben,
>> >>> >> >> >
>> >>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >>> >> >> > added
>> >>> >> >> > it
>> >>> >> >> > to the test suite here locally and will look into the bug now.
>> >>> >> >> >
>> >>> >> >> > steven
>> >>> >> >> >
>> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >>> >> >> > <hackbarth@gmail.com>
>> >>> >> >> > wrote:
>> >>> >> >> >> hello,
>> >>> >> >> >>
>> >>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >>> >> >> >> error"
>> >>> >> >> >> in
>> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >>> >> >> >> resulting
>> >>> >> >> >> error
>> >>> >> >> >> (os x
>> >>> >> >> >> doubles)
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> <CsoundSynthesizer>
>> >>> >> >> >> <CsOptions>
>> >>> >> >> >> </CsOptions>
>> >>> >> >> >> <CsInstruments>
>> >>> >> >> >>
>> >>> >> >> >> sr = 44100
>> >>> >> >> >> ksmps = 32
>> >>> >> >> >> nchnls = 2
>> >>> >> >> >> 0dbfs  = 1
>> >>> >> >> >>
>> >>> >> >> >> instr 1
>> >>> >> >> >>
>> >>> >> >> >> ShrtfL sprintf
>> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >>> >> >> >> sr
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> endin
>> >>> >> >> >> </CsInstruments>
>> >>> >> >> >> <CsScore>
>> >>> >> >> >>
>> >>> >> >> >> i 1 0 1
>> >>> >> >> >> e
>> >>> >> >> >> </CsScore>
>> >>> >> >> >> </CsoundSynthesizer>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >>> >> >> >> matching
>> >>> >> >> >> argument
>> >>> >> >> >> types:
>> >>> >> >> >> Found: S sprintf Sr
>> >>> >> >> >> Line: 11 Loc: 1
>> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >>> >> >> >> WARNING: Stopping on parser failure
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >>> >> >> >> Nabble.com.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> ------------------------------------------------------------------------------
>> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> >> advanced
>> >>> >> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> >> for
>> >>> >> >> >> building
>> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >>> >> >> >> can
>> >>> >> >> >> use
>> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >>> >> >> >> free
>> >>> >> >> >> account!
>> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> >> _______________________________________________
>> >>> >> >> >> Csound-devel mailing list
>> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> ------------------------------------------------------------------------------
>> >>> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> advanced
>> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> for
>> >>> >> >> building
>> >>> >> >> apps and a phenomenal toolset for data science. Developers can
>> >>> >> >> use
>> >>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> >> account!
>> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> _______________________________________________
>> >>> >> >> Csound-devel mailing list
>> >>> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > ------------------------------------------------------------------------------
>> >>> >> > Precog is a next-generation analytics platform capable of
>> >>> >> > advanced
>> >>> >> > analytics on semi-structured data. The platform includes APIs for
>> >>> >> > building
>> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >>> >> > use
>> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >>> >> > account!
>> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> > _______________________________________________
>> >>> >> > Csound-devel mailing list
>> >>> >> > Csound-devel@lists.sourceforge.net
>> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------------------------
>> >>> >> Precog is a next-generation analytics platform capable of advanced
>> >>> >> analytics on semi-structured data. The platform includes APIs for
>> >>> >> building
>> >>> >> apps and a phenomenal toolset for data science. Developers can use
>> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> account!
>> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> _______________________________________________
>> >>> >> Csound-devel mailing list
>> >>> >> Csound-devel@lists.sourceforge.net
>> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------------------------
>> >>> > Precog is a next-generation analytics platform capable of advanced
>> >>> > analytics on semi-structured data. The platform includes APIs for
>> >>> > building
>> >>> > apps and a phenomenal toolset for data science. Developers can use
>> >>> > our toolset for easy data analysis & visualization. Get a free
>> >>> > account!
>> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> > _______________________________________________
>> >>> > Csound-devel mailing list
>> >>> > Csound-devel@lists.sourceforge.net
>> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Precog is a next-generation analytics platform capable of advanced
>> >>> analytics on semi-structured data. The platform includes APIs for
>> >>> building
>> >>> apps and a phenomenal toolset for data science. Developers can use
>> >>> our toolset for easy data analysis & visualization. Get a free
>> >>> account!
>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-04-22 09:49
FromBen Hackbarth
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
thanks victor -- the code compiles successfully now. 

i am now encountering problems with amplitude accumulation in global audio variables.  i'll post again when i chase down what is happening.

thanks,

--  ben


On Sun, Apr 21, 2013 at 7:38 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Fixed in GIT.

On 21 Apr 2013, at 17:20, Ben Hackbarth wrote:

hi steven,

i've pulled from git but am still getting segfaults.  i've narrowed my particular problem down to an issue with the "schedule" opcode in csound6:

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr     99
    schedule 100, 0, p3
endin


instr     100
    prints    "------------------------------\n"
endin


</CsInstruments>
<CsScore>
i99 0 1
</CsScore>
</CsoundSynthesizer>


SECTION 1:
new alloc for instr 99:
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score.           overall amps:  0.00000  0.00000
       overall samples out of range:        0        0
0 errors in performance



--  ben


On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

Took a while but I think I've managed to fix the if-then issue.  There
was some code that was left-over from Csound5 when I redid tree
expansion that I had to remove as it wasn't necessary, and indeed
caused a bug with the wrong ->next pointer being set.  I'm able to run
the excerpt.csd I had posted to the user list now that uses a fair
amount of if-then's, some nested.

Could you pull from GIT and give the latest a try?

Thanks!
steven

On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> hi steven,
>
> these days i write orchestras that only have a few instruments, but with
> lots of switches inside to make it easy to chain together different dsp
> routines.  so, yeah, i'm knee-deep in conditionals :)
>
> please let me know if i assist with any other testing.  happy to help out
> where i can.
>
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> finding it's a cause of problems.  I'm getting odd parsing issues in
>> one project, and odd runtime behavior in a test.csd I just wrote.
>> Looking through the issue now, but thought it worth mentioning as it
>> might be a possible root cause for your projects.
>>
>> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Thanks Ben too for contributing your time to test!
>> >
>> > I too am starting to run my projects with CS6 to check for errors.
>> > Most of my project shave a lot of code so they stress csound a bit
>> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> > through all the bugs soon enough though. :)
>> >
>> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com>
>> > wrote:
>> >> hi steven,
>> >>
>> >> thank you, this issue to be resolved now.
>> >>
>> >> i'm excited about the new language features of cs6, so i'm try to debug
>> >> a
>> >> rather large project (the orchestra is ~14000 lines).  unfortunately i
>> >> am
>> >> now running into segfaults without an error messages.  i'll poke around
>> >> a
>> >> bit more later this evening and see if i can isolate the problem.
>> >>
>> >> thanks for all of your hard work.
>> >>
>> >> --  ben
>> >>
>> >>
>> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi Ben,
>> >>>
>> >>> The label list function was not properly going down the TREE*
>> >>> structure to gather all labels, so the ones within if-blocks and until
>> >>> blocks did not work.  I tested with your example (added to csdtests
>> >>> now) and it seems to work alright now.  Could you pull and test there?
>> >>>  I get the expected output now:
>> >>>
>> >>> instr 1:  iLop = 5.000
>> >>> instr 1:  iLop = 4.000
>> >>> instr 1:  iLop = 3.000
>> >>> instr 1:  iLop = 2.000
>> >>> instr 1:  iLop = 1.000
>> >>>
>> >>> Thanks again for the report!
>> >>> steven
>> >>>
>> >>>
>> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com>
>> >>> wrote:
>> >>> > no problem steven.  i'll keep em coming.
>> >>> >
>> >>> > --  ben
>> >>> >
>> >>> >
>> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Hi Ben,
>> >>> >>
>> >>> >> Thanks for sending this test! Contributing these kinds of focused
>> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >>> >> reply
>> >>> >> once things are sorted out.
>> >>> >>
>> >>> >> Thanks!
>> >>> >> steven
>> >>> >>
>> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >>> >> <hackbarth@gmail.com>
>> >>> >> wrote:
>> >>> >> > cool, thank you steven.  it works now!
>> >>> >> >
>> >>> >> > i'm am running into some other issues that i'm having trouble
>> >>> >> > distilling
>> >>> >> > into a simple csd.  but below is my best shot.
>> >>> >> >
>> >>> >> > the bug has to do with labels for goto statements which are
>> >>> >> > embedded
>> >>> >> > in
>> >>> >> > if-endif blocks.  as before, the code below works in cs5, but i
>> >>> >> > get
>> >>> >> > errors
>> >>> >> > in cs6.  i get no errors if i remove the if statements and just
>> >>> >> > do
>> >>> >> > the
>> >>> >> > loops.
>> >>> >> >
>> >>> >> >
>> >>> >> > <CsoundSynthesizer>
>> >>> >> > <CsOptions>
>> >>> >> > </CsOptions>
>> >>> >> > <CsInstruments>
>> >>> >> >
>> >>> >> > sr = 44100
>> >>> >> > ksmps = 32
>> >>> >> > nchnls = 2
>> >>> >> > 0dbfs  = 1
>> >>> >> >
>> >>> >> > instr 1
>> >>> >> > iToggle = 1
>> >>> >> >
>> >>> >> > if (iToggle == 0) then
>> >>> >> >     iNumberChildren = 5
>> >>> >> >     SampleSetChildrenLoop:
>> >>> >> >         print iNumberChildren
>> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >>> >> > else
>> >>> >> >     iLop = 5
>> >>> >> >     Looper:
>> >>> >> >         print iLop
>> >>> >> >         iLop = iLop - 1
>> >>> >> >     if (iLop > 0.) goto Looper
>> >>> >> > endif
>> >>> >> >
>> >>> >> >
>> >>> >> > endin
>> >>> >> > </CsInstruments>
>> >>> >> > <CsScore>
>> >>> >> >
>> >>> >> > i 1 0 1
>> >>> >> > e
>> >>> >> > </CsScore>
>> >>> >> > </CsoundSynthesizer>
>> >>> >> >
>> >>> >> >
>> >>> >> > Parsing successful!
>> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >>> >> >
>> >>> >> > Parsing failed due to 1 semantic error!
>> >>> >> > WARNING: Stopping on parser failure
>> >>> >> >
>> >>> >> > cannot compile orchestra
>> >>> >> >
>> >>> >> >
>> >>> >> > --  ben
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi Ben,
>> >>> >> >>
>> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >>> >> >> that
>> >>> >> >> the
>> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >>> >> >> example,
>> >>> >> >> the
>> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >>> >> >> Thanks
>> >>> >> >> again for reporting it!
>> >>> >> >>
>> >>> >> >> steven
>> >>> >> >>
>> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com>
>> >>> >> >> wrote:
>> >>> >> >> > Hi Ben,
>> >>> >> >> >
>> >>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >>> >> >> > added
>> >>> >> >> > it
>> >>> >> >> > to the test suite here locally and will look into the bug now.
>> >>> >> >> >
>> >>> >> >> > steven
>> >>> >> >> >
>> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >>> >> >> > <hackbarth@gmail.com>
>> >>> >> >> > wrote:
>> >>> >> >> >> hello,
>> >>> >> >> >>
>> >>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >>> >> >> >> error"
>> >>> >> >> >> in
>> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >>> >> >> >> resulting
>> >>> >> >> >> error
>> >>> >> >> >> (os x
>> >>> >> >> >> doubles)
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> <CsoundSynthesizer>
>> >>> >> >> >> <CsOptions>
>> >>> >> >> >> </CsOptions>
>> >>> >> >> >> <CsInstruments>
>> >>> >> >> >>
>> >>> >> >> >> sr = 44100
>> >>> >> >> >> ksmps = 32
>> >>> >> >> >> nchnls = 2
>> >>> >> >> >> 0dbfs  = 1
>> >>> >> >> >>
>> >>> >> >> >> instr 1
>> >>> >> >> >>
>> >>> >> >> >> ShrtfL sprintf
>> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >>> >> >> >> sr
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> endin
>> >>> >> >> >> </CsInstruments>
>> >>> >> >> >> <CsScore>
>> >>> >> >> >>
>> >>> >> >> >> i 1 0 1
>> >>> >> >> >> e
>> >>> >> >> >> </CsScore>
>> >>> >> >> >> </CsoundSynthesizer>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >>> >> >> >> matching
>> >>> >> >> >> argument
>> >>> >> >> >> types:
>> >>> >> >> >> Found: S sprintf Sr
>> >>> >> >> >> Line: 11 Loc: 1
>> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >>> >> >> >> WARNING: Stopping on parser failure
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >>> >> >> >> Nabble.com.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> ------------------------------------------------------------------------------
>> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> >> advanced
>> >>> >> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> >> for
>> >>> >> >> >> building
>> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >>> >> >> >> can
>> >>> >> >> >> use
>> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >>> >> >> >> free
>> >>> >> >> >> account!
>> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> >> _______________________________________________
>> >>> >> >> >> Csound-devel mailing list
>> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> ------------------------------------------------------------------------------
>> >>> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> advanced
>> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> for
>> >>> >> >> building
>> >>> >> >> apps and a phenomenal toolset for data science. Developers can
>> >>> >> >> use
>> >>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> >> account!
>> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> _______________________________________________
>> >>> >> >> Csound-devel mailing list
>> >>> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > ------------------------------------------------------------------------------
>> >>> >> > Precog is a next-generation analytics platform capable of
>> >>> >> > advanced
>> >>> >> > analytics on semi-structured data. The platform includes APIs for
>> >>> >> > building
>> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >>> >> > use
>> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >>> >> > account!
>> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> > _______________________________________________
>> >>> >> > Csound-devel mailing list
>> >>> >> > Csound-devel@lists.sourceforge.net
>> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------------------------
>> >>> >> Precog is a next-generation analytics platform capable of advanced
>> >>> >> analytics on semi-structured data. The platform includes APIs for
>> >>> >> building
>> >>> >> apps and a phenomenal toolset for data science. Developers can use
>> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> account!
>> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> _______________________________________________
>> >>> >> Csound-devel mailing list
>> >>> >> Csound-devel@lists.sourceforge.net
>> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------------------------
>> >>> > Precog is a next-generation analytics platform capable of advanced
>> >>> > analytics on semi-structured data. The platform includes APIs for
>> >>> > building
>> >>> > apps and a phenomenal toolset for data science. Developers can use
>> >>> > our toolset for easy data analysis & visualization. Get a free
>> >>> > account!
>> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> > _______________________________________________
>> >>> > Csound-devel mailing list
>> >>> > Csound-devel@lists.sourceforge.net
>> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Precog is a next-generation analytics platform capable of advanced
>> >>> analytics on semi-structured data. The platform includes APIs for
>> >>> building
>> >>> apps and a phenomenal toolset for data science. Developers can use
>> >>> our toolset for easy data analysis & visualization. Get a free
>> >>> account!
>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-04-22 10:02
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound6 sprintf bug
AttachmentsNone  None  
Thanks for the reports. We'll carry on fixing.
On 22 Apr 2013, at 09:49, Ben Hackbarth wrote:

thanks victor -- the code compiles successfully now. 

i am now encountering problems with amplitude accumulation in global audio variables.  i'll post again when i chase down what is happening.

thanks,

--  ben


On Sun, Apr 21, 2013 at 7:38 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Fixed in GIT.

On 21 Apr 2013, at 17:20, Ben Hackbarth wrote:

hi steven,

i've pulled from git but am still getting segfaults.  i've narrowed my particular problem down to an issue with the "schedule" opcode in csound6:

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr     99
    schedule 100, 0, p3
endin


instr     100
    prints    "------------------------------\n"
endin


</CsInstruments>
<CsScore>
i99 0 1
</CsScore>
</CsoundSynthesizer>


SECTION 1:
new alloc for instr 99:
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score.           overall amps:  0.00000  0.00000
       overall samples out of range:        0        0
0 errors in performance



--  ben


On Fri, Apr 19, 2013 at 6:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Ben,

Took a while but I think I've managed to fix the if-then issue.  There
was some code that was left-over from Csound5 when I redid tree
expansion that I had to remove as it wasn't necessary, and indeed
caused a bug with the wrong ->next pointer being set.  I'm able to run
the excerpt.csd I had posted to the user list now that uses a fair
amount of if-then's, some nested.

Could you pull from GIT and give the latest a try?

Thanks!
steven

On Thu, Apr 18, 2013 at 8:04 PM, Ben Hackbarth <hackbarth@gmail.com> wrote:
> hi steven,
>
> these days i write orchestras that only have a few instruments, but with
> lots of switches inside to make it easy to chain together different dsp
> routines.  so, yeah, i'm knee-deep in conditionals :)
>
> please let me know if i assist with any other testing.  happy to help out
> where i can.
>
>
> --  ben
>
>
> On Thu, Apr 18, 2013 at 6:58 PM, Steven Yi <stevenyi@gmail.com> wrote:
>>
>> BTW Ben, not sure if your projects use nested if-thens, but I'm
>> finding it's a cause of problems.  I'm getting odd parsing issues in
>> one project, and odd runtime behavior in a test.csd I just wrote.
>> Looking through the issue now, but thought it worth mentioning as it
>> might be a possible root cause for your projects.
>>
>> On Thu, Apr 18, 2013 at 5:33 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Thanks Ben too for contributing your time to test!
>> >
>> > I too am starting to run my projects with CS6 to check for errors.
>> > Most of my project shave a lot of code so they stress csound a bit
>> > more but make it a lot harder to figure out bugs.  I'm sure we'll get
>> > through all the bugs soon enough though. :)
>> >
>> > On Thu, Apr 18, 2013 at 5:27 PM, Ben Hackbarth <hackbarth@gmail.com>
>> > wrote:
>> >> hi steven,
>> >>
>> >> thank you, this issue to be resolved now.
>> >>
>> >> i'm excited about the new language features of cs6, so i'm try to debug
>> >> a
>> >> rather large project (the orchestra is ~14000 lines).  unfortunately i
>> >> am
>> >> now running into segfaults without an error messages.  i'll poke around
>> >> a
>> >> bit more later this evening and see if i can isolate the problem.
>> >>
>> >> thanks for all of your hard work.
>> >>
>> >> --  ben
>> >>
>> >>
>> >> On Thu, Apr 18, 2013 at 4:35 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Hi Ben,
>> >>>
>> >>> The label list function was not properly going down the TREE*
>> >>> structure to gather all labels, so the ones within if-blocks and until
>> >>> blocks did not work.  I tested with your example (added to csdtests
>> >>> now) and it seems to work alright now.  Could you pull and test there?
>> >>>  I get the expected output now:
>> >>>
>> >>> instr 1:  iLop = 5.000
>> >>> instr 1:  iLop = 4.000
>> >>> instr 1:  iLop = 3.000
>> >>> instr 1:  iLop = 2.000
>> >>> instr 1:  iLop = 1.000
>> >>>
>> >>> Thanks again for the report!
>> >>> steven
>> >>>
>> >>>
>> >>> On Thu, Apr 18, 2013 at 12:00 AM, Ben Hackbarth <hackbarth@gmail.com>
>> >>> wrote:
>> >>> > no problem steven.  i'll keep em coming.
>> >>> >
>> >>> > --  ben
>> >>> >
>> >>> >
>> >>> > On Wed, Apr 17, 2013 at 8:10 PM, Steven Yi <stevenyi@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Hi Ben,
>> >>> >>
>> >>> >> Thanks for sending this test! Contributing these kinds of focused
>> >>> >> tests are extremely appreciated.  I'll take a look now and will
>> >>> >> reply
>> >>> >> once things are sorted out.
>> >>> >>
>> >>> >> Thanks!
>> >>> >> steven
>> >>> >>
>> >>> >> On Wed, Apr 17, 2013 at 6:42 PM, Ben Hackbarth
>> >>> >> <hackbarth@gmail.com>
>> >>> >> wrote:
>> >>> >> > cool, thank you steven.  it works now!
>> >>> >> >
>> >>> >> > i'm am running into some other issues that i'm having trouble
>> >>> >> > distilling
>> >>> >> > into a simple csd.  but below is my best shot.
>> >>> >> >
>> >>> >> > the bug has to do with labels for goto statements which are
>> >>> >> > embedded
>> >>> >> > in
>> >>> >> > if-endif blocks.  as before, the code below works in cs5, but i
>> >>> >> > get
>> >>> >> > errors
>> >>> >> > in cs6.  i get no errors if i remove the if statements and just
>> >>> >> > do
>> >>> >> > the
>> >>> >> > loops.
>> >>> >> >
>> >>> >> >
>> >>> >> > <CsoundSynthesizer>
>> >>> >> > <CsOptions>
>> >>> >> > </CsOptions>
>> >>> >> > <CsInstruments>
>> >>> >> >
>> >>> >> > sr = 44100
>> >>> >> > ksmps = 32
>> >>> >> > nchnls = 2
>> >>> >> > 0dbfs  = 1
>> >>> >> >
>> >>> >> > instr 1
>> >>> >> > iToggle = 1
>> >>> >> >
>> >>> >> > if (iToggle == 0) then
>> >>> >> >     iNumberChildren = 5
>> >>> >> >     SampleSetChildrenLoop:
>> >>> >> >         print iNumberChildren
>> >>> >> >         iNumberChildren = iNumberChildren - 1
>> >>> >> >     if (iNumberChildren > 0.) goto SampleSetChildrenLoop
>> >>> >> > else
>> >>> >> >     iLop = 5
>> >>> >> >     Looper:
>> >>> >> >         print iLop
>> >>> >> >         iLop = iLop - 1
>> >>> >> >     if (iLop > 0.) goto Looper
>> >>> >> > endif
>> >>> >> >
>> >>> >> >
>> >>> >> > endin
>> >>> >> > </CsInstruments>
>> >>> >> > <CsScore>
>> >>> >> >
>> >>> >> > i 1 0 1
>> >>> >> > e
>> >>> >> > </CsScore>
>> >>> >> > </CsoundSynthesizer>
>> >>> >> >
>> >>> >> >
>> >>> >> > Parsing successful!
>> >>> >> > error:  Variable 'SampleSetChildrenLoop' used before defined
>> >>> >> >
>> >>> >> > Parsing failed due to 1 semantic error!
>> >>> >> > WARNING: Stopping on parser failure
>> >>> >> >
>> >>> >> > cannot compile orchestra
>> >>> >> >
>> >>> >> >
>> >>> >> > --  ben
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Apr 17, 2013 at 12:50 PM, Steven Yi <stevenyi@gmail.com>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> Hi Ben,
>> >>> >> >>
>> >>> >> >> It should be fixed up now with latest in GIT.  The issue was
>> >>> >> >> that
>> >>> >> >> the
>> >>> >> >> T arg type wasn't matching against r- type vars.  In the
>> >>> >> >> example,
>> >>> >> >> the
>> >>> >> >> issue presented due to the use of sr in the sprintf line.
>> >>> >> >> Thanks
>> >>> >> >> again for reporting it!
>> >>> >> >>
>> >>> >> >> steven
>> >>> >> >>
>> >>> >> >> On Wed, Apr 17, 2013 at 11:07 AM, Steven Yi <stevenyi@gmail.com>
>> >>> >> >> wrote:
>> >>> >> >> > Hi Ben,
>> >>> >> >> >
>> >>> >> >> > Thanks very much for reporting and sending in this CSD.  I've
>> >>> >> >> > added
>> >>> >> >> > it
>> >>> >> >> > to the test suite here locally and will look into the bug now.
>> >>> >> >> >
>> >>> >> >> > steven
>> >>> >> >> >
>> >>> >> >> > On Wed, Apr 17, 2013 at 10:47 AM, hackbarth
>> >>> >> >> > <hackbarth@gmail.com>
>> >>> >> >> > wrote:
>> >>> >> >> >> hello,
>> >>> >> >> >>
>> >>> >> >> >> the following code worked in cs5, but i now get a "semantic
>> >>> >> >> >> error"
>> >>> >> >> >> in
>> >>> >> >> >> csound6 (built yesterday).  below is the csd and the
>> >>> >> >> >> resulting
>> >>> >> >> >> error
>> >>> >> >> >> (os x
>> >>> >> >> >> doubles)
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> <CsoundSynthesizer>
>> >>> >> >> >> <CsOptions>
>> >>> >> >> >> </CsOptions>
>> >>> >> >> >> <CsInstruments>
>> >>> >> >> >>
>> >>> >> >> >> sr = 44100
>> >>> >> >> >> ksmps = 32
>> >>> >> >> >> nchnls = 2
>> >>> >> >> >> 0dbfs  = 1
>> >>> >> >> >>
>> >>> >> >> >> instr 1
>> >>> >> >> >>
>> >>> >> >> >> ShrtfL sprintf
>> >>> >> >> >> "/Users/ben/Documents/csound/hrtf/hrtf-%i-left.dat",
>> >>> >> >> >> sr
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> endin
>> >>> >> >> >> </CsInstruments>
>> >>> >> >> >> <CsScore>
>> >>> >> >> >>
>> >>> >> >> >> i 1 0 1
>> >>> >> >> >> e
>> >>> >> >> >> </CsScore>
>> >>> >> >> >> </CsoundSynthesizer>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> error:  Unable to find opcode entry for 'sprintf' with
>> >>> >> >> >> matching
>> >>> >> >> >> argument
>> >>> >> >> >> types:
>> >>> >> >> >> Found: S sprintf Sr
>> >>> >> >> >> Line: 11 Loc: 1
>> >>> >> >> >> Parsing failed due to 1 semantic error!
>> >>> >> >> >> WARNING: Stopping on parser failure
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> --
>> >>> >> >> >> View this message in context:
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> http://csound.1045644.n5.nabble.com/csound6-sprintf-bug-tp5722053.html
>> >>> >> >> >> Sent from the Csound - Dev mailing list archive at
>> >>> >> >> >> Nabble.com.
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >>
>> >>> >> >> >> ------------------------------------------------------------------------------
>> >>> >> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> >> advanced
>> >>> >> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> >> for
>> >>> >> >> >> building
>> >>> >> >> >> apps and a phenomenal toolset for data science. Developers
>> >>> >> >> >> can
>> >>> >> >> >> use
>> >>> >> >> >> our toolset for easy data analysis & visualization. Get a
>> >>> >> >> >> free
>> >>> >> >> >> account!
>> >>> >> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> >> _______________________________________________
>> >>> >> >> >> Csound-devel mailing list
>> >>> >> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> ------------------------------------------------------------------------------
>> >>> >> >> Precog is a next-generation analytics platform capable of
>> >>> >> >> advanced
>> >>> >> >> analytics on semi-structured data. The platform includes APIs
>> >>> >> >> for
>> >>> >> >> building
>> >>> >> >> apps and a phenomenal toolset for data science. Developers can
>> >>> >> >> use
>> >>> >> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> >> account!
>> >>> >> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> >> _______________________________________________
>> >>> >> >> Csound-devel mailing list
>> >>> >> >> Csound-devel@lists.sourceforge.net
>> >>> >> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > ------------------------------------------------------------------------------
>> >>> >> > Precog is a next-generation analytics platform capable of
>> >>> >> > advanced
>> >>> >> > analytics on semi-structured data. The platform includes APIs for
>> >>> >> > building
>> >>> >> > apps and a phenomenal toolset for data science. Developers can
>> >>> >> > use
>> >>> >> > our toolset for easy data analysis & visualization. Get a free
>> >>> >> > account!
>> >>> >> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> > _______________________________________________
>> >>> >> > Csound-devel mailing list
>> >>> >> > Csound-devel@lists.sourceforge.net
>> >>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >> >
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------------------------
>> >>> >> Precog is a next-generation analytics platform capable of advanced
>> >>> >> analytics on semi-structured data. The platform includes APIs for
>> >>> >> building
>> >>> >> apps and a phenomenal toolset for data science. Developers can use
>> >>> >> our toolset for easy data analysis & visualization. Get a free
>> >>> >> account!
>> >>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> >> _______________________________________________
>> >>> >> Csound-devel mailing list
>> >>> >> Csound-devel@lists.sourceforge.net
>> >>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------------------------
>> >>> > Precog is a next-generation analytics platform capable of advanced
>> >>> > analytics on semi-structured data. The platform includes APIs for
>> >>> > building
>> >>> > apps and a phenomenal toolset for data science. Developers can use
>> >>> > our toolset for easy data analysis & visualization. Get a free
>> >>> > account!
>> >>> > http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> > _______________________________________________
>> >>> > Csound-devel mailing list
>> >>> > Csound-devel@lists.sourceforge.net
>> >>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Precog is a next-generation analytics platform capable of advanced
>> >>> analytics on semi-structured data. The platform includes APIs for
>> >>> building
>> >>> apps and a phenomenal toolset for data science. Developers can use
>> >>> our toolset for easy data analysis & visualization. Get a free
>> >>> account!
>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Precog is a next-generation analytics platform capable of advanced
>> >> analytics on semi-structured data. The platform includes APIs for
>> >> building
>> >> apps and a phenomenal toolset for data science. Developers can use
>> >> our toolset for easy data analysis & visualization. Get a free account!
>> >> http://www2.precog.com/precogplatform/slashdotnewsletter
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie