Csound Csound-dev Csound-tekno Search About

[Csnd-dev] String bug and chnset

Date2022-04-26 09:38
FromSteven Yi
Subject[Csnd-dev] String bug and chnset
Attachmentsproject_prtintf_chnset_bug.zip  glide.csd  
Hi All,

I noticed that using sprintf and chnset seems to be breaking now in
ways that it did not previously. I found this in a new project I was
writing today, and also in an older project that I did a couple years
ago on the web-ide
(https://ide.csound.com/editor/JwG9QJNyCFmEv0nKshsU).

I've attached both projects. Both report errors with chnset.k at perf
time with messages of:

PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name

I ran with a debugger and adding this code:

    printf("PERFK: %s | %s\n", p->chname, p->iname->data);

to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:

PERFK:  | frq.10

PERFK:  | frq.20

PERFK:  | frq.30

PERFK: frq.10 | frq.10
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
 [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
   note aborted
 [m
PERFK: frq.20 | frq.20
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
 [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
   note aborted
 [m
PERFK: frq.30 | frq.30
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
 [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
   note aborted
 [minstr 2: [m  ivoice = 10.000 [m
 [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
 [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
 [mfrq.30 [m
PERFK: frq.30 | frq.10

PERFK: frq.20 | frq.20

This seems to have worked in csound 6.16 but broke somewhere along the
lines into 6.17.

Anyone have any ideas on what introduced this error now?  I'll try a
bisect session tomorrow to see about getting more info.

Steven

Date2022-04-26 11:42
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
The glide.csd runs here with no problems, is that what you are seeing?


--Csound version 6.17 (double samples) Feb 2 2022
[commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
sr = 44100.0, kr = 689.062, ksmps = 64
0dBFS level = 1.0, A4 tuning = 440.0
audio buffered in 16 sample-frame blocks
writing 32 sample blks of 64-bit floats to dac
SECTION 1:
instr 1: ivoice = 10.000
instr 1: ivoice = 20.000
instr 1: ivoice = 30.000
instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30Score finished in csoundPerformKsmps() with 2.
end of score. overall amps: 0.92870 0.92870
overall samples out of range: 0 0
0 errors in performance
11052 32 sample blks of 64-bit floats written to dac




On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi All,

I noticed that using sprintf and chnset seems to be breaking now in
ways that it did not previously. I found this in a new project I was
writing today, and also in an older project that I did a couple years
ago on the web-ide
(https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C029e8c8665144bb4192b08da27603137%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637865591919935155%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=UGMoFZkteyH3cZXvONnhL4L%2BjGxEeNFiFkg4hGDHY1M%3D&amp;reserved=0).

I've attached both projects. Both report errors with chnset.k at perf
time with messages of:

PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name

I ran with a debugger and adding this code:

   printf("PERFK: %s | %s\n", p->chname, p->iname->data);

to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:

PERFK:  | frq.10

PERFK:  | frq.20

PERFK:  | frq.30

PERFK: frq.10 | frq.10
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[m
PERFK: frq.20 | frq.20
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[m
PERFK: frq.30 | frq.30
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[minstr 2: [m  ivoice = 10.000 [m
[mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
[mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
[mfrq.30 [m
PERFK: frq.30 | frq.10

PERFK: frq.20 | frq.20

This seems to have worked in csound 6.16 but broke somewhere along the
lines into 6.17.

Anyone have any ideas on what introduced this error now?  I'll try a
bisect session tomorrow to see about getting more info.

Steven
<project_prtintf_chnset_bug.zip><glide.csd>


Date2022-04-26 17:00
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
I found that the attached project runs with 

--Csound version 6.17 (double samples) Feb  2 2022
[commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]

but does not run with the current 6.18 code in the csound6 branch.

On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

The glide.csd runs here with no problems, is that what you are seeing?


--Csound version 6.17 (double samples) Feb 2 2022
[commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
sr = 44100.0, kr = 689.062, ksmps = 64
0dBFS level = 1.0, A4 tuning = 440.0
audio buffered in 16 sample-frame blocks
writing 32 sample blks of 64-bit floats to dac
SECTION 1:
instr 1: ivoice = 10.000
instr 1: ivoice = 20.000
instr 1: ivoice = 30.000
instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30Score finished in csoundPerformKsmps() with 2.
end of score. overall amps: 0.92870 0.92870
overall samples out of range: 0 0
0 errors in performance
11052 32 sample blks of 64-bit floats written to dac




On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi All,

I noticed that using sprintf and chnset seems to be breaking now in
ways that it did not previously. I found this in a new project I was
writing today, and also in an older project that I did a couple years
ago on the web-ide
(https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C029e8c8665144bb4192b08da27603137%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637865591919935155%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=UGMoFZkteyH3cZXvONnhL4L%2BjGxEeNFiFkg4hGDHY1M%3D&amp;reserved=0).

I've attached both projects. Both report errors with chnset.k at perf
time with messages of:

PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name

I ran with a debugger and adding this code:

   printf("PERFK: %s | %s\n", p->chname, p->iname->data);

to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:

PERFK:  | frq.10

PERFK:  | frq.20

PERFK:  | frq.30

PERFK: frq.10 | frq.10
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[m
PERFK: frq.20 | frq.20
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[m
PERFK: frq.30 | frq.30
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[minstr 2: [m  ivoice = 10.000 [m
[mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
[mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
[mfrq.30 [m
PERFK: frq.30 | frq.10

PERFK: frq.20 | frq.20

This seems to have worked in csound 6.16 but broke somewhere along the
lines into 6.17.

Anyone have any ideas on what introduced this error now?  I'll try a
bisect session tomorrow to see about getting more info.

Steven
<project_prtintf_chnset_bug.zip><glide.csd>



Date2022-04-26 19:23
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.

On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

I found that the attached project runs with 

--Csound version 6.17 (double samples) Feb  2 2022
[commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]

but does not run with the current 6.18 code in the csound6 branch.

On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

The glide.csd runs here with no problems, is that what you are seeing?


--Csound version 6.17 (double samples) Feb 2 2022
[commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
sr = 44100.0, kr = 689.062, ksmps = 64
0dBFS level = 1.0, A4 tuning = 440.0
audio buffered in 16 sample-frame blocks
writing 32 sample blks of 64-bit floats to dac
SECTION 1:
instr 1: ivoice = 10.000
instr 1: ivoice = 20.000
instr 1: ivoice = 30.000
instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30instr 2: ivoice = 10.000
frq.10instr 2: ivoice = 20.000
frq.20instr 2: ivoice = 30.000
frq.30Score finished in csoundPerformKsmps() with 2.
end of score. overall amps: 0.92870 0.92870
overall samples out of range: 0 0
0 errors in performance
11052 32 sample blks of 64-bit floats written to dac




On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi All,

I noticed that using sprintf and chnset seems to be breaking now in
ways that it did not previously. I found this in a new project I was
writing today, and also in an older project that I did a couple years
ago on the web-ide
(https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C029e8c8665144bb4192b08da27603137%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637865591919935155%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=UGMoFZkteyH3cZXvONnhL4L%2BjGxEeNFiFkg4hGDHY1M%3D&amp;reserved=0).

I've attached both projects. Both report errors with chnset.k at perf
time with messages of:

PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name

I ran with a debugger and adding this code:

   printf("PERFK: %s | %s\n", p->chname, p->iname->data);

to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:

PERFK:  | frq.10

PERFK:  | frq.20

PERFK:  | frq.30

PERFK: frq.10 | frq.10
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[m
PERFK: frq.20 | frq.20
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[m
PERFK: frq.30 | frq.30
PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
[m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
  note aborted
[minstr 2: [m  ivoice = 10.000 [m
[mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
[mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
[mfrq.30 [m
PERFK: frq.30 | frq.10

PERFK: frq.20 | frq.20

This seems to have worked in csound 6.16 but broke somewhere along the
lines into 6.17.

Anyone have any ideas on what introduced this error now?  I'll try a
bisect session tomorrow to see about getting more info.

Steven
<project_prtintf_chnset_bug.zip><glide.csd>




Date2022-04-26 21:38
FromSteven Yi
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
for both projects. So whatever bug that has been introduced is just in
dev versions. The one issue is that the latest webaudio Csound release
is being built from csound6 tag which threw me off (which is also
being used on the web-ide at the moment). We'll have to address this
before we release the final 6.17.0 webaudio release.

On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>
> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>
> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>
> I found that the attached project runs with
>
> --Csound version 6.17 (double samples) Feb  2 2022
> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>
> but does not run with the current 6.18 code in the csound6 branch.
>
> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>
>
> The glide.csd runs here with no problems, is that what you are seeing?
>
>
> --Csound version 6.17 (double samples) Feb 2 2022
> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
> sr = 44100.0, kr = 689.062, ksmps = 64
> 0dBFS level = 1.0, A4 tuning = 440.0
> audio buffered in 16 sample-frame blocks
> writing 32 sample blks of 64-bit floats to dac
> SECTION 1:
> instr 1: ivoice = 10.000
> instr 1: ivoice = 20.000
> instr 1: ivoice = 30.000
> instr 2: ivoice = 10.000
> frq.10instr 2: ivoice = 20.000
> frq.20instr 2: ivoice = 30.000
> frq.30instr 2: ivoice = 10.000
> frq.10instr 2: ivoice = 20.000
> frq.20instr 2: ivoice = 30.000
> frq.30instr 2: ivoice = 10.000
> frq.10instr 2: ivoice = 20.000
> frq.20instr 2: ivoice = 30.000
> frq.30Score finished in csoundPerformKsmps() with 2.
> end of score. overall amps: 0.92870 0.92870
> overall samples out of range: 0 0
> 0 errors in performance
> 11052 32 sample blks of 64-bit floats written to dac
>
>
>
>
> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Hi All,
>
> I noticed that using sprintf and chnset seems to be breaking now in
> ways that it did not previously. I found this in a new project I was
> writing today, and also in an older project that I did a couple years
> ago on the web-ide
> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C029e8c8665144bb4192b08da27603137%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637865591919935155%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UGMoFZkteyH3cZXvONnhL4L%2BjGxEeNFiFkg4hGDHY1M%3D&reserved=0).
>
> I've attached both projects. Both report errors with chnset.k at perf
> time with messages of:
>
> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>
> I ran with a debugger and adding this code:
>
>    printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>
> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>
> PERFK:  | frq.10
>
> PERFK:  | frq.20
>
> PERFK:  | frq.30
>
> PERFK: frq.10 | frq.10
> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>   note aborted
> [m
> PERFK: frq.20 | frq.20
> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>   note aborted
> [m
> PERFK: frq.30 | frq.30
> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>   note aborted
> [minstr 2: [m  ivoice = 10.000 [m
> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
> [mfrq.30 [m
> PERFK: frq.30 | frq.10
>
> PERFK: frq.20 | frq.20
>
> This seems to have worked in csound 6.16 but broke somewhere along the
> lines into 6.17.
>
> Anyone have any ideas on what introduced this error now?  I'll try a
> bisect session tomorrow to see about getting more info.
>
> Steven
> 
>
>
>

Date2022-04-26 23:06
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
> 
> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
> for both projects. So whatever bug that has been introduced is just in
> dev versions. The one issue is that the latest webaudio Csound release
> is being built from csound6 tag which threw me off (which is also
> being used on the web-ide at the moment). We'll have to address this
> before we release the final 6.17.0 webaudio release.
> 
>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>> 
>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>> 
>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>> 
>> I found that the attached project runs with
>> 
>> --Csound version 6.17 (double samples) Feb  2 2022
>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>> 
>> but does not run with the current 6.18 code in the csound6 branch.
>> 
>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>> 
>> 
>> The glide.csd runs here with no problems, is that what you are seeing?
>> 
>> 
>> --Csound version 6.17 (double samples) Feb 2 2022
>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>> sr = 44100.0, kr = 689.062, ksmps = 64
>> 0dBFS level = 1.0, A4 tuning = 440.0
>> audio buffered in 16 sample-frame blocks
>> writing 32 sample blks of 64-bit floats to dac
>> SECTION 1:
>> instr 1: ivoice = 10.000
>> instr 1: ivoice = 20.000
>> instr 1: ivoice = 30.000
>> instr 2: ivoice = 10.000
>> frq.10instr 2: ivoice = 20.000
>> frq.20instr 2: ivoice = 30.000
>> frq.30instr 2: ivoice = 10.000
>> frq.10instr 2: ivoice = 20.000
>> frq.20instr 2: ivoice = 30.000
>> frq.30instr 2: ivoice = 10.000
>> frq.10instr 2: ivoice = 20.000
>> frq.20instr 2: ivoice = 30.000
>> frq.30Score finished in csoundPerformKsmps() with 2.
>> end of score. overall amps: 0.92870 0.92870
>> overall samples out of range: 0 0
>> 0 errors in performance
>> 11052 32 sample blks of 64-bit floats written to dac
>> 
>> 
>> 
>> 
>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>> 
>> *Warning*
>> 
>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> 
>> Hi All,
>> 
>> I noticed that using sprintf and chnset seems to be breaking now in
>> ways that it did not previously. I found this in a new project I was
>> writing today, and also in an older project that I did a couple years
>> ago on the web-ide
>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C2a41b1d90c1242ad7e2b08da27c4cbf6%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637866024039523256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=e0%2BeqaMKkqJ3VmTpbPvulUxvUH8m0JwujUwqujKP%2BMk%3D&reserved=0).
>> 
>> I've attached both projects. Both report errors with chnset.k at perf
>> time with messages of:
>> 
>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>> 
>> I ran with a debugger and adding this code:
>> 
>>   printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>> 
>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>> 
>> PERFK:  | frq.10
>> 
>> PERFK:  | frq.20
>> 
>> PERFK:  | frq.30
>> 
>> PERFK: frq.10 | frq.10
>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>  note aborted
>> [m
>> PERFK: frq.20 | frq.20
>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>  note aborted
>> [m
>> PERFK: frq.30 | frq.30
>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>  note aborted
>> [minstr 2: [m  ivoice = 10.000 [m
>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>> [mfrq.30 [m
>> PERFK: frq.30 | frq.10
>> 
>> PERFK: frq.20 | frq.20
>> 
>> This seems to have worked in csound 6.16 but broke somewhere along the
>> lines into 6.17.
>> 
>> Anyone have any ideas on what introduced this error now?  I'll try a
>> bisect session tomorrow to see about getting more info.
>> 
>> Steven
>> 

Date2022-05-02 01:59
FromSteven Yi
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
I found the bug and pushed a commit. The bug was introduced in this commit:

https://github.com/csound/csound/commit/512984db5dbb637fc53b3a50ff8480dbf715d6a1

and the fix I put in is here:

https://github.com/csound/csound/commit/ccd82b9f21357c2913fff6ffe7b26d25ade11c65

There was a check if a channel name did not match the one for the
channel that was allocated and, if not, try to allocate the new
channel. However, the code in the first commit treated the valid path
(channel name is a match) as an invalid channel name, which I believe
is not what that code was meant to do.

Victor: could you review the commit to see if this changes anything
for what your commit was addressing?

On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
>
> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> > On 26 Apr 2022, at 21:40, Steven Yi  wrote:
> >
> > Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
> > for both projects. So whatever bug that has been introduced is just in
> > dev versions. The one issue is that the latest webaudio Csound release
> > is being built from csound6 tag which threw me off (which is also
> > being used on the web-ide at the moment). We'll have to address this
> > before we release the final 6.17.0 webaudio release.
> >
> >> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
> >>
> >> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
> >>
> >> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
> >>
> >> I found that the attached project runs with
> >>
> >> --Csound version 6.17 (double samples) Feb  2 2022
> >> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
> >>
> >> but does not run with the current 6.18 code in the csound6 branch.
> >>
> >> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
> >>
> >>
> >> The glide.csd runs here with no problems, is that what you are seeing?
> >>
> >>
> >> --Csound version 6.17 (double samples) Feb 2 2022
> >> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
> >> sr = 44100.0, kr = 689.062, ksmps = 64
> >> 0dBFS level = 1.0, A4 tuning = 440.0
> >> audio buffered in 16 sample-frame blocks
> >> writing 32 sample blks of 64-bit floats to dac
> >> SECTION 1:
> >> instr 1: ivoice = 10.000
> >> instr 1: ivoice = 20.000
> >> instr 1: ivoice = 30.000
> >> instr 2: ivoice = 10.000
> >> frq.10instr 2: ivoice = 20.000
> >> frq.20instr 2: ivoice = 30.000
> >> frq.30instr 2: ivoice = 10.000
> >> frq.10instr 2: ivoice = 20.000
> >> frq.20instr 2: ivoice = 30.000
> >> frq.30instr 2: ivoice = 10.000
> >> frq.10instr 2: ivoice = 20.000
> >> frq.20instr 2: ivoice = 30.000
> >> frq.30Score finished in csoundPerformKsmps() with 2.
> >> end of score. overall amps: 0.92870 0.92870
> >> overall samples out of range: 0 0
> >> 0 errors in performance
> >> 11052 32 sample blks of 64-bit floats written to dac
> >>
> >>
> >>
> >>
> >> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
> >>
> >> *Warning*
> >>
> >> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> >>
> >> Hi All,
> >>
> >> I noticed that using sprintf and chnset seems to be breaking now in
> >> ways that it did not previously. I found this in a new project I was
> >> writing today, and also in an older project that I did a couple years
> >> ago on the web-ide
> >> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C2a41b1d90c1242ad7e2b08da27c4cbf6%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637866024039523256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=e0%2BeqaMKkqJ3VmTpbPvulUxvUH8m0JwujUwqujKP%2BMk%3D&reserved=0).
> >>
> >> I've attached both projects. Both report errors with chnset.k at perf
> >> time with messages of:
> >>
> >> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
> >>
> >> I ran with a debugger and adding this code:
> >>
> >>   printf("PERFK: %s | %s\n", p->chname, p->iname->data);
> >>
> >> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
> >>
> >> PERFK:  | frq.10
> >>
> >> PERFK:  | frq.20
> >>
> >> PERFK:  | frq.30
> >>
> >> PERFK: frq.10 | frq.10
> >> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> >> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
> >>  note aborted
> >> [m
> >> PERFK: frq.20 | frq.20
> >> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> >> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
> >>  note aborted
> >> [m
> >> PERFK: frq.30 | frq.30
> >> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> >> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
> >>  note aborted
> >> [minstr 2: [m  ivoice = 10.000 [m
> >> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
> >> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
> >> [mfrq.30 [m
> >> PERFK: frq.30 | frq.10
> >>
> >> PERFK: frq.20 | frq.20
> >>
> >> This seems to have worked in csound 6.16 but broke somewhere along the
> >> lines into 6.17.
> >>
> >> Anyone have any ideas on what introduced this error now?  I'll try a
> >> bisect session tomorrow to see about getting more info.
> >>
> >> Steven
> >> 
> >>
> >>
> >>

Date2022-05-02 16:49
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 02:00, Steven Yi  wrote:
> 
> I found the bug and pushed a commit. The bug was introduced in this commit:
> 
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OFJLHHyoZIG6j7lZQUq56yvcMF8arUbwl75IBnAfZ6g%3D&reserved=0
> 
> and the fix I put in is here:
> 
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=V%2BZBzia1s3UtnwtZz4sY9h4cQccq6PEAjBHqUmX%2BvxU%3D&reserved=0
> 
> There was a check if a channel name did not match the one for the
> channel that was allocated and, if not, try to allocate the new
> channel. However, the code in the first commit treated the valid path
> (channel name is a match) as an invalid channel name, which I believe
> is not what that code was meant to do.
> 
> Victor: could you review the commit to see if this changes anything
> for what your commit was addressing?
> 
>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
>> 
>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>> 
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>>>> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
>>> 
>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>> for both projects. So whatever bug that has been introduced is just in
>>> dev versions. The one issue is that the latest webaudio Csound release
>>> is being built from csound6 tag which threw me off (which is also
>>> being used on the web-ide at the moment). We'll have to address this
>>> before we release the final 6.17.0 webaudio release.
>>> 
>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>>>> 
>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>> 
>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>>>> 
>>>> I found that the attached project runs with
>>>> 
>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>> 
>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>> 
>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>>>> 
>>>> 
>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>> 
>>>> 
>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>> audio buffered in 16 sample-frame blocks
>>>> writing 32 sample blks of 64-bit floats to dac
>>>> SECTION 1:
>>>> instr 1: ivoice = 10.000
>>>> instr 1: ivoice = 20.000
>>>> instr 1: ivoice = 30.000
>>>> instr 2: ivoice = 10.000
>>>> frq.10instr 2: ivoice = 20.000
>>>> frq.20instr 2: ivoice = 30.000
>>>> frq.30instr 2: ivoice = 10.000
>>>> frq.10instr 2: ivoice = 20.000
>>>> frq.20instr 2: ivoice = 30.000
>>>> frq.30instr 2: ivoice = 10.000
>>>> frq.10instr 2: ivoice = 20.000
>>>> frq.20instr 2: ivoice = 30.000
>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>> end of score. overall amps: 0.92870 0.92870
>>>> overall samples out of range: 0 0
>>>> 0 errors in performance
>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>>>> 
>>>> *Warning*
>>>> 
>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>> 
>>>> Hi All,
>>>> 
>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>> ways that it did not previously. I found this in a new project I was
>>>> writing today, and also in an older project that I did a couple years
>>>> ago on the web-ide
>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IWnrXpyLsat5Hm%2FlByWsFOeZo9NcB%2FZbqFvg%2BfqYRQQ%3D&reserved=0).
>>>> 
>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>> time with messages of:
>>>> 
>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>> 
>>>> I ran with a debugger and adding this code:
>>>> 
>>>>  printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>> 
>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>> 
>>>> PERFK:  | frq.10
>>>> 
>>>> PERFK:  | frq.20
>>>> 
>>>> PERFK:  | frq.30
>>>> 
>>>> PERFK: frq.10 | frq.10
>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>> note aborted
>>>> [m
>>>> PERFK: frq.20 | frq.20
>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>> note aborted
>>>> [m
>>>> PERFK: frq.30 | frq.30
>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>> note aborted
>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>> [mfrq.30 [m
>>>> PERFK: frq.30 | frq.10
>>>> 
>>>> PERFK: frq.20 | frq.20
>>>> 
>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>> lines into 6.17.
>>>> 
>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>> bisect session tomorrow to see about getting more info.
>>>> 
>>>> Steven
>>>> 
>>>> 
>>>> 
>>>> 

Date2022-05-02 17:03
FromSteven Yi
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
Well the change I put in only modifies the perf-code, but the change
for init-time is still there.

On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini  wrote:
>
> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> > On 2 May 2022, at 02:00, Steven Yi  wrote:
> >
> > I found the bug and pushed a commit. The bug was introduced in this commit:
> >
> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OFJLHHyoZIG6j7lZQUq56yvcMF8arUbwl75IBnAfZ6g%3D&reserved=0
> >
> > and the fix I put in is here:
> >
> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=V%2BZBzia1s3UtnwtZz4sY9h4cQccq6PEAjBHqUmX%2BvxU%3D&reserved=0
> >
> > There was a check if a channel name did not match the one for the
> > channel that was allocated and, if not, try to allocate the new
> > channel. However, the code in the first commit treated the valid path
> > (channel name is a match) as an invalid channel name, which I believe
> > is not what that code was meant to do.
> >
> > Victor: could you review the commit to see if this changes anything
> > for what your commit was addressing?
> >
> >> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
> >>
> >> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
> >>
> >> Prof. Victor Lazzarini
> >> Maynooth University
> >> Ireland
> >>
> >>>> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
> >>>
> >>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
> >>> for both projects. So whatever bug that has been introduced is just in
> >>> dev versions. The one issue is that the latest webaudio Csound release
> >>> is being built from csound6 tag which threw me off (which is also
> >>> being used on the web-ide at the moment). We'll have to address this
> >>> before we release the final 6.17.0 webaudio release.
> >>>
> >>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
> >>>>
> >>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
> >>>>
> >>>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
> >>>>
> >>>> I found that the attached project runs with
> >>>>
> >>>> --Csound version 6.17 (double samples) Feb  2 2022
> >>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
> >>>>
> >>>> but does not run with the current 6.18 code in the csound6 branch.
> >>>>
> >>>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
> >>>>
> >>>>
> >>>> The glide.csd runs here with no problems, is that what you are seeing?
> >>>>
> >>>>
> >>>> --Csound version 6.17 (double samples) Feb 2 2022
> >>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
> >>>> sr = 44100.0, kr = 689.062, ksmps = 64
> >>>> 0dBFS level = 1.0, A4 tuning = 440.0
> >>>> audio buffered in 16 sample-frame blocks
> >>>> writing 32 sample blks of 64-bit floats to dac
> >>>> SECTION 1:
> >>>> instr 1: ivoice = 10.000
> >>>> instr 1: ivoice = 20.000
> >>>> instr 1: ivoice = 30.000
> >>>> instr 2: ivoice = 10.000
> >>>> frq.10instr 2: ivoice = 20.000
> >>>> frq.20instr 2: ivoice = 30.000
> >>>> frq.30instr 2: ivoice = 10.000
> >>>> frq.10instr 2: ivoice = 20.000
> >>>> frq.20instr 2: ivoice = 30.000
> >>>> frq.30instr 2: ivoice = 10.000
> >>>> frq.10instr 2: ivoice = 20.000
> >>>> frq.20instr 2: ivoice = 30.000
> >>>> frq.30Score finished in csoundPerformKsmps() with 2.
> >>>> end of score. overall amps: 0.92870 0.92870
> >>>> overall samples out of range: 0 0
> >>>> 0 errors in performance
> >>>> 11052 32 sample blks of 64-bit floats written to dac
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
> >>>>
> >>>> *Warning*
> >>>>
> >>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> >>>>
> >>>> Hi All,
> >>>>
> >>>> I noticed that using sprintf and chnset seems to be breaking now in
> >>>> ways that it did not previously. I found this in a new project I was
> >>>> writing today, and also in an older project that I did a couple years
> >>>> ago on the web-ide
> >>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IWnrXpyLsat5Hm%2FlByWsFOeZo9NcB%2FZbqFvg%2BfqYRQQ%3D&reserved=0).
> >>>>
> >>>> I've attached both projects. Both report errors with chnset.k at perf
> >>>> time with messages of:
> >>>>
> >>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
> >>>>
> >>>> I ran with a debugger and adding this code:
> >>>>
> >>>>  printf("PERFK: %s | %s\n", p->chname, p->iname->data);
> >>>>
> >>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
> >>>>
> >>>> PERFK:  | frq.10
> >>>>
> >>>> PERFK:  | frq.20
> >>>>
> >>>> PERFK:  | frq.30
> >>>>
> >>>> PERFK: frq.10 | frq.10
> >>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> >>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
> >>>> note aborted
> >>>> [m
> >>>> PERFK: frq.20 | frq.20
> >>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> >>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
> >>>> note aborted
> >>>> [m
> >>>> PERFK: frq.30 | frq.30
> >>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
> >>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
> >>>> note aborted
> >>>> [minstr 2: [m  ivoice = 10.000 [m
> >>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
> >>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
> >>>> [mfrq.30 [m
> >>>> PERFK: frq.30 | frq.10
> >>>>
> >>>> PERFK: frq.20 | frq.20
> >>>>
> >>>> This seems to have worked in csound 6.16 but broke somewhere along the
> >>>> lines into 6.17.
> >>>>
> >>>> Anyone have any ideas on what introduced this error now?  I'll try a
> >>>> bisect session tomorrow to see about getting more info.
> >>>>
> >>>> Steven
> >>>> 
> >>>>
> >>>>
> >>>>

Date2022-05-02 17:09
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
and of course, the fix was wrong.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 16:50, Victor Lazzarini  wrote:
> 
> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 2 May 2022, at 02:00, Steven Yi  wrote:
>> 
>> I found the bug and pushed a commit. The bug was introduced in this commit:
>> 
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OFJLHHyoZIG6j7lZQUq56yvcMF8arUbwl75IBnAfZ6g%3D&reserved=0
>> 
>> and the fix I put in is here:
>> 
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=V%2BZBzia1s3UtnwtZz4sY9h4cQccq6PEAjBHqUmX%2BvxU%3D&reserved=0
>> 
>> There was a check if a channel name did not match the one for the
>> channel that was allocated and, if not, try to allocate the new
>> channel. However, the code in the first commit treated the valid path
>> (channel name is a match) as an invalid channel name, which I believe
>> is not what that code was meant to do.
>> 
>> Victor: could you review the commit to see if this changes anything
>> for what your commit was addressing?
>> 
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
>>> 
>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>> 
>>> Prof. Victor Lazzarini
>>> Maynooth University
>>> Ireland
>>> 
>>>>> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
>>>> 
>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>> for both projects. So whatever bug that has been introduced is just in
>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>> is being built from csound6 tag which threw me off (which is also
>>>> being used on the web-ide at the moment). We'll have to address this
>>>> before we release the final 6.17.0 webaudio release.
>>>> 
>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>>>>> 
>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>> 
>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>>>>> 
>>>>> I found that the attached project runs with
>>>>> 
>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>> 
>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>> 
>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>>>>> 
>>>>> 
>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>> 
>>>>> 
>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>> audio buffered in 16 sample-frame blocks
>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>> SECTION 1:
>>>>> instr 1: ivoice = 10.000
>>>>> instr 1: ivoice = 20.000
>>>>> instr 1: ivoice = 30.000
>>>>> instr 2: ivoice = 10.000
>>>>> frq.10instr 2: ivoice = 20.000
>>>>> frq.20instr 2: ivoice = 30.000
>>>>> frq.30instr 2: ivoice = 10.000
>>>>> frq.10instr 2: ivoice = 20.000
>>>>> frq.20instr 2: ivoice = 30.000
>>>>> frq.30instr 2: ivoice = 10.000
>>>>> frq.10instr 2: ivoice = 20.000
>>>>> frq.20instr 2: ivoice = 30.000
>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>> end of score. overall amps: 0.92870 0.92870
>>>>> overall samples out of range: 0 0
>>>>> 0 errors in performance
>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>>>>> 
>>>>> *Warning*
>>>>> 
>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>> 
>>>>> Hi All,
>>>>> 
>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>> ways that it did not previously. I found this in a new project I was
>>>>> writing today, and also in an older project that I did a couple years
>>>>> ago on the web-ide
>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cccd5cb2b23da4b56966208da2bd70abd%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637870500576178763%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IWnrXpyLsat5Hm%2FlByWsFOeZo9NcB%2FZbqFvg%2BfqYRQQ%3D&reserved=0).
>>>>> 
>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>> time with messages of:
>>>>> 
>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>> 
>>>>> I ran with a debugger and adding this code:
>>>>> 
>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>> 
>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>> 
>>>>> PERFK:  | frq.10
>>>>> 
>>>>> PERFK:  | frq.20
>>>>> 
>>>>> PERFK:  | frq.30
>>>>> 
>>>>> PERFK: frq.10 | frq.10
>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>> note aborted
>>>>> [m
>>>>> PERFK: frq.20 | frq.20
>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>> note aborted
>>>>> [m
>>>>> PERFK: frq.30 | frq.30
>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>> note aborted
>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>> [mfrq.30 [m
>>>>> PERFK: frq.30 | frq.10
>>>>> 
>>>>> PERFK: frq.20 | frq.20
>>>>> 
>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>> lines into 6.17.
>>>>> 
>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>> bisect session tomorrow to see about getting more info.
>>>>> 
>>>>> Steven
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>

Date2022-05-02 17:14
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi  wrote:
> 
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
> 
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini  wrote:
>> 
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>> 
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>>>> On 2 May 2022, at 02:00, Steven Yi  wrote:
>>> 
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>> 
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&reserved=0
>>> 
>>> and the fix I put in is here:
>>> 
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&reserved=0
>>> 
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>> 
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>> 
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
>>>> 
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>> 
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
>>>>> 
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>> 
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>>>>>> 
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>> 
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>>>>>> 
>>>>>> I found that the attached project runs with
>>>>>> 
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> 
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>> 
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>>>>>> 
>>>>>> 
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>> 
>>>>>> 
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>>>>>> 
>>>>>> *Warning*
>>>>>> 
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>> 
>>>>>> Hi All,
>>>>>> 
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&reserved=0).
>>>>>> 
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>> 
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>> 
>>>>>> I ran with a debugger and adding this code:
>>>>>> 
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>> 
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>> 
>>>>>> PERFK:  | frq.10
>>>>>> 
>>>>>> PERFK:  | frq.20
>>>>>> 
>>>>>> PERFK:  | frq.30
>>>>>> 
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>> 
>>>>>> PERFK: frq.20 | frq.20
>>>>>> 
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>> 
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>> 
>>>>>> Steven
>>>>>> 
>>>>>

Date2022-05-02 21:32
FromIain Duncan
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.

iain

On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi <stevenyi@gmail.com> wrote:
>
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
>
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>>> On 2 May 2022, at 02:00, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&amp;reserved=0
>>>
>>> and the fix I put in is here:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&amp;reserved=0
>>>
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>>
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>>
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>>
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>>
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> I found that the attached project runs with
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>>
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>>
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>>
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>
>>>>>> *Warning*
>>>>>>
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&amp;reserved=0).
>>>>>>
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>>
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>>
>>>>>> I ran with a debugger and adding this code:
>>>>>>
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>>
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>>
>>>>>> PERFK:  | frq.10
>>>>>>
>>>>>> PERFK:  | frq.20
>>>>>>
>>>>>> PERFK:  | frq.30
>>>>>>
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>>
>>>>>> PERFK: frq.20 | frq.20
>>>>>>
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>>
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>>
>>>>>> Steven
>>>>>> <project_prtintf_chnset_bug.zip><glide.csd>
>>>>>>
>>>>>>
>>>>>>
>>>>>>

Date2022-05-03 18:01
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
it seems the plugin tests are failing, but I'm also seeing

```
[browser] log: INIT ERROR in instr 1 (opcode chnset.S) line 10: channel already exists with incompatible type ```

On Mon, 2 May 2022 at 22:32, Iain Duncan <iainduncanlists@gmail.com> wrote:
Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.

iain

On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi <stevenyi@gmail.com> wrote:
>
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
>
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>>> On 2 May 2022, at 02:00, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&amp;reserved=0
>>>
>>> and the fix I put in is here:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&amp;reserved=0
>>>
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>>
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>>
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>>
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>>
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> I found that the attached project runs with
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>>
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>>
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>>
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>
>>>>>> *Warning*
>>>>>>
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&amp;reserved=0).
>>>>>>
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>>
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>>
>>>>>> I ran with a debugger and adding this code:
>>>>>>
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>>
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>>
>>>>>> PERFK:  | frq.10
>>>>>>
>>>>>> PERFK:  | frq.20
>>>>>>
>>>>>> PERFK:  | frq.30
>>>>>>
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>>
>>>>>> PERFK: frq.20 | frq.20
>>>>>>
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>>
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>>
>>>>>> Steven
>>>>>> <project_prtintf_chnset_bug.zip><glide.csd>
>>>>>>
>>>>>>
>>>>>>
>>>>>>

Date2022-05-03 18:04
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
simply put, I broke the test myself, my apologies :D

On Tue, 3 May 2022 at 19:01, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
it seems the plugin tests are failing, but I'm also seeing

```
[browser] log: INIT ERROR in instr 1 (opcode chnset.S) line 10: channel already exists with incompatible type ```

On Mon, 2 May 2022 at 22:32, Iain Duncan <iainduncanlists@gmail.com> wrote:
Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.

iain

On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi <stevenyi@gmail.com> wrote:
>
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
>
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>>> On 2 May 2022, at 02:00, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&amp;reserved=0
>>>
>>> and the fix I put in is here:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&amp;reserved=0
>>>
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>>
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>>
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>>
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>>
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> I found that the attached project runs with
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>>
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>>
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>>
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>
>>>>>> *Warning*
>>>>>>
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&amp;reserved=0).
>>>>>>
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>>
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>>
>>>>>> I ran with a debugger and adding this code:
>>>>>>
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>>
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>>
>>>>>> PERFK:  | frq.10
>>>>>>
>>>>>> PERFK:  | frq.20
>>>>>>
>>>>>> PERFK:  | frq.30
>>>>>>
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>>
>>>>>> PERFK: frq.20 | frq.20
>>>>>>
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>>
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>>
>>>>>> Steven
>>>>>> <project_prtintf_chnset_bug.zip><glide.csd>
>>>>>>
>>>>>>
>>>>>>
>>>>>>

Date2022-05-04 12:43
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
the tests have been fixed and I publish an npm package 

6.17.1
which includes the channel fix, I pushed the fix (@csound/browser update) to web-ide as well


On Tue, 3 May 2022 at 19:04, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
simply put, I broke the test myself, my apologies :D

On Tue, 3 May 2022 at 19:01, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
it seems the plugin tests are failing, but I'm also seeing

```
[browser] log: INIT ERROR in instr 1 (opcode chnset.S) line 10: channel already exists with incompatible type ```

On Mon, 2 May 2022 at 22:32, Iain Duncan <iainduncanlists@gmail.com> wrote:
Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.

iain

On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi <stevenyi@gmail.com> wrote:
>
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
>
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>>> On 2 May 2022, at 02:00, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&amp;reserved=0
>>>
>>> and the fix I put in is here:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&amp;reserved=0
>>>
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>>
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>>
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>>
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>>
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> I found that the attached project runs with
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>>
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>>
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>>
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>
>>>>>> *Warning*
>>>>>>
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&amp;reserved=0).
>>>>>>
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>>
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>>
>>>>>> I ran with a debugger and adding this code:
>>>>>>
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>>
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>>
>>>>>> PERFK:  | frq.10
>>>>>>
>>>>>> PERFK:  | frq.20
>>>>>>
>>>>>> PERFK:  | frq.30
>>>>>>
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>>
>>>>>> PERFK: frq.20 | frq.20
>>>>>>
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>>
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>>
>>>>>> Steven
>>>>>> <project_prtintf_chnset_bug.zip><glide.csd>
>>>>>>
>>>>>>
>>>>>>
>>>>>>

Date2022-05-04 17:15
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
Hang on, 6.17 did not have a channel issue. That was in 6.18, not sure what is going on there.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 4 May 2022, at 12:45, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:


the tests have been fixed and I publish an npm package 

6.17.1
which includes the channel fix, I pushed the fix (@csound/browser update) to web-ide as well


On Tue, 3 May 2022 at 19:04, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
simply put, I broke the test myself, my apologies :D

On Tue, 3 May 2022 at 19:01, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
it seems the plugin tests are failing, but I'm also seeing

```
[browser] log: INIT ERROR in instr 1 (opcode chnset.S) line 10: channel already exists with incompatible type ```

On Mon, 2 May 2022 at 22:32, Iain Duncan <iainduncanlists@gmail.com> wrote:
Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.

iain

On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi <stevenyi@gmail.com> wrote:
>
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
>
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>>> On 2 May 2022, at 02:00, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&amp;reserved=0
>>>
>>> and the fix I put in is here:
>>>
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&amp;reserved=0
>>>
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>>
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>>
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>>
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>>
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>> I found that the attached project runs with
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>>
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>>
>>>>>>
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>>
>>>>>>
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>>
>>>>>> *Warning*
>>>>>>
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&amp;reserved=0).
>>>>>>
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>>
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>>
>>>>>> I ran with a debugger and adding this code:
>>>>>>
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>>
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>>
>>>>>> PERFK:  | frq.10
>>>>>>
>>>>>> PERFK:  | frq.20
>>>>>>
>>>>>> PERFK:  | frq.30
>>>>>>
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>>
>>>>>> PERFK: frq.20 | frq.20
>>>>>>
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>>
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>>
>>>>>> Steven
>>>>>> <project_prtintf_chnset_bug.zip><glide.csd>
>>>>>>
>>>>>>
>>>>>>
>>>>>>

Date2022-05-04 18:20
FromSteven Yi
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
The WebAudio csound package was being built from the csound6 branch so
it picked up that issue, but it should be all good now.

On Wed, May 4, 2022 at 12:16 PM Victor Lazzarini  wrote:
>
> Hang on, 6.17 did not have a channel issue. That was in 6.18, not sure what is going on there.
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> On 4 May 2022, at 12:45, Hlöðver Sigurðsson  wrote:
>
> 
> the tests have been fixed and I publish an npm package
>
> 6.17.1
> which includes the channel fix, I pushed the fix (@csound/browser update) to web-ide as well
>
>
> On Tue, 3 May 2022 at 19:04, Hlöðver Sigurðsson  wrote:
>>
>> simply put, I broke the test myself, my apologies :D
>>
>> On Tue, 3 May 2022 at 19:01, Hlöðver Sigurðsson  wrote:
>>>
>>> it seems the plugin tests are failing, but I'm also seeing
>>>
>>> ```
>>> [browser] log: INIT ERROR in instr 1 (opcode chnset.S) line 10: channel already exists with incompatible type ```
>>>
>>> On Mon, 2 May 2022 at 22:32, Iain Duncan  wrote:
>>>>
>>>> Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.
>>>>
>>>> iain
>>>>
>>>> On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini  wrote:
>>>>>
>>>>> yes, it looks like the issue might not arise at perf time.
>>>>>
>>>>> Prof. Victor Lazzarini
>>>>> Maynooth University
>>>>> Ireland
>>>>>
>>>>> > On 2 May 2022, at 17:05, Steven Yi  wrote:
>>>>> >
>>>>> > Well the change I put in only modifies the perf-code, but the change
>>>>> > for init-time is still there.
>>>>> >
>>>>> >> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini  wrote:
>>>>> >>
>>>>> >> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>>>> >>
>>>>> >> Prof. Victor Lazzarini
>>>>> >> Maynooth University
>>>>> >> Ireland
>>>>> >>
>>>>> >>>> On 2 May 2022, at 02:00, Steven Yi  wrote:
>>>>> >>>
>>>>> >>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>>> >>>
>>>>> >>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&reserved=0
>>>>> >>>
>>>>> >>> and the fix I put in is here:
>>>>> >>>
>>>>> >>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&reserved=0
>>>>> >>>
>>>>> >>> There was a check if a channel name did not match the one for the
>>>>> >>> channel that was allocated and, if not, try to allocate the new
>>>>> >>> channel. However, the code in the first commit treated the valid path
>>>>> >>> (channel name is a match) as an invalid channel name, which I believe
>>>>> >>> is not what that code was meant to do.
>>>>> >>>
>>>>> >>> Victor: could you review the commit to see if this changes anything
>>>>> >>> for what your commit was addressing?
>>>>> >>>
>>>>> >>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
>>>>> >>>>
>>>>> >>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>> >>>>
>>>>> >>>> Prof. Victor Lazzarini
>>>>> >>>> Maynooth University
>>>>> >>>> Ireland
>>>>> >>>>
>>>>> >>>>>> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
>>>>> >>>>>
>>>>> >>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> >>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> >>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> >>>>> is being built from csound6 tag which threw me off (which is also
>>>>> >>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> >>>>> before we release the final 6.17.0 webaudio release.
>>>>> >>>>>
>>>>> >>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>>>>> >>>>>>
>>>>> >>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>> >>>>>>
>>>>> >>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>>>>> >>>>>>
>>>>> >>>>>> I found that the attached project runs with
>>>>> >>>>>>
>>>>> >>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>> >>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>> >>>>>>
>>>>> >>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>> >>>>>>
>>>>> >>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>>>>> >>>>>>
>>>>> >>>>>>
>>>>> >>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>> >>>>>>
>>>>> >>>>>>
>>>>> >>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>> >>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>> >>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>> >>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>> >>>>>> audio buffered in 16 sample-frame blocks
>>>>> >>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>> >>>>>> SECTION 1:
>>>>> >>>>>> instr 1: ivoice = 10.000
>>>>> >>>>>> instr 1: ivoice = 20.000
>>>>> >>>>>> instr 1: ivoice = 30.000
>>>>> >>>>>> instr 2: ivoice = 10.000
>>>>> >>>>>> frq.10instr 2: ivoice = 20.000
>>>>> >>>>>> frq.20instr 2: ivoice = 30.000
>>>>> >>>>>> frq.30instr 2: ivoice = 10.000
>>>>> >>>>>> frq.10instr 2: ivoice = 20.000
>>>>> >>>>>> frq.20instr 2: ivoice = 30.000
>>>>> >>>>>> frq.30instr 2: ivoice = 10.000
>>>>> >>>>>> frq.10instr 2: ivoice = 20.000
>>>>> >>>>>> frq.20instr 2: ivoice = 30.000
>>>>> >>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>> >>>>>> end of score. overall amps: 0.92870 0.92870
>>>>> >>>>>> overall samples out of range: 0 0
>>>>> >>>>>> 0 errors in performance
>>>>> >>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>> >>>>>>
>>>>> >>>>>>
>>>>> >>>>>>
>>>>> >>>>>>
>>>>> >>>>>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>>>>> >>>>>>
>>>>> >>>>>> *Warning*
>>>>> >>>>>>
>>>>> >>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>> >>>>>>
>>>>> >>>>>> Hi All,
>>>>> >>>>>>
>>>>> >>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>> >>>>>> ways that it did not previously. I found this in a new project I was
>>>>> >>>>>> writing today, and also in an older project that I did a couple years
>>>>> >>>>>> ago on the web-ide
>>>>> >>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&reserved=0).
>>>>> >>>>>>
>>>>> >>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>> >>>>>> time with messages of:
>>>>> >>>>>>
>>>>> >>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>> >>>>>>
>>>>> >>>>>> I ran with a debugger and adding this code:
>>>>> >>>>>>
>>>>> >>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>> >>>>>>
>>>>> >>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>> >>>>>>
>>>>> >>>>>> PERFK:  | frq.10
>>>>> >>>>>>
>>>>> >>>>>> PERFK:  | frq.20
>>>>> >>>>>>
>>>>> >>>>>> PERFK:  | frq.30
>>>>> >>>>>>
>>>>> >>>>>> PERFK: frq.10 | frq.10
>>>>> >>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>> >>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>> >>>>>> note aborted
>>>>> >>>>>> [m
>>>>> >>>>>> PERFK: frq.20 | frq.20
>>>>> >>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>> >>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>> >>>>>> note aborted
>>>>> >>>>>> [m
>>>>> >>>>>> PERFK: frq.30 | frq.30
>>>>> >>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>> >>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>> >>>>>> note aborted
>>>>> >>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>> >>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>> >>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>> >>>>>> [mfrq.30 [m
>>>>> >>>>>> PERFK: frq.30 | frq.10
>>>>> >>>>>>
>>>>> >>>>>> PERFK: frq.20 | frq.20
>>>>> >>>>>>
>>>>> >>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>> >>>>>> lines into 6.17.
>>>>> >>>>>>
>>>>> >>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>> >>>>>> bisect session tomorrow to see about getting more info.
>>>>> >>>>>>
>>>>> >>>>>> Steven
>>>>> >>>>>> 
>>>>> >>>>>>
>>>>> >>>>>>
>>>>> >>>>>>

Date2022-05-05 09:15
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
ok, but just note that the version there is 6.18, not 6.17.x. 
Maybe that needs to be patched if you are releasing as 6.17.1 
Ideally a 6.17.1 would be from master as a hotfix (as we have done in the past).

> On 4 May 2022, at 18:20, Steven Yi  wrote:
> 
> The WebAudio csound package was being built from the csound6 branch so
> it picked up that issue, but it should be all good now.
> 
> On Wed, May 4, 2022 at 12:16 PM Victor Lazzarini  wrote:
>> 
>> Hang on, 6.17 did not have a channel issue. That was in 6.18, not sure what is going on there.
>> 
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>> On 4 May 2022, at 12:45, Hlöðver Sigurðsson  wrote:
>> 
>> 
>> the tests have been fixed and I publish an npm package
>> 
>> 6.17.1
>> which includes the channel fix, I pushed the fix (@csound/browser update) to web-ide as well
>> 
>> 
>> On Tue, 3 May 2022 at 19:04, Hlöðver Sigurðsson  wrote:
>>> 
>>> simply put, I broke the test myself, my apologies :D
>>> 
>>> On Tue, 3 May 2022 at 19:01, Hlöðver Sigurðsson  wrote:
>>>> 
>>>> it seems the plugin tests are failing, but I'm also seeing
>>>> 
>>>> ```
>>>> [browser] log: INIT ERROR in instr 1 (opcode chnset.S) line 10: channel already exists with incompatible type ```
>>>> 
>>>> On Mon, 2 May 2022 at 22:32, Iain Duncan  wrote:
>>>>> 
>>>>> Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.
>>>>> 
>>>>> iain
>>>>> 
>>>>> On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini  wrote:
>>>>>> 
>>>>>> yes, it looks like the issue might not arise at perf time.
>>>>>> 
>>>>>> Prof. Victor Lazzarini
>>>>>> Maynooth University
>>>>>> Ireland
>>>>>> 
>>>>>>> On 2 May 2022, at 17:05, Steven Yi  wrote:
>>>>>>> 
>>>>>>> Well the change I put in only modifies the perf-code, but the change
>>>>>>> for init-time is still there.
>>>>>>> 
>>>>>>>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini  wrote:
>>>>>>>> 
>>>>>>>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>>>>>>>> 
>>>>>>>> Prof. Victor Lazzarini
>>>>>>>> Maynooth University
>>>>>>>> Ireland
>>>>>>>> 
>>>>>>>>>> On 2 May 2022, at 02:00, Steven Yi  wrote:
>>>>>>>>> 
>>>>>>>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>>>>>>>> 
>>>>>>>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cc68731a968b747ee976408da2df26fbe%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637872817250910482%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CeYkc3SFjKi1VW6ALQcnk7%2BuFRvoASHIEOwEkgMGCOw%3D&reserved=0
>>>>>>>>> 
>>>>>>>>> and the fix I put in is here:
>>>>>>>>> 
>>>>>>>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cc68731a968b747ee976408da2df26fbe%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637872817250910482%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iaHo8Xl1lh4BrlUc8BpI2g%2FoVnWy3zB32qUdFLyUyCI%3D&reserved=0
>>>>>>>>> 
>>>>>>>>> There was a check if a channel name did not match the one for the
>>>>>>>>> channel that was allocated and, if not, try to allocate the new
>>>>>>>>> channel. However, the code in the first commit treated the valid path
>>>>>>>>> (channel name is a match) as an invalid channel name, which I believe
>>>>>>>>> is not what that code was meant to do.
>>>>>>>>> 
>>>>>>>>> Victor: could you review the commit to see if this changes anything
>>>>>>>>> for what your commit was addressing?
>>>>>>>>> 
>>>>>>>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini  wrote:
>>>>>>>>>> 
>>>>>>>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>>>>>>>> 
>>>>>>>>>> Prof. Victor Lazzarini
>>>>>>>>>> Maynooth University
>>>>>>>>>> Ireland
>>>>>>>>>> 
>>>>>>>>>>>> On 26 Apr 2022, at 21:40, Steven Yi  wrote:
>>>>>>>>>>> 
>>>>>>>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>>>>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>>>>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>>>>>>>> is being built from csound6 tag which threw me off (which is also
>>>>>>>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>>>>>>>> before we release the final 6.17.0 webaudio release.
>>>>>>>>>>> 
>>>>>>>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini  wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>>>>>>>> 
>>>>>>>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini  wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> I found that the attached project runs with
>>>>>>>>>>>> 
>>>>>>>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>>>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>>>>>>> 
>>>>>>>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>>>>>>>> 
>>>>>>>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini  wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>>>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>>>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>>>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>>>>>>>> audio buffered in 16 sample-frame blocks
>>>>>>>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>>>>>>>> SECTION 1:
>>>>>>>>>>>> instr 1: ivoice = 10.000
>>>>>>>>>>>> instr 1: ivoice = 20.000
>>>>>>>>>>>> instr 1: ivoice = 30.000
>>>>>>>>>>>> instr 2: ivoice = 10.000
>>>>>>>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>>>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>>>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>>>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>>>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>>>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>>>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>>>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>>>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>>>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>>>>>>>> overall samples out of range: 0 0
>>>>>>>>>>>> 0 errors in performance
>>>>>>>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> On 26 Apr 2022, at 09:38, Steven Yi  wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> *Warning*
>>>>>>>>>>>> 
>>>>>>>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>>>>>>> 
>>>>>>>>>>>> Hi All,
>>>>>>>>>>>> 
>>>>>>>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>>>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>>>>>>>> writing today, and also in an older project that I did a couple years
>>>>>>>>>>>> ago on the web-ide
>>>>>>>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7Cc68731a968b747ee976408da2df26fbe%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637872817250910482%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HFd2YF4G9jH9McLYhGZ%2BAOVDCIITxyEAh6LrDkAaNIw%3D&reserved=0).
>>>>>>>>>>>> 
>>>>>>>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>>>>>>>> time with messages of:
>>>>>>>>>>>> 
>>>>>>>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>>>>>>>> 
>>>>>>>>>>>> I ran with a debugger and adding this code:
>>>>>>>>>>>> 
>>>>>>>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>>>>>>>> 
>>>>>>>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>>>>>>>> 
>>>>>>>>>>>> PERFK:  | frq.10
>>>>>>>>>>>> 
>>>>>>>>>>>> PERFK:  | frq.20
>>>>>>>>>>>> 
>>>>>>>>>>>> PERFK:  | frq.30
>>>>>>>>>>>> 
>>>>>>>>>>>> PERFK: frq.10 | frq.10
>>>>>>>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>>>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>>>>>>>> note aborted
>>>>>>>>>>>> [m
>>>>>>>>>>>> PERFK: frq.20 | frq.20
>>>>>>>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>>>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>>>>>>>> note aborted
>>>>>>>>>>>> [m
>>>>>>>>>>>> PERFK: frq.30 | frq.30
>>>>>>>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>>>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>>>>>>>> note aborted
>>>>>>>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>>>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>>>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>>>>>>>> [mfrq.30 [m
>>>>>>>>>>>> PERFK: frq.30 | frq.10
>>>>>>>>>>>> 
>>>>>>>>>>>> PERFK: frq.20 | frq.20
>>>>>>>>>>>> 
>>>>>>>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>>>>>>>> lines into 6.17.
>>>>>>>>>>>> 
>>>>>>>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>>>>>>>> bisect session tomorrow to see about getting more info.
>>>>>>>>>>>> 
>>>>>>>>>>>> Steven
>>>>>>>>>>>> 
>>>>>>>>

Date2022-05-05 13:24
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] String bug and chnset
it would be good alright. Thanks.

On 2 May 2022, at 21:32, Iain Duncan <iainduncanlists@GMAIL.COM> wrote:

Don't know if this is helpful (or obvious) but that crash was surfaced from my code where I had it crashing on on empty channel name if a bad event message was sent in real time. I could find that code and test it again if that is helpful Victor.

iain

On Mon, May 2, 2022 at 9:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, it looks like the issue might not arise at perf time.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 2 May 2022, at 17:05, Steven Yi <stevenyi@gmail.com> wrote:
> 
> Well the change I put in only modifies the perf-code, but the change
> for init-time is still there.
> 
>> On Mon, May 2, 2022 at 11:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>> 
>> We just have to see if the crash happens still, I can't remember what this was but the commit message says it addresses a crash with empty channel names. As far as I can see you reverted the code so I suspect the crash is not being avoided now, but I can't remember any details right now.
>> 
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>>>> On 2 May 2022, at 02:00, Steven Yi <stevenyi@gmail.com> wrote:
>>> 
>>> I found the bug and pushed a commit. The bug was introduced in this commit:
>>> 
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2F512984db5dbb637fc53b3a50ff8480dbf715d6a1&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=uZ3cVQ2zOTOJ7196PGYm%2B9qQCxP6rPp9BG%2BMU5Y1cQ8%3D&amp;reserved=0
>>> 
>>> and the fix I put in is here:
>>> 
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fcommit%2Fccd82b9f21357c2913fff6ffe7b26d25ade11c65&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=NiMzQ4%2F004T07KMRhiFF4yzwlDm7%2F0KY%2Fy%2BrKLvxQdM%3D&amp;reserved=0
>>> 
>>> There was a check if a channel name did not match the one for the
>>> channel that was allocated and, if not, try to allocate the new
>>> channel. However, the code in the first commit treated the valid path
>>> (channel name is a match) as an invalid channel name, which I believe
>>> is not what that code was meant to do.
>>> 
>>> Victor: could you review the commit to see if this changes anything
>>> for what your commit was addressing?
>>> 
>>>> On Tue, Apr 26, 2022 at 6:06 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>> 
>>>> By the way the csound-wasm build in the csound6 branch appears to be broken. I noticed it a few weeks ago.
>>>> 
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>>>> On 26 Apr 2022, at 21:40, Steven Yi <stevenyi@gmail.com> wrote:
>>>>> 
>>>>> Yes, my mistake, I rolled back to 6.17.0 tag and it does indeed work
>>>>> for both projects. So whatever bug that has been introduced is just in
>>>>> dev versions. The one issue is that the latest webaudio Csound release
>>>>> is being built from csound6 tag which threw me off (which is also
>>>>> being used on the web-ide at the moment). We'll have to address this
>>>>> before we release the final 6.17.0 webaudio release.
>>>>> 
>>>>>> On Tue, Apr 26, 2022 at 2:23 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>> 
>>>>>> Also confirmed that 6.17.0 as in the current master also runs your code. So it looks like the regression happened post-release.
>>>>>> 
>>>>>> On 26 Apr 2022, at 17:00, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>> 
>>>>>> I found that the attached project runs with
>>>>>> 
>>>>>> --Csound version 6.17 (double samples) Feb  2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> 
>>>>>> but does not run with the current 6.18 code in the csound6 branch.
>>>>>> 
>>>>>> On 26 Apr 2022, at 11:42, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>>>>>> 
>>>>>> 
>>>>>> The glide.csd runs here with no problems, is that what you are seeing?
>>>>>> 
>>>>>> 
>>>>>> --Csound version 6.17 (double samples) Feb 2 2022
>>>>>> [commit: deff4f9aaeaf44f7db445c215f004bca8d50901f]
>>>>>> sr = 44100.0, kr = 689.062, ksmps = 64
>>>>>> 0dBFS level = 1.0, A4 tuning = 440.0
>>>>>> audio buffered in 16 sample-frame blocks
>>>>>> writing 32 sample blks of 64-bit floats to dac
>>>>>> SECTION 1:
>>>>>> instr 1: ivoice = 10.000
>>>>>> instr 1: ivoice = 20.000
>>>>>> instr 1: ivoice = 30.000
>>>>>> instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30instr 2: ivoice = 10.000
>>>>>> frq.10instr 2: ivoice = 20.000
>>>>>> frq.20instr 2: ivoice = 30.000
>>>>>> frq.30Score finished in csoundPerformKsmps() with 2.
>>>>>> end of score. overall amps: 0.92870 0.92870
>>>>>> overall samples out of range: 0 0
>>>>>> 0 errors in performance
>>>>>> 11052 32 sample blks of 64-bit floats written to dac
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 26 Apr 2022, at 09:38, Steven Yi <stevenyi@gmail.com> wrote:
>>>>>> 
>>>>>> *Warning*
>>>>>> 
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>> 
>>>>>> Hi All,
>>>>>> 
>>>>>> I noticed that using sprintf and chnset seems to be breaking now in
>>>>>> ways that it did not previously. I found this in a new project I was
>>>>>> writing today, and also in an older project that I did a couple years
>>>>>> ago on the web-ide
>>>>>> (https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fide.csound.com%2Feditor%2FJwG9QJNyCFmEv0nKshsU&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5feeb0e0359946c2e38608da2c555f58%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637871043033518218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wcaTmNBFkHPZ022SSfnFgqCioPPAn7IxdSQQhI6SN7w%3D&amp;reserved=0).
>>>>>> 
>>>>>> I've attached both projects. Both report errors with chnset.k at perf
>>>>>> time with messages of:
>>>>>> 
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40: invalid channel name
>>>>>> 
>>>>>> I ran with a debugger and adding this code:
>>>>>> 
>>>>>> printf("PERFK: %s | %s\n", p->chname, p->iname->data);
>>>>>> 
>>>>>> to line 1253 of OOps/bus.c, it shows some odd behavior with glide.csd such as:
>>>>>> 
>>>>>> PERFK:  | frq.10
>>>>>> 
>>>>>> PERFK:  | frq.20
>>>>>> 
>>>>>> PERFK:  | frq.30
>>>>>> 
>>>>>> PERFK: frq.10 | frq.10
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.20 | frq.20
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [m
>>>>>> PERFK: frq.30 | frq.30
>>>>>> PERF ERROR in instr 2 (opcode chnset.k) line 40:  [minvalid channel name [m
>>>>>> [m from file /Users/stevenyi/glide.csd (1), [m    chnset.k    kfrq    Schan
>>>>>> note aborted
>>>>>> [minstr 2: [m  ivoice = 10.000 [m
>>>>>> [mfrq.10 [minstr 2: [m  ivoice = 20.000 [m
>>>>>> [mfrq.20 [minstr 2: [m  ivoice = 30.000 [m
>>>>>> [mfrq.30 [m
>>>>>> PERFK: frq.30 | frq.10
>>>>>> 
>>>>>> PERFK: frq.20 | frq.20
>>>>>> 
>>>>>> This seems to have worked in csound 6.16 but broke somewhere along the
>>>>>> lines into 6.17.
>>>>>> 
>>>>>> Anyone have any ideas on what introduced this error now?  I'll try a
>>>>>> bisect session tomorrow to see about getting more info.
>>>>>> 
>>>>>> Steven
>>>>>> <project_prtintf_chnset_bug.zip><glide.csd>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>