Csound Csound-dev Csound-tekno Search About

[Cs-dev] bug with strtod in csoundqt

Date2013-08-15 21:59
Fromjoachim heintz
Subject[Cs-dev] bug with strtod in csoundqt
AttachmentsStrayNumToFt.csd  test.csd  None  None  
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the 
command line).

when i run a very simple csd with strtod in csoundqt, i get no output at 
all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

	joachim

Date2013-08-15 22:20
FromVictor Lazzarini
SubjectRe: [Cs-dev] bug with strtod in csoundqt
Here test.csd is running on both csound and csoundqt. Maybe the reason you are getting no output at all
is the "third tab" bug. Close all the other tabs, then run it again.

On 15 Aug 2013, at 21:59, joachim heintz wrote:

> hi -
> 
> i experience a somehow strange bug in csoundqt.
> 
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> 
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
> 
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
> 
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
> 
> best -
> 
> 	joachim
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead. 
> Download for free and get started troubleshooting in minutes. 
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-15 22:21
FromAndres Cabrera
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
Hi,

test.csd is working for me:

Csound version 6.00 (double samples) Jul 21 2013

graphics suppressed, ascii substituted

0dBFS level = 32768.0

orch now loaded

audio buffered in 256 sample-frame blocks

reading 512-byte blks of shorts from adc (RAW)

PortAudio V19-devel (built Oct 8 2012 16:37:35)

0: adc0 (HDA Intel PCH: ALC269VC Analog (hw:0,0))

1: adc1 (sysdefault)

2: adc2 (pulse)

3: adc3 (default)

PortAudio: selected input device 'default'

0: dac0 (HDA NVidia: HDMI 0 (hw:1,3))

1: dac1 (HDA NVidia: HDMI 1 (hw:1,7))

2: dac2 (HDA NVidia: HDMI 2 (hw:1,8))

3: dac3 (pulse)

4: dac4 (default)

PortAudio: selected output device 'default'

WARNING: buffer size should be an integer multiple of ksmps in full-duplex mode

writing 256 sample blks of 64-bit floats to dac

SECTION 1:

new alloc for instr 1:

1.100000

1.200000

B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0

Score finished in csoundPerformKsmps().

inactive allocs returned to freespace

end of score. overall amps: 0.0

overall samples out of range: 0

0 errors in performance

Elapsed time at end of performance: real: 1.071s, CPU: 0.650s

closing device

173 256 sample blks of 64-bit floats written to dac


The other csd is showing some init errors but seems mostly working:

PortAudio V19-devel (built Oct 8 2012 16:37:35)

0: adc0 (HDA Intel PCH: ALC269VC Analog (hw:0,0))

1: adc1 (sysdefault)

2: adc2 (pulse)

3: adc3 (default)

PortAudio: selected input device 'default'

0: dac0 (HDA NVidia: HDMI 0 (hw:1,3))

1: dac1 (HDA NVidia: HDMI 1 (hw:1,7))

2: dac2 (HDA NVidia: HDMI 2 (hw:1,8))

3: dac3 (pulse)

4: dac4 (default)

PortAudio: selected output device 'default'

WARNING: buffer size should be an integer multiple of ksmps in full-duplex mode

writing 256 sample blks of 64-bit floats to dac

SECTION 1:


Stray = '1 -2 3 4 5 6 7'


PostScript graphs written to file dac.eps


StrExpr1 = '1'

StrExpr1 = '-2'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ifirst strtod S1

StrExpr1 = '3'

StrExpr1 = '4'

StrExpr1 = '5'

StrExpr1 = '6'

StrExpr1 = '7'

ift# = 101, iftlen = 7

table content = [1.00000, -2.00000, 3.00000, 4.00000, 5.00000, 6.00000, 7.00000]

B 0.000 - note deleted. i1 had 1 init errors


Stray = '1.2 2+3.45 6.7/-8.09 '

StrExpr1 = '1.2'

StrExpr1 = '2+3.45'

StrExpr1 = '6.7/-8.09'

ift# = 102, iftlen = 3

table content = [1.20000, 5.45000, -0.82818, ]


Stray = ' 15%12 -5-3 '

StrExpr1 = '15%12'

StrExpr1 = '-5-3'

StrExpr1 = ''

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ires strtod Str

ift# = 103, iftlen = 3

table content = [3.00000, -8.00000, -8.00000, ]

B 0.020 - note deleted. i1 had 1 init errors


Stray = ' 2^0.6 2^(1/12) 2^(-1/12) 16 32'

StrExpr1 = '2^0.6'

StrExpr1 = '1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^inf'

StrExpr1 = '-1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^-inf'

StrExpr1 = '16'

StrExpr1 = '32'

ift# = 104, iftlen = 5

table content = [1.51572, inf, 0.00000, 16.00000, 32.00000, ]

B 0.030 - note deleted. i1 had 2 init errors


Stray = '123*-4.56 '

StrExpr1 = '123*-4.56'

StrExpr1 = ''

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ires strtod Str

ift# = 105, iftlen = 2

table content = [-560.88000, -560.88000, ]

B 0.040 - note deleted. i1 had 1 init errors


Stray = '123*(-4.56) '

StrExpr1 = '-4.56)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ifirst strtod S1

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

isec strtod S2

StrExpr1 = '123*0.000000'

StrExpr1 = ''

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ires strtod Str

ift# = 106, iftlen = 2

table content = [0.00000, 32.00000, ]

B 0.050 - note deleted. i1 had 3 init errors


Stray = ' '

StrExpr1 = ''

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ires strtod Str

ift# = 107, iftlen = 1

table content = [32.00000, ]

B 0.060 - note deleted. i1 had 1 init errors


Stray = ''

StrExpr1 = ''

INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string

ires strtod Str

ift# = 108, iftlen = 1

table content = [32.00000, ]

B 0.070 - note deleted. i1 had 1 init errors


Stray = '-(1+2.7)*-3 2^-(-1/-12) -(-3.10*-65)/-3.4567 27%5'

StrExpr1 = '1+2.7'

StrExpr1 = '-3.700000*-3'

StrExpr1 = '-1/-12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^-0.219298'

StrExpr1 = '-3.10*-65'

StrExpr1 = '-201.500000/-3.4567'

StrExpr1 = '27%5'

ift# = 109, iftlen = 4

table content = [11.10000, 0.85898, 58.29259, 2.00000, ]

B 0.080 - note deleted. i1 had 1 init errors


Stray = '1+2.7 2^(1/12) 3.10*65 27%5'

StrExpr1 = '1+2.7'

StrExpr1 = '1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^-4.560005'

StrExpr1 = '3.10*65'

StrExpr1 = '27%5'

ift# = 110, iftlen = 4

table content = [3.70000, 0.04239, 201.50000, 2.00000, ]

B 0.090 - note deleted. i1 had 1 init errors


Stray = '1+2.7 2^(1/12) 3.10*65 27%6'

StrExpr1 = '1+2.7'

StrExpr1 = '1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^-4.560005'

StrExpr1 = '3.10*65'

StrExpr1 = '27%6'

ift# = 13, iftlen = 4

table content = [3.70000, 0.04239, 201.50000, 3.00000, ]

B 0.100 - note deleted. i1 had 1 init errors


Stray = '1+2.7,2^(1/12),3.10*65,27%7'

StrExpr1 = '1+2.7'

StrExpr1 = '1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^-4.560005'

StrExpr1 = '3.10*65'

StrExpr1 = '27%7'

ift# = 111, iftlen = 4

table content = [3.70000, 0.04239, 201.50000, 6.00000, ]

B 0.110 - note deleted. i1 had 1 init errors


Stray = '1+2.7, 2^(1/12), 3.10*65, 27%8'

StrExpr1 = '1+2.7'

StrExpr1 = '1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = ' 2^-4.560005'

StrExpr1 = ' 3.10*65'

StrExpr1 = ' 27%8'

ift# = 112, iftlen = 4

table content = [3.70000, 0.04239, 201.50000, 3.00000, ]

B 0.120 - note deleted. i1 had 1 init errors


Stray = '1+2.7,2^(1/12)|3.10*65,27%9'

StrExpr1 = '1+2.7'

StrExpr1 = '1/12)'

INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

i2 strtod S2

StrExpr1 = '2^-4.560005'

StrExpr1 = '3.10*65'

StrExpr1 = '27%9'

ift# = 113, iftlen = 4

table content = [3.70000, 0.04239, 201.50000, 0.00000, ]

B 0.130 - note deleted. i1 had 1 init errors

Score finished in csoundPerformKsmps().

inactive allocs returned to freespace

end of score. overall amps: 0.0

overall samples out of range: 0

13 errors in performance

closing device

23 256 sample blks of 64-bit floats written to dac


Cheers,
Andrés


On Thu, Aug 15, 2013 at 1:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the command line).

when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

        joachim

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-15 22:26
FromVictor Lazzarini
SubjectRe: [Cs-dev] bug with strtod in csoundqt
I got StrayNumToFt.csd to work here, but I added a -d to it. I think there is something funny with
ASCII graphs (the default), valgrind is showing errors when using it. We will need to investigate that.

On 15 Aug 2013, at 21:59, joachim heintz wrote:

> hi -
> 
> i experience a somehow strange bug in csoundqt.
> 
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> 
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
> 
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
> 
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
> 
> best -
> 
> 	joachim
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead. 
> Download for free and get started troubleshooting in minutes. 
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-16 09:11
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
i tried this, but no change.


Am 15.08.2013 23:20, schrieb Victor Lazzarini:
> Here test.csd is running on both csound and csoundqt. Maybe the reason you are getting no output at all
> is the "third tab" bug. Close all the other tabs, then run it again.
>
> On 15 Aug 2013, at 21:59, joachim heintz wrote:
>
>> hi -
>>
>> i experience a somehow strange bug in csoundqt.
>>
>> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
>> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>
>> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>>
>> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>>
>> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>>
>> best -
>>
>> 	joachim
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-16 09:21
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
hi andrés -

is this osx? i see you are running another (earlier) csound version, too.

can you try to run the StrayNumToFt.csd in terminal (in csoundqt)? this 
is working perfectly for me, and i get no errors at all.

so i think it must either be an error in csoundqt, or an error in csound 
which affects a function in csoundqt.

ciao -

	joachim



Am 15.08.2013 23:21, schrieb Andres Cabrera:
> Hi,
>
> test.csd is working for me:
>
> Csound version 6.00 (double samples) Jul 21 2013
>
> graphics suppressed, ascii substituted
>
> 0dBFS level = 32768.0
>
> orch now loaded
>
> audio buffered in 256 sample-frame blocks
>
> reading 512-byte blks of shorts from adc (RAW)
>
> PortAudio V19-devel (built Oct 8 2012 16:37:35)
>
> 0: adc0 (HDA Intel PCH: ALC269VC Analog (hw:0,0))
>
> 1: adc1 (sysdefault)
>
> 2: adc2 (pulse)
>
> 3: adc3 (default)
>
> PortAudio: selected input device 'default'
>
> 0: dac0 (HDA NVidia: HDMI 0 (hw:1,3))
>
> 1: dac1 (HDA NVidia: HDMI 1 (hw:1,7))
>
> 2: dac2 (HDA NVidia: HDMI 2 (hw:1,8))
>
> 3: dac3 (pulse)
>
> 4: dac4 (default)
>
> PortAudio: selected output device 'default'
>
> WARNING: buffer size should be an integer multiple of ksmps in
> full-duplex mode
>
> writing 256 sample blks of 64-bit floats to dac
>
> SECTION 1:
>
> new alloc for instr 1:
>
> 1.100000
>
> 1.200000
>
> B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0
>
> Score finished in csoundPerformKsmps().
>
> inactive allocs returned to freespace
>
> end of score. overall amps: 0.0
>
> overall samples out of range: 0
>
> 0 errors in performance
>
> Elapsed time at end of performance: real: 1.071s, CPU: 0.650s
>
> closing device
>
> 173 256 sample blks of 64-bit floats written to dac
>
>
> The other csd is showing some init errors but seems mostly working:
>
> PortAudio V19-devel (built Oct 8 2012 16:37:35)
>
> 0: adc0 (HDA Intel PCH: ALC269VC Analog (hw:0,0))
>
> 1: adc1 (sysdefault)
>
> 2: adc2 (pulse)
>
> 3: adc3 (default)
>
> PortAudio: selected input device 'default'
>
> 0: dac0 (HDA NVidia: HDMI 0 (hw:1,3))
>
> 1: dac1 (HDA NVidia: HDMI 1 (hw:1,7))
>
> 2: dac2 (HDA NVidia: HDMI 2 (hw:1,8))
>
> 3: dac3 (pulse)
>
> 4: dac4 (default)
>
> PortAudio: selected output device 'default'
>
> WARNING: buffer size should be an integer multiple of ksmps in
> full-duplex mode
>
> writing 256 sample blks of 64-bit floats to dac
>
> SECTION 1:
>
>
> Stray = '1 -2 3 4 5 6 7'
>
>
> PostScript graphs written to file dac.eps
>
>
> StrExpr1 = '1'
>
> StrExpr1 = '-2'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ifirst strtod S1
>
> StrExpr1 = '3'
>
> StrExpr1 = '4'
>
> StrExpr1 = '5'
>
> StrExpr1 = '6'
>
> StrExpr1 = '7'
>
> ift# = 101, iftlen = 7
>
> table content = [1.00000, -2.00000, 3.00000, 4.00000, 5.00000, 6.00000,
> 7.00000]
>
> B 0.000 - note deleted. i1 had 1 init errors
>
>
> Stray = '1.2 2+3.45 6.7/-8.09 '
>
> StrExpr1 = '1.2'
>
> StrExpr1 = '2+3.45'
>
> StrExpr1 = '6.7/-8.09'
>
> ift# = 102, iftlen = 3
>
> table content = [1.20000, 5.45000, -0.82818, ]
>
>
> Stray = ' 15%12 -5-3 '
>
> StrExpr1 = '15%12'
>
> StrExpr1 = '-5-3'
>
> StrExpr1 = ''
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ires strtod Str
>
> ift# = 103, iftlen = 3
>
> table content = [3.00000, -8.00000, -8.00000, ]
>
> B 0.020 - note deleted. i1 had 1 init errors
>
>
> Stray = ' 2^0.6 2^(1/12) 2^(-1/12) 16 32'
>
> StrExpr1 = '2^0.6'
>
> StrExpr1 = '1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^inf'
>
> StrExpr1 = '-1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^-inf'
>
> StrExpr1 = '16'
>
> StrExpr1 = '32'
>
> ift# = 104, iftlen = 5
>
> table content = [1.51572, inf, 0.00000, 16.00000, 32.00000, ]
>
> B 0.030 - note deleted. i1 had 2 init errors
>
>
> Stray = '123*-4.56 '
>
> StrExpr1 = '123*-4.56'
>
> StrExpr1 = ''
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ires strtod Str
>
> ift# = 105, iftlen = 2
>
> table content = [-560.88000, -560.88000, ]
>
> B 0.040 - note deleted. i1 had 1 init errors
>
>
> Stray = '123*(-4.56) '
>
> StrExpr1 = '-4.56)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ifirst strtod S1
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> isec strtod S2
>
> StrExpr1 = '123*0.000000'
>
> StrExpr1 = ''
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ires strtod Str
>
> ift# = 106, iftlen = 2
>
> table content = [0.00000, 32.00000, ]
>
> B 0.050 - note deleted. i1 had 3 init errors
>
>
> Stray = ' '
>
> StrExpr1 = ''
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ires strtod Str
>
> ift# = 107, iftlen = 1
>
> table content = [32.00000, ]
>
> B 0.060 - note deleted. i1 had 1 init errors
>
>
> Stray = ''
>
> StrExpr1 = ''
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: empty string
>
> ires strtod Str
>
> ift# = 108, iftlen = 1
>
> table content = [32.00000, ]
>
> B 0.070 - note deleted. i1 had 1 init errors
>
>
> Stray = '-(1+2.7)*-3 2^-(-1/-12) -(-3.10*-65)/-3.4567 27%5'
>
> StrExpr1 = '1+2.7'
>
> StrExpr1 = '-3.700000*-3'
>
> StrExpr1 = '-1/-12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^-0.219298'
>
> StrExpr1 = '-3.10*-65'
>
> StrExpr1 = '-201.500000/-3.4567'
>
> StrExpr1 = '27%5'
>
> ift# = 109, iftlen = 4
>
> table content = [11.10000, 0.85898, 58.29259, 2.00000, ]
>
> B 0.080 - note deleted. i1 had 1 init errors
>
>
> Stray = '1+2.7 2^(1/12) 3.10*65 27%5'
>
> StrExpr1 = '1+2.7'
>
> StrExpr1 = '1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^-4.560005'
>
> StrExpr1 = '3.10*65'
>
> StrExpr1 = '27%5'
>
> ift# = 110, iftlen = 4
>
> table content = [3.70000, 0.04239, 201.50000, 2.00000, ]
>
> B 0.090 - note deleted. i1 had 1 init errors
>
>
> Stray = '1+2.7 2^(1/12) 3.10*65 27%6'
>
> StrExpr1 = '1+2.7'
>
> StrExpr1 = '1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^-4.560005'
>
> StrExpr1 = '3.10*65'
>
> StrExpr1 = '27%6'
>
> ift# = 13, iftlen = 4
>
> table content = [3.70000, 0.04239, 201.50000, 3.00000, ]
>
> B 0.100 - note deleted. i1 had 1 init errors
>
>
> Stray = '1+2.7,2^(1/12),3.10*65,27%7'
>
> StrExpr1 = '1+2.7'
>
> StrExpr1 = '1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^-4.560005'
>
> StrExpr1 = '3.10*65'
>
> StrExpr1 = '27%7'
>
> ift# = 111, iftlen = 4
>
> table content = [3.70000, 0.04239, 201.50000, 6.00000, ]
>
> B 0.110 - note deleted. i1 had 1 init errors
>
>
> Stray = '1+2.7, 2^(1/12), 3.10*65, 27%8'
>
> StrExpr1 = '1+2.7'
>
> StrExpr1 = '1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = ' 2^-4.560005'
>
> StrExpr1 = ' 3.10*65'
>
> StrExpr1 = ' 27%8'
>
> ift# = 112, iftlen = 4
>
> table content = [3.70000, 0.04239, 201.50000, 3.00000, ]
>
> B 0.120 - note deleted. i1 had 1 init errors
>
>
> Stray = '1+2.7,2^(1/12)|3.10*65,27%9'
>
> StrExpr1 = '1+2.7'
>
> StrExpr1 = '1/12)'
>
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> i2 strtod S2
>
> StrExpr1 = '2^-4.560005'
>
> StrExpr1 = '3.10*65'
>
> StrExpr1 = '27%9'
>
> ift# = 113, iftlen = 4
>
> table content = [3.70000, 0.04239, 201.50000, 0.00000, ]
>
> B 0.130 - note deleted. i1 had 1 init errors
>
> Score finished in csoundPerformKsmps().
>
> inactive allocs returned to freespace
>
> end of score. overall amps: 0.0
>
> overall samples out of range: 0
>
> 13 errors in performance
>
> closing device
>
> 23 256 sample blks of 64-bit floats written to dac
>
>
> Cheers,
> Andrés
>
>
> On Thu, Aug 15, 2013 at 1:59 PM, joachim heintz  > wrote:
>
>     hi -
>
>     i experience a somehow strange bug in csoundqt.
>
>     when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
>     when i run the same file as RUN IN TERM, it is fine (same from the
>     command line).
>
>     when i run a very simple csd with strtod in csoundqt, i get no
>     output at all (again no problem in "run in term").
>
>     this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
>     best -
>
>              joachim
>
>     ------------------------------------------------------------------------------
>     Get 100% visibility into Java/.NET code with AppDynamics Lite!
>     It's a free troubleshooting tool designed for production.
>     Get down to code-level detail for bottlenecks, with <2% overhead.
>     Download for free and get started troubleshooting in minutes.
>     http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>     _______________________________________________
>     Csound-devel mailing list
>     Csound-devel@lists.sourceforge.net
>     
>     https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sou

Date2013-08-16 09:22
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
no change with this for me, unfortunately.


Am 15.08.2013 23:26, schrieb Victor Lazzarini:
> I got StrayNumToFt.csd to work here, but I added a -d to it. I think there is something funny with
> ASCII graphs (the default), valgrind is showing errors when using it. We will need to investigate that.
>
> On 15 Aug 2013, at 21:59, joachim heintz wrote:
>
>> hi -
>>
>> i experience a somehow strange bug in csoundqt.
>>
>> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
>> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>
>> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>>
>> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>>
>> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>>
>> best -
>>
>> 	joachim
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-16 11:13
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.

Did anyone try an empty csd?

If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.

CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.

I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.



Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the command line).

when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

        joachim

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-16 12:05
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6688.0x1590]
0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x7751bf39 in ?? ()
#9  0x7751bf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)



===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.

Did anyone try an empty csd?

If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.

CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.

I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.



Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the command line).

when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

        joachim

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




Date2013-08-16 12:07
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
There are also lots of warnings about missing signals for slots in Qt. And missing properties. 

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6688.0x1590]
0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x7751bf39 in ?? ()
#9  0x7751bf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)



===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.

Did anyone try an empty csd?

If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.

CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.

I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.



Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the command line).

when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

        joachim

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel





Date2013-08-16 12:12
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.

Regards,
Mike




===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
There are also lots of warnings about missing signals for slots in Qt. And missing properties. 

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6688.0x1590]
0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x7751bf39 in ?? ()
#9  0x7751bf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)



===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.

Did anyone try an empty csd?

If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.

CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.

I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.



Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the command line).

when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

        joachim

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel






Date2013-08-16 12:29
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.

Program received signal SIGSEGV, Segmentation fault.
0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
    at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
1481        opcodeName = root->value->lexeme;
(gdb) bt
#0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
    at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
#1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
    at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
#2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
#3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
#4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
    at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
#5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
#6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
#7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
#8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
#9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
#10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
#11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
#12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
#13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
#14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
#15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
#16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
#17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
#18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
#19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
#20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
#21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
#22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
#23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
#24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
#25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
#26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
#27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
#28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
    buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
#29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
#30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
#31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
#32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
#33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
#34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
#35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
#36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
#37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
#38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
#39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
#40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
#41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
#42 0x003b040e in ?? ()
#43 0x00000401 in ?? ()
#44 0x00000000 in ?? ()
(gdb)



===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.

Regards,
Mike




===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
There are also lots of warnings about missing signals for slots in Qt. And missing properties. 

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6688.0x1590]
0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x7751bf39 in ?? ()
#9  0x7751bf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)



===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.

Did anyone try an empty csd?

If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.

CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.

I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.



Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi -

i experience a somehow strange bug in csoundqt.

when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format

when i run the same file as RUN IN TERM, it is fine (same from the command line).

when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").

this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.

best -

        joachim

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel







Date2013-08-16 12:31
FromVictor Lazzarini
SubjectRe: [Cs-dev] bug with strtod in csoundqt
On OSX 10.6, I am also getting a crash with StrayToNum.csd. Here's the gdb backtrace

Reason: KERN_INVALID_ADDRESS at address: 0x000000018f54d668
[Switching to process 27246 thread 0x6103]
0x0000000103dd35dd in QTextLine::layout_helper ()
(gdb) bt
#0  0x0000000103dd35dd in QTextLine::layout_helper ()
#1  0x0000000103e155bd in QAbstractTextDocumentLayout::anchorAt ()
#2  0x0000000103e1ba9b in QAbstractTextDocumentLayout::anchorAt ()
#3  0x0000000103e1955a in QAbstractTextDocumentLayout::anchorAt ()
#4  0x0000000103e19b55 in QAbstractTextDocumentLayout::anchorAt ()
#5  0x0000000103e19dbc in QAbstractTextDocumentLayout::anchorAt ()
#6  0x0000000103e1a607 in QAbstractTextDocumentLayout::anchorAt ()
#7  0x0000000103df9f7b in QTextDocument::toHtml ()
#8  0x0000000103e26a58 in QTextCursor::insertText ()
#9  0x0000000103e26d54 in QTextCursor::insertText ()
#10 0x000000010002dbee in Console::appendMessage ()
#11 0x0000000100032b54 in CsoundEngine::flushQueues ()
#12 0x0000000100032d19 in CsoundEngine::cleanupCsound ()
#13 0x0000000100033a15 in CsoundEngine::stopCsound ()
#14 0x000000010003633c in CsoundEngine::messageListDispatcher ()
#15 0x00000001000383b9 in QtConcurrent::RunFunctionTask::run ()
#16 0x0000000104705e4b in QThreadPool::globalInstance ()
#17 0x0000000104713904 in QThread::setPriority ()
#18 0x00007fff82a11fd6 in _pthread_start ()
#19 0x00007fff82a11e89 in thread_start ()


On 16 Aug 2013, at 11:13, Michael Gogins wrote:

> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
> 
> Did anyone try an empty csd?
> 
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
> 
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
> 
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
> 
> 
> 
> Regards,
> Mike
> 
> 
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz  wrote:
> hi -
> 
> i experience a somehow strange bug in csoundqt.
> 
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> 
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
> 
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
> 
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
> 
> best -
> 
>         joachim
> 
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead. 
> Download for free and get started troubleshooting in minutes. 
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-16 12:32
FromVictor Lazzarini
SubjectRe: [Cs-dev] bug with strtod in csoundqt
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 , lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
> 
> 
> 
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins  wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
> 
> Regards,
> Mike
> 
> 
> 
> 
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins  wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties. 
> 
> Regards,
> Mike
> 
> 
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins  wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
> 
> 
> 
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins  wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
> 
> Did anyone try an empty csd?
> 
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
> 
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
> 
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
> 
> 
> 
> Regards,
> Mike
> 
> 
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz  wrote:
> hi -
> 
> i experience a somehow strange bug in csoundqt.
> 
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> 
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
> 
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
> 
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
> 
> best -
> 
>         joachim
> 
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead. 
> Download for free and get started troubleshooting in minutes. 
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-16 13:52
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-17 01:49
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 05:38
FromAndres Cabrera
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 11:01
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I do not pull this test. Is it in the develop branch?

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 11:30
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I copied csperfthread.exe to my other PC here and it ran. The exact same binary crashes on this PC. If I install Csound on this PC and restrict the PATH to just the installed Csound bin dir it still crashes though Csound itself runs fine.


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 6:01 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I do not pull this test. Is it in the develop branch?

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




Date2013-08-17 17:43
FromAndres Cabrera
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
Hi,

Sorry, had not pushed. It's there now. It's nearly the same example you posted.

Cheers,
Andrés


On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I do not pull this test. Is it in the develop branch?

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 18:31
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
Here's what it does (exactly the same thing as with my example):

$ gdb tests/c/testPerfThread.exe
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
For bug reporting instructions, please see:
Reading symbols from c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
(gdb) run
Starting program: c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
[New Thread 3892.0x20]


     CUnit - A unit testing framework for C - Version 2.1-2


Suite: perfthread tests
  Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.00.1 (double samples) Aug 16 2013
libsndfile-1.0.25
rtaudio: PortAudio module enabled ...
using callback interface
rtmidi: PortMIDI module enabled
Csound version 6.00.1 (double samples) Aug 16 2013
graphics suppressed, ascii substituted
0dBFS level = 32768.0
orch now loaded
audio buffered in 4096 sample-frame blocks
[New Thread 3892.0x78c]
[New Thread 3892.0xe24]
[New Thread 3892.0xf28]
[New Thread 3892.0x460]
[New Thread 3892.0x1258]
[New Thread 3892.0x14a0]
[New Thread 3892.0xcdc]
warning: FFUsb2Asio::FFUsb2Asio()

warning: FFUsb2Asio::init()

warning: FFUsb2Asio::init() : no available filters found
warning:

warning: +FFUsb2Asio::~FFUsb2Asio()

warning: FFUsb2Asio::stop()

warning: FFUsb2Asio::disposeBuffers()

warning: -FFUsb2Asio::~FFUsb2Asio()

warning: FFUsb2Asio::FFUsb2Asio()

PortAudio V19-devel (built Jul 31 2013 12:17:21)
   0: dac0 (Microsoft Sound Mapper - Output)
   1: dac1 (Speakers (EDIROL UA-25EX))
   2: dac2 (Speakers (VIA High Definition A)
   3: dac3 (SPDIF Interface (TX0) (VIA High)
   4: dac4 (Primary Sound Driver)
   5: dac5 (Speakers (EDIROL UA-25EX))
   6: dac6 (Speakers (VIA High Definition Audio))
   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
[New Thread 3892.0x1600]
[New Thread 3892.0x1764]
[New Thread 3892.0x1378]
writing 4096 sample blks of 64-bit floats to dac
SECTION 1:
[New Thread 3892.0x11e8]
new alloc for instr 1:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3892.0x11e8]
0x6c51ff83 in spoutsf (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x7710850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x778bbf39 in ?? ()
#9  0x778bbf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)





===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

Sorry, had not pushed. It's there now. It's nearly the same example you posted.

Cheers,
Andrés


On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I do not pull this test. Is it in the develop branch?

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 19:32
FromAndres Cabrera
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
OK, so it's a perfThread issue then. Can you run it with valgrind?

Cheers,
Andrés


On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Here's what it does (exactly the same thing as with my example):

$ gdb tests/c/testPerfThread.exe
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
For bug reporting instructions, please see:
Reading symbols from c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
(gdb) run
Starting program: c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
[New Thread 3892.0x20]


     CUnit - A unit testing framework for C - Version 2.1-2


Suite: perfthread tests
  Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.00.1 (double samples) Aug 16 2013
libsndfile-1.0.25
rtaudio: PortAudio module enabled ...
using callback interface
rtmidi: PortMIDI module enabled
Csound version 6.00.1 (double samples) Aug 16 2013
graphics suppressed, ascii substituted
0dBFS level = 32768.0
orch now loaded
audio buffered in 4096 sample-frame blocks
[New Thread 3892.0x78c]
[New Thread 3892.0xe24]
[New Thread 3892.0xf28]
[New Thread 3892.0x460]
[New Thread 3892.0x1258]
[New Thread 3892.0x14a0]
[New Thread 3892.0xcdc]
warning: FFUsb2Asio::FFUsb2Asio()

warning: FFUsb2Asio::init()

warning: FFUsb2Asio::init() : no available filters found
warning:

warning: +FFUsb2Asio::~FFUsb2Asio()

warning: FFUsb2Asio::stop()

warning: FFUsb2Asio::disposeBuffers()

warning: -FFUsb2Asio::~FFUsb2Asio()

warning: FFUsb2Asio::FFUsb2Asio()

PortAudio V19-devel (built Jul 31 2013 12:17:21)
   0: dac0 (Microsoft Sound Mapper - Output)
   1: dac1 (Speakers (EDIROL UA-25EX))
   2: dac2 (Speakers (VIA High Definition A)
   3: dac3 (SPDIF Interface (TX0) (VIA High)
   4: dac4 (Primary Sound Driver)
   5: dac5 (Speakers (EDIROL UA-25EX))
   6: dac6 (Speakers (VIA High Definition Audio))
   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
[New Thread 3892.0x1600]
[New Thread 3892.0x1764]
[New Thread 3892.0x1378]
writing 4096 sample blks of 64-bit floats to dac
SECTION 1:
[New Thread 3892.0x11e8]
new alloc for instr 1:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3892.0x11e8]
0x6c51ff83 in spoutsf (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x7710850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x778bbf39 in ?? ()
#9  0x778bbf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)





===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

Sorry, had not pushed. It's there now. It's nearly the same example you posted.

Cheers,
Andrés


On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I do not pull this test. Is it in the develop branch?

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 19:46
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
At the moment I have no access to a Linux computer, so I cannot use valgrind. Can you try it on Windows?

Regards,
Mike




===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
OK, so it's a perfThread issue then. Can you run it with valgrind?

Cheers,
Andrés


On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Here's what it does (exactly the same thing as with my example):

$ gdb tests/c/testPerfThread.exe
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
For bug reporting instructions, please see:
Reading symbols from c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
(gdb) run
Starting program: c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
[New Thread 3892.0x20]


     CUnit - A unit testing framework for C - Version 2.1-2


Suite: perfthread tests
  Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.00.1 (double samples) Aug 16 2013
libsndfile-1.0.25
rtaudio: PortAudio module enabled ...
using callback interface
rtmidi: PortMIDI module enabled
Csound version 6.00.1 (double samples) Aug 16 2013
graphics suppressed, ascii substituted
0dBFS level = 32768.0
orch now loaded
audio buffered in 4096 sample-frame blocks
[New Thread 3892.0x78c]
[New Thread 3892.0xe24]
[New Thread 3892.0xf28]
[New Thread 3892.0x460]
[New Thread 3892.0x1258]
[New Thread 3892.0x14a0]
[New Thread 3892.0xcdc]
warning: FFUsb2Asio::FFUsb2Asio()

warning: FFUsb2Asio::init()

warning: FFUsb2Asio::init() : no available filters found
warning:

warning: +FFUsb2Asio::~FFUsb2Asio()

warning: FFUsb2Asio::stop()

warning: FFUsb2Asio::disposeBuffers()

warning: -FFUsb2Asio::~FFUsb2Asio()

warning: FFUsb2Asio::FFUsb2Asio()

PortAudio V19-devel (built Jul 31 2013 12:17:21)
   0: dac0 (Microsoft Sound Mapper - Output)
   1: dac1 (Speakers (EDIROL UA-25EX))
   2: dac2 (Speakers (VIA High Definition A)
   3: dac3 (SPDIF Interface (TX0) (VIA High)
   4: dac4 (Primary Sound Driver)
   5: dac5 (Speakers (EDIROL UA-25EX))
   6: dac6 (Speakers (VIA High Definition Audio))
   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
[New Thread 3892.0x1600]
[New Thread 3892.0x1764]
[New Thread 3892.0x1378]
writing 4096 sample blks of 64-bit floats to dac
SECTION 1:
[New Thread 3892.0x11e8]
new alloc for instr 1:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3892.0x11e8]
0x6c51ff83 in spoutsf (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
106     }
(gdb) bt
#0  0x6c51ff83 in spoutsf (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
#1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
#2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
#3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
#4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
#5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
#6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
#7  0x7710850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
#8  0x778bbf39 in ?? ()
#9  0x778bbf0c in ?? ()
#10 0x00000000 in ?? ()
(gdb)





===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

Sorry, had not pushed. It's there now. It's nearly the same example you posted.

Cheers,
Andrés


On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I do not pull this test. Is it in the develop branch?

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi,

I've added a test in the tests directory for the performance thread, and it seems OK there. Although there are some issues reported by valgrind, I don't think these are the ones causing the reported problem.

src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
==14507== Memcheck, a memory error detector
==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14507== Command: ./testPerfThread
==14507==


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: perfthread tests
  Test: Test Performance Thread ...
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Use of uninitialised value of size 8
==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
==14507== Conditional jump or move depends on uninitialised value(s)
==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
==14507==    by 0x4FCF656: csoundDefaultMessageCallback (csound.c:1917)
==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
==14507==    by 0x50A7024: print_tree_xml (csound_orc_semantics.c:2230)
==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
==14507==    by 0x50B010C: csoundCompileOrc (csound_orc_compile.c:1649)
==14507==    by 0x406A3A: Csound::CompileOrc(char const*) (csound.hpp:189)
==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
==14507==
passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        1       1     n/a       0
               tests         1       1       1       0
               asserts       0       0       0       0
==14507==
==14507== HEAP SUMMARY:
==14507==     in use at exit: 119,800 bytes in 1,877 blocks
==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156 bytes allocated
==14507==
==14507== LEAK SUMMARY:
==14507==    definitely lost: 807 bytes in 9 blocks
==14507==    indirectly lost: 26,097 bytes in 386 blocks
==14507==      possibly lost: 42,993 bytes in 1,313 blocks
==14507==    still reachable: 49,903 bytes in 169 blocks
==14507==         suppressed: 0 bytes in 0 blocks
==14507== Rerun with --leak-check=full to see details of leaked memory
==14507==
==14507== For counts of detected and suppressed errors, rerun with: -v
==14507== Use --track-origins=yes to see where uninitialised values come from
==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2 from 2)

Cheers,
Andrés



On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
There definitely appears to be a bug in CsoundPerformanceThread. The following program exhibits it on my PC. I see thge exact same stack trace in CsoundQt and in a Lua version of this program.

#include "csound.hpp"
#include "csPerfThread.hpp"

int useThreads = true;

int main(int argc, char *argv[])
{
    Csound csound;
    csound.Compile(argc,argv);
    csound.Start();
    if (useThreads) {
        CsoundPerformanceThread performanceThread(csound.GetCsound());
        performanceThread.Play(); 
        performanceThread.Join();  
    } else {
        while (csound.PerformKsmps() == 0) {}
    }
 }

Note that execution is perfect if useThreads is set to false.

The debugger output is:

 gdb --args csperfthread.exe ../trapped.csd
NU gdb (GDB) 7.6
opyright (C) 2013 Free Software Foundation, Inc.
icense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
his is free software: you are free to change and redistribute it.
here is NO WARRANTY, to the extent permitted by law.  Type "show copying"
nd "show warranty" for details.
his GDB was configured as "i686-w64-mingw32".
or bug reporting instructions, please see:
eading symbols from c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
gdb) run
tarting program: c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe ../trapped.csd
New Thread 3552.0xea0]
irtual_keyboard real time MIDI plugin for Csound
dBFS level = 32768.0
sound version 6.00.1 (double samples) Aug 16 2013
ibsndfile-1.0.25
nifiedCSD:  ../trapped.csd
TARTING FILE
reating options
reating orchestra
reating score
taudio: PortAudio module enabled ...
sing callback interface
tmidi: PortMIDI module enabled
lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
orting score ...
       ... done
lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
sound version 6.00.1 (double samples) Aug 16 2013
isplays suppressed
dBFS level = 32768.0
rch now loaded
udio buffered in 4096 sample-frame blocks
riting 16384-byte blks of shorts to test.wav (WAV)
ECTION 1:
sound is already started, call csoundReset()
efore starting again
New Thread 3552.0x19fc]
table 1:
table 2:
table 3:
table 4:
table 5:
table 6:
table 7:
table 8:
table 9:
table 10:
table 11:
table 12:
table 13:
table 14:
table 15:
table 16:
table 17:
table 18:
table 19:
table 20:
table 21:
table 22:
ew alloc for instr 1:
ew alloc for instr 100:

rogram received signal SIGSEGV, Segmentation fault.
Switching to Thread 3552.0x19fc]
x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
06     }
gdb) bt
0  0x6c51ff83 in spoutsf (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
8  0x7751bf39 in ?? ()
9  0x7751bf0c in ?? ()
10 0x00000000 in ?? ()
gdb)


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I see that this is happening when CsoundEngine cleans up csound, stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist when CsoundQt wants to reference it?


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
CsoundPerformanceThread is working perfectly from Python.
On 16 Aug 2013, at 12:29, Michael Gogins wrote:

> However, this backtrace seems to rule out CsoundPerformanceThread since this crash happens before the thread is created. This implies a bad write by CsoundQt itself.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> 1481        opcodeName = root->value->lexeme;
> (gdb) bt
> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70, root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0) at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
> #4  0x6c5d5985 in csoundCompileArgs (csound=csound@entry=0x17676a70, argc=4, argc@entry=5, argv=argv@entry=0x19bd2c18)
>     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5, argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at src/csoundengine.cpp:779
> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188, options=0x1760ae70) at src/csoundengine.cpp:618
> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0, options=0x1760ae70) at src/basedocument.cpp:234
> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0, options=0x1760ae70) at src/documentpage.cpp:1203
> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true, index=4) at src/qutecsound.cpp:1387
> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at build/moc/moc_qutecsound.cpp:441
> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138, signalOffset=3, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3479
> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138, m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at kernel\qobject.cpp:3354
> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true) at .moc/debug_shared/moc_qaction.cpp:356
> #15 0x0d933c4e in QAction::activate (this=0x1763f138, event=QAction::Trigger) at kernel\qaction.cpp:1175
> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at kernel/qaction.h:185
> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698) at widgets\qtoolbutton.cpp:948
> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8) at widgets\qabstractbutton.cpp:522
> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698, event=0x28d1d0) at kernel\qwidget.cpp:7877
> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698, event=0x28d1d0) at widgets\qtoolbutton.cpp:964
> #24 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:3455
> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c, receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
> #26 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at kernel\qcoreapplication.cpp:871
> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent (receiver=0x1773c698, event=0x28d1d0)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698, nativeWidget=0x2e3b9b8,
>     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel\qapplication.cpp:2485
> #29 0x0d984219 in QWidgetWindow::handleMouseEvent (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:158
> #31 0x0d93db21 in QApplicationPrivate::notify_helper (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:3455
> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c, receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
> #33 0x031d9dce in QCoreApplication::notifyInternal (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at kernel\qcoreapplication.cpp:871
> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent (receiver=0x176391d0, event=0x28d920)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
> #36 0x06849c5d in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at kernel\qguiapplication.cpp:1262
> #37 0x06840790 in QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at kernel\qwindowsysteminterface.cpp:581
> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel\qwindowsysteminterface.cpp:561
> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025, wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
> #41 0x761c77d8 in gapfnScSendMessage () from C:\Windows\SysWOW64\user32.dll
> #42 0x003b040e in ?? ()
> #43 0x00000401 in ?? ()
> #44 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> To rule out or in CsoundPerformanceThread, I will write a short C++ test program that uses it and run it with various csds. But I won't have time to do this until tonight.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There are also lots of warnings about missing signals for slots in Qt. And missing properties.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I've been seeing this for a day or so now, running CsoundQt with a variety of files, this with your test.cd:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 6688.0x1590]
> 0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> 106     }
> (gdb) bt
> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x1922de30) at c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
> #4  0x649458cb in pthread_create_wrapper () from c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
> #6  0x77349147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from C:\Windows\SysWOW64\kernel32.dll
> #8  0x7751bf39 in ?? ()
> #9  0x7751bf0c in ?? ()
> #10 0x00000000 in ?? ()
> (gdb)
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I have just run this with head code for both Csound and CsoundQt. All is good with rendering with plain Csound. In CsoundQt all is good with rendering in the terminal. If I render to file in CsoundQt, it works once for each file, then hangs or crashes CsoundQt. If I render to audio in CsoundQt, it hangs or crashes the first time.
>
> Did anyone try an empty csd?
>
> If I run an empty csd in CsoundQt and render to terminal, all is fine. If I render to file in CsoundQt or render to audio in CsoundQt with an empty file, it hangs.
>
> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's CsoundEngine are places to look for trouble.
>
> I think it's pretty clear from this behavior across platforms that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious bug not specific to Windows. Behavior various however from machine to machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are corrupting Csound variables.
>
>
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz <jh@joachimheintz.de> wrote:
> hi -
>
> i experience a somehow strange bug in csoundqt.
>
> when i run StrayNumToFt.csd via the PLAY button, i get lots of errors:
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>
> when i run the same file as RUN IN TERM, it is fine (same from the command line).
>
> when i run a very simple csd with strtod in csoundqt, i get no output at all (again no problem in "run in term").
>
> this is with csound6 and csoundqt both from git, on ubuntu studio 12.04.
>
> best -
>
>         joachim
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-08-17 20:26
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
Hi Michael,

I'm wondering, could you try a build with "-DUSE_ATOMIC_BUILTIN=0"?  I
just added that flag, and I'm wondering if that was not used at all on
Windows previously and now it might be and causing problems.  Also,
perhaps a longshot, maybe double check that any custom flags in
Custom.cmake are applied to both CMAKE_C_FLAGS as well as
CMAKE_CXX_FLAGS.

steven

On Sat, Aug 17, 2013 at 2:46 PM, Michael Gogins
 wrote:
> At the moment I have no access to a Linux computer, so I cannot use
> valgrind. Can you try it on Windows?
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera 
> wrote:
>>
>> OK, so it's a perfThread issue then. Can you run it with valgrind?
>>
>> Cheers,
>> Andrés
>>
>>
>> On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins
>>  wrote:
>>>
>>> Here's what it does (exactly the same thing as with my example):
>>>
>>> $ gdb tests/c/testPerfThread.exe
>>> GNU gdb (GDB) 7.6
>>> Copyright (C) 2013 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later
>>> 
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>> copying"
>>> and "show warranty" for details.
>>> This GDB was configured as "i686-w64-mingw32".
>>> For bug reporting instructions, please see:
>>> ...
>>> Reading symbols from
>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
>>> (gdb) run
>>> Starting program:
>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
>>> [New Thread 3892.0x20]
>>>
>>>
>>>      CUnit - A unit testing framework for C - Version 2.1-2
>>>      http://cunit.sourceforge.net/
>>>
>>>
>>> Suite: perfthread tests
>>>   Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin
>>> for Csound
>>> 0dBFS level = 32768.0
>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>> libsndfile-1.0.25
>>> rtaudio: PortAudio module enabled ...
>>> using callback interface
>>> rtmidi: PortMIDI module enabled
>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>> graphics suppressed, ascii substituted
>>> 0dBFS level = 32768.0
>>> orch now loaded
>>> audio buffered in 4096 sample-frame blocks
>>> [New Thread 3892.0x78c]
>>> [New Thread 3892.0xe24]
>>> [New Thread 3892.0xf28]
>>> [New Thread 3892.0x460]
>>> [New Thread 3892.0x1258]
>>> [New Thread 3892.0x14a0]
>>> [New Thread 3892.0xcdc]
>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>
>>> warning: FFUsb2Asio::init()
>>>
>>> warning: FFUsb2Asio::init() : no available filters found
>>> warning:
>>>
>>> warning: +FFUsb2Asio::~FFUsb2Asio()
>>>
>>> warning: FFUsb2Asio::stop()
>>>
>>> warning: FFUsb2Asio::disposeBuffers()
>>>
>>> warning: -FFUsb2Asio::~FFUsb2Asio()
>>>
>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>
>>> PortAudio V19-devel (built Jul 31 2013 12:17:21)
>>>    0: dac0 (Microsoft Sound Mapper - Output)
>>>    1: dac1 (Speakers (EDIROL UA-25EX))
>>>    2: dac2 (Speakers (VIA High Definition A)
>>>    3: dac3 (SPDIF Interface (TX0) (VIA High)
>>>    4: dac4 (Primary Sound Driver)
>>>    5: dac5 (Speakers (EDIROL UA-25EX))
>>>    6: dac6 (Speakers (VIA High Definition Audio))
>>>    7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
>>> PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
>>> [New Thread 3892.0x1600]
>>> [New Thread 3892.0x1764]
>>> [New Thread 3892.0x1378]
>>> writing 4096 sample blks of 64-bit floats to dac
>>> SECTION 1:
>>> [New Thread 3892.0x11e8]
>>> new alloc for instr 1:
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> [Switching to Thread 3892.0x11e8]
>>> 0x6c51ff83 in spoutsf (csound=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>> 106     }
>>> (gdb) bt
>>> #0  0x6c51ff83 in spoutsf (csound=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>> #4  0x649458cb in pthread_create_wrapper () from
>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>> #5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>> #6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
>>> #7  0x7710850d in KERNEL32!BaseThreadInitThunk () from
>>> C:\Windows\SysWOW64\kernel32.dll
>>> #8  0x778bbf39 in ?? ()
>>> #9  0x778bbf0c in ?? ()
>>> #10 0x00000000 in ?? ()
>>> (gdb)
>>>
>>>
>>>
>>>
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera 
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Sorry, had not pushed. It's there now. It's nearly the same example you
>>>> posted.
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>>
>>>> On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins
>>>>  wrote:
>>>>>
>>>>> I do not pull this test. Is it in the develop branch?
>>>>>
>>>>> Regards,
>>>>> Mike
>>>>>
>>>>>
>>>>> ===========================
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera
>>>>>  wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've added a test in the tests directory for the performance thread,
>>>>>> and it seems OK there. Although there are some issues reported by valgrind,
>>>>>> I don't think these are the ones causing the reported problem.
>>>>>>
>>>>>> src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
>>>>>> ==14507== Memcheck, a memory error detector
>>>>>> ==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et
>>>>>> al.
>>>>>> ==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright
>>>>>> info
>>>>>> ==14507== Command: ./testPerfThread
>>>>>> ==14507==
>>>>>>
>>>>>>
>>>>>>      CUnit - A Unit testing framework for C - Version 2.1-0
>>>>>>      http://cunit.sourceforge.net/
>>>>>>
>>>>>>
>>>>>> Suite: perfthread tests
>>>>>>   Test: Test Performance Thread ...
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> ==14507== Use of uninitialised value of size 8
>>>>>> ==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> passed
>>>>>>
>>>>>> --Run Summary: Type      Total     Ran  Passed  Failed
>>>>>>                suites        1       1     n/a       0
>>>>>>                tests         1       1       1       0
>>>>>>                asserts       0       0       0       0
>>>>>> ==14507==
>>>>>> ==14507== HEAP SUMMARY:
>>>>>> ==14507==     in use at exit: 119,800 bytes in 1,877 blocks
>>>>>> ==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156
>>>>>> bytes allocated
>>>>>> ==14507==
>>>>>> ==14507== LEAK SUMMARY:
>>>>>> ==14507==    definitely lost: 807 bytes in 9 blocks
>>>>>> ==14507==    indirectly lost: 26,097 bytes in 386 blocks
>>>>>> ==14507==      possibly lost: 42,993 bytes in 1,313 blocks
>>>>>> ==14507==    still reachable: 49,903 bytes in 169 blocks
>>>>>> ==14507==         suppressed: 0 bytes in 0 blocks
>>>>>> ==14507== Rerun with --leak-check=full to see details of leaked memory
>>>>>> ==14507==
>>>>>> ==14507== For counts of detected and suppressed errors, rerun with: -v
>>>>>> ==14507== Use --track-origins=yes to see where uninitialised values
>>>>>> come from
>>>>>> ==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2
>>>>>> from 2)
>>>>>>
>>>>>> Cheers,
>>>>>> Andrés
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins
>>>>>>  wrote:
>>>>>>>
>>>>>>> There definitely appears to be a bug in CsoundPerformanceThread. The
>>>>>>> following program exhibits it on my PC. I see thge exact same stack trace in
>>>>>>> CsoundQt and in a Lua version of this program.
>>>>>>>
>>>>>>> #include "csound.hpp"
>>>>>>> #include "csPerfThread.hpp"
>>>>>>>
>>>>>>> int useThreads = true;
>>>>>>>
>>>>>>> int main(int argc, char *argv[])
>>>>>>> {
>>>>>>>     Csound csound;
>>>>>>>     csound.Compile(argc,argv);
>>>>>>>     csound.Start();
>>>>>>>     if (useThreads) {
>>>>>>>         CsoundPerformanceThread
>>>>>>> performanceThread(csound.GetCsound());
>>>>>>>         performanceThread.Play();
>>>>>>>         performanceThread.Join();
>>>>>>>     } else {
>>>>>>>         while (csound.PerformKsmps() == 0) {}
>>>>>>>     }
>>>>>>>  }
>>>>>>>
>>>>>>> Note that execution is perfect if useThreads is set to false.
>>>>>>>
>>>>>>> The debugger output is:
>>>>>>>
>>>>>>>  gdb --args csperfthread.exe ../trapped.csd
>>>>>>> NU gdb (GDB) 7.6
>>>>>>> opyright (C) 2013 Free Software Foundation, Inc.
>>>>>>> icense GPLv3+: GNU GPL version 3 or later
>>>>>>> 
>>>>>>> his is free software: you are free to change and redistribute it.
>>>>>>> here is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>>>> copying"
>>>>>>> nd "show warranty" for details.
>>>>>>> his GDB was configured as "i686-w64-mingw32".
>>>>>>> or bug reporting instructions, please see:
>>>>>>> http://www.gnu.org/software/gdb/bugs/>...
>>>>>>> eading symbols from
>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
>>>>>>> gdb) run
>>>>>>> tarting program:
>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe
>>>>>>> ../trapped.csd
>>>>>>> New Thread 3552.0xea0]
>>>>>>> irtual_keyboard real time MIDI plugin for Csound
>>>>>>> dBFS level = 32768.0
>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>> ibsndfile-1.0.25
>>>>>>> nifiedCSD:  ../trapped.csd
>>>>>>> TARTING FILE
>>>>>>> reating options
>>>>>>> reating orchestra
>>>>>>> reating score
>>>>>>> taudio: PortAudio module enabled ...
>>>>>>> sing callback interface
>>>>>>> tmidi: PortMIDI module enabled
>>>>>>> lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
>>>>>>> orting score ...
>>>>>>>        ... done
>>>>>>> lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>> isplays suppressed
>>>>>>> dBFS level = 32768.0
>>>>>>> rch now loaded
>>>>>>> udio buffered in 4096 sample-frame blocks
>>>>>>> riting 16384-byte blks of shorts to test.wav (WAV)
>>>>>>> ECTION 1:
>>>>>>> sound is already started, call csoundReset()
>>>>>>> efore starting again
>>>>>>> New Thread 3552.0x19fc]
>>>>>>> table 1:
>>>>>>> table 2:
>>>>>>> table 3:
>>>>>>> table 4:
>>>>>>> table 5:
>>>>>>> table 6:
>>>>>>> table 7:
>>>>>>> table 8:
>>>>>>> table 9:
>>>>>>> table 10:
>>>>>>> table 11:
>>>>>>> table 12:
>>>>>>> table 13:
>>>>>>> table 14:
>>>>>>> table 15:
>>>>>>> table 16:
>>>>>>> table 17:
>>>>>>> table 18:
>>>>>>> table 19:
>>>>>>> table 20:
>>>>>>> table 21:
>>>>>>> table 22:
>>>>>>> ew alloc for instr 1:
>>>>>>> ew alloc for instr 100:
>>>>>>>
>>>>>>> rogram received signal SIGSEGV, Segmentation fault.
>>>>>>> Switching to Thread 3552.0x19fc]
>>>>>>> x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>> 06     }
>>>>>>> gdb) bt
>>>>>>> 0  0x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>> 1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>> 2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>> 3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>> 4  0x649458cb in pthread_create_wrapper () from
>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>> 5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>> 6  0x77349147 in msvcrt!iswalnum () from
>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>> 7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>> 8  0x7751bf39 in ?? ()
>>>>>>> 9  0x7751bf0c in ?? ()
>>>>>>> 10 0x00000000 in ?? ()
>>>>>>> gdb)
>>>>>>>
>>>>>>>
>>>>>>> ===========================
>>>>>>> Michael Gogins
>>>>>>> Irreducible Productions
>>>>>>> http://michaelgogins.tumblr.com
>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins
>>>>>>>  wrote:
>>>>>>>>
>>>>>>>> I see that this is happening when CsoundEngine cleans up csound,
>>>>>>>> stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist
>>>>>>>> when CsoundQt wants to reference it?
>>>>>>>>
>>>>>>>>
>>>>>>>> ===========================
>>>>>>>> Michael Gogins
>>>>>>>> Irreducible Productions
>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini
>>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>> CsoundPerformanceThread is working perfectly from Python.
>>>>>>>>> On 16 Aug 2013, at 12:29, Michael Gogins wrote:
>>>>>>>>>
>>>>>>>>> > However, this backtrace seems to rule out CsoundPerformanceThread
>>>>>>>>> > since this crash happens before the thread is created. This implies a bad
>>>>>>>>> > write by CsoundQt itself.
>>>>>>>>> >
>>>>>>>>> > Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>> > 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>> > root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>> >     at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>> > 1481        opcodeName = root->value->lexeme;
>>>>>>>>> > (gdb) bt
>>>>>>>>> > #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>> > root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>> >     at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>> > #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70,
>>>>>>>>> > root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>> >     at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
>>>>>>>>> > #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
>>>>>>>>> > #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0)
>>>>>>>>> > at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
>>>>>>>>> > #4  0x6c5d5985 in csoundCompileArgs
>>>>>>>>> > (csound=csound@entry=0x17676a70, argc=4, argc@entry=5,
>>>>>>>>> > argv=argv@entry=0x19bd2c18)
>>>>>>>>> >     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
>>>>>>>>> > #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5,
>>>>>>>>> > argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
>>>>>>>>> > #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at
>>>>>>>>> > src/csoundengine.cpp:779
>>>>>>>>> > #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188,
>>>>>>>>> > options=0x1760ae70) at src/csoundengine.cpp:618
>>>>>>>>> > #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0,
>>>>>>>>> > options=0x1760ae70) at src/basedocument.cpp:234
>>>>>>>>> > #9  0x0041c26e in DocumentPage::play (this=0x18608ae0,
>>>>>>>>> > options=0x1760ae70) at src/documentpage.cpp:1203
>>>>>>>>> > #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true,
>>>>>>>>> > index=4) at src/qutecsound.cpp:1387
>>>>>>>>> > #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8,
>>>>>>>>> > _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at
>>>>>>>>> > build/moc/moc_qutecsound.cpp:441
>>>>>>>>> > #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>> > signalOffset=3, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>> > kernel\qobject.cpp:3479
>>>>>>>>> > #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>> > m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>> > kernel\qobject.cpp:3354
>>>>>>>>> > #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true)
>>>>>>>>> > at .moc/debug_shared/moc_qaction.cpp:356
>>>>>>>>> > #15 0x0d933c4e in QAction::activate (this=0x1763f138,
>>>>>>>>> > event=QAction::Trigger) at kernel\qaction.cpp:1175
>>>>>>>>> > #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at
>>>>>>>>> > kernel/qaction.h:185
>>>>>>>>> > #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698)
>>>>>>>>> > at widgets\qtoolbutton.cpp:948
>>>>>>>>> > #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8)
>>>>>>>>> > at widgets\qabstractbutton.cpp:522
>>>>>>>>> > #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent
>>>>>>>>> > (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
>>>>>>>>> > #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent
>>>>>>>>> > (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
>>>>>>>>> > #21 0x0d96d1b9 in QWidget::event (this=0x1773c698,
>>>>>>>>> > event=0x28d1d0) at kernel\qwidget.cpp:7877
>>>>>>>>> > #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698,
>>>>>>>>> > e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
>>>>>>>>> > #23 0x0dade6e6 in QToolButton::event (this=0x1773c698,
>>>>>>>>> > event=0x28d1d0) at widgets\qtoolbutton.cpp:964
>>>>>>>>> > #24 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>> > (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at
>>>>>>>>> > kernel\qapplication.cpp:3455
>>>>>>>>> > #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c,
>>>>>>>>> > receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
>>>>>>>>> > #26 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>> > (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at
>>>>>>>>> > kernel\qcoreapplication.cpp:871
>>>>>>>>> > #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>> > (receiver=0x1773c698, event=0x28d1d0)
>>>>>>>>> >     at
>>>>>>>>> > ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>> > #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent
>>>>>>>>> > (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698,
>>>>>>>>> > nativeWidget=0x2e3b9b8,
>>>>>>>>> >     buttonDown=0xdf4e178 , lastMouseReceiver=...,
>>>>>>>>> > spontaneous=true) at kernel\qapplication.cpp:2485
>>>>>>>>> > #29 0x0d984219 in QWidgetWindow::handleMouseEvent
>>>>>>>>> > (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
>>>>>>>>> > #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0,
>>>>>>>>> > event=0x28d920) at kernel\qwidgetwindow.cpp:158
>>>>>>>>> > #31 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>> > (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at
>>>>>>>>> > kernel\qapplication.cpp:3455
>>>>>>>>> > #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c,
>>>>>>>>> > receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
>>>>>>>>> > #33 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>> > (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at
>>>>>>>>> > kernel\qcoreapplication.cpp:871
>>>>>>>>> > #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>> > (receiver=0x176391d0, event=0x28d920)
>>>>>>>>> >     at
>>>>>>>>> > ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>> > #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent
>>>>>>>>> > (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
>>>>>>>>> > #36 0x06849c5d in
>>>>>>>>> > QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at
>>>>>>>>> > kernel\qguiapplication.cpp:1262
>>>>>>>>> > #37 0x06840790 in
>>>>>>>>> > QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at
>>>>>>>>> > kernel\qwindowsysteminterface.cpp:581
>>>>>>>>> > #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents
>>>>>>>>> > (flags=...) at kernel\qwindowsysteminterface.cpp:561
>>>>>>>>> > #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents
>>>>>>>>> > (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
>>>>>>>>> > #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025,
>>>>>>>>> > wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
>>>>>>>>> > #41 0x761c77d8 in gapfnScSendMessage () from
>>>>>>>>> > C:\Windows\SysWOW64\user32.dll
>>>>>>>>> > #42 0x003b040e in ?? ()
>>>>>>>>> > #43 0x00000401 in ?? ()
>>>>>>>>> > #44 0x00000000 in ?? ()
>>>>>>>>> > (gdb)
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins
>>>>>>>>> >  wrote:
>>>>>>>>> > To rule out or in CsoundPerformanceThread, I will write a short
>>>>>>>>> > C++ test program that uses it and run it with various csds. But I won't have
>>>>>>>>> > time to do this until tonight.
>>>>>>>>> >
>>>>>>>>> > Regards,
>>>>>>>>> > Mike
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins
>>>>>>>>> >  wrote:
>>>>>>>>> > There are also lots of warnings about missing signals for slots
>>>>>>>>> > in Qt. And missing properties.
>>>>>>>>> >
>>>>>>>>> > Regards,
>>>>>>>>> > Mike
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins
>>>>>>>>> >  wrote:
>>>>>>>>> > I've been seeing this for a day or so now, running CsoundQt with
>>>>>>>>> > a variety of files, this with your test.cd:
>>>>>>>>> >
>>>>>>>>> > Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>> > [Switching to Thread 6688.0x1590]
>>>>>>>>> > 0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> > 106     }
>>>>>>>>> > (gdb) bt
>>>>>>>>> > #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> > #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>> > #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>> > #3  0x6b8895ee in CsoundPerformanceThread::Perform
>>>>>>>>> > (this=0x1922de30) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>> > #4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>> > c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>> > #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> > #6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>> > C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> > #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>> > C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>> > #8  0x7751bf39 in ?? ()
>>>>>>>>> > #9  0x7751bf0c in ?? ()
>>>>>>>>> > #10 0x00000000 in ?? ()
>>>>>>>>> > (gdb)
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins
>>>>>>>>> >  wrote:
>>>>>>>>> > I have just run this with head code for both Csound and CsoundQt.
>>>>>>>>> > All is good with rendering with plain Csound. In CsoundQt all is good with
>>>>>>>>> > rendering in the terminal. If I render to file in CsoundQt, it works once
>>>>>>>>> > for each file, then hangs or crashes CsoundQt. If I render to audio in
>>>>>>>>> > CsoundQt, it hangs or crashes the first time.
>>>>>>>>> >
>>>>>>>>> > Did anyone try an empty csd?
>>>>>>>>> >
>>>>>>>>> > If I run an empty csd in CsoundQt and render to terminal, all is
>>>>>>>>> > fine. If I render to file in CsoundQt or render to audio in CsoundQt with an
>>>>>>>>> > empty file, it hangs.
>>>>>>>>> >
>>>>>>>>> > CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's
>>>>>>>>> > CsoundEngine are places to look for trouble.
>>>>>>>>> >
>>>>>>>>> > I think it's pretty clear from this behavior across platforms
>>>>>>>>> > that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious
>>>>>>>>> > bug not specific to Windows. Behavior various however from machine to
>>>>>>>>> > machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are
>>>>>>>>> > corrupting Csound variables.
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > Regards,
>>>>>>>>> > Mike
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz
>>>>>>>>> >  wrote:
>>>>>>>>> > hi -
>>>>>>>>> >
>>>>>>>>> > i experience a somehow strange bug in csoundqt.
>>>>>>>>> >
>>>>>>>>> > when i run StrayNumToFt.csd via the PLAY button, i get lots of
>>>>>>>>> > errors:
>>>>>>>>> > INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>>>>>>> >
>>>>>>>>> > when i run the same file as RUN IN TERM, it is fine (same from
>>>>>>>>> > the command line).
>>>>>>>>> >
>>>>>>>>> > when i run a very simple csd with strtod in csoundqt, i get no
>>>>>>>>> > output at all (again no problem in "run in term").
>>>>>>>>> >
>>>>>>>>> > this is with csound6 and csoundqt both from git, on ubuntu studio
>>>>>>>>> > 12.04.
>>>>>>>>> >
>>>>>>>>> > best -
>>>>>>>>> >
>>>>>>>>> >         joachim
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ------------------------------------------------------------------------------
>>>>>>>>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> > It's a free troubleshooting tool designed for production.
>>>>>>>>> > Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> > Download for free and get started troubleshooting in minutes.
>>>>>>>>> >
>>>>>>>>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>> > _______________________________________________
>>>>>>>>> > Csound-devel mailing list
>>>>>>>>> > Csound-devel@lists.sourceforge.net
>>>>>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ------------------------------------------------------------------------------
>>>>>>>>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> > It's a free troubleshooting tool designed for production.
>>>>>>>>> > Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> > Download for free and get started troubleshooting in minutes.
>>>>>>>>> >
>>>>>>>>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>>>>>>>>> > Csound-devel mailing list
>>>>>>>>> > Csound-devel@lists.sourceforge.net
>>>>>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>> Dr Victor Lazzarini
>>>>>>>>> Senior Lecturer
>>>>>>>>> Dept. of Music
>>>>>>>>> NUI Maynooth Ireland
>>>>>>>>> tel.: +353 1 708 3545
>>>>>>>>> Victor dot Lazzarini AT nuim dot ie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>> It's a free troubleshooting tool designed for production.
>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>> It's a free troubleshooting tool designed for production.
>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>> Download for free and get started troubleshooting in minutes.
>>>>>
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>> It's a free troubleshooting tool designed for production.
>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>> Download for free and get started troubleshooting in minutes.
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>> It's a free troubleshooting tool designed for production.
>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>> Download for free and get started troubleshooting in minutes.
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-17 20:39
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I have been making sure that the C and the C++ flags are the same all along.

I have been using the builtin atomics for ages. There was never a problem before. But I will try as you suggest.

Regards,
Mike




===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 3:26 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Michael,

I'm wondering, could you try a build with "-DUSE_ATOMIC_BUILTIN=0"?  I
just added that flag, and I'm wondering if that was not used at all on
Windows previously and now it might be and causing problems.  Also,
perhaps a longshot, maybe double check that any custom flags in
Custom.cmake are applied to both CMAKE_C_FLAGS as well as
CMAKE_CXX_FLAGS.

steven

On Sat, Aug 17, 2013 at 2:46 PM, Michael Gogins
<michael.gogins@gmail.com> wrote:
> At the moment I have no access to a Linux computer, so I cannot use
> valgrind. Can you try it on Windows?
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera <mantaraya36@gmail.com>
> wrote:
>>
>> OK, so it's a perfThread issue then. Can you run it with valgrind?
>>
>> Cheers,
>> Andrés
>>
>>
>> On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins
>> <michael.gogins@gmail.com> wrote:
>>>
>>> Here's what it does (exactly the same thing as with my example):
>>>
>>> $ gdb tests/c/testPerfThread.exe
>>> GNU gdb (GDB) 7.6
>>> Copyright (C) 2013 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later
>>> <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>> copying"
>>> and "show warranty" for details.
>>> This GDB was configured as "i686-w64-mingw32".
>>> For bug reporting instructions, please see:
>>> <http://www.gnu.org/software/gdb/bugs/>...
>>> Reading symbols from
>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
>>> (gdb) run
>>> Starting program:
>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
>>> [New Thread 3892.0x20]
>>>
>>>
>>>      CUnit - A unit testing framework for C - Version 2.1-2
>>>      http://cunit.sourceforge.net/
>>>
>>>
>>> Suite: perfthread tests
>>>   Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin
>>> for Csound
>>> 0dBFS level = 32768.0
>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>> libsndfile-1.0.25
>>> rtaudio: PortAudio module enabled ...
>>> using callback interface
>>> rtmidi: PortMIDI module enabled
>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>> graphics suppressed, ascii substituted
>>> 0dBFS level = 32768.0
>>> orch now loaded
>>> audio buffered in 4096 sample-frame blocks
>>> [New Thread 3892.0x78c]
>>> [New Thread 3892.0xe24]
>>> [New Thread 3892.0xf28]
>>> [New Thread 3892.0x460]
>>> [New Thread 3892.0x1258]
>>> [New Thread 3892.0x14a0]
>>> [New Thread 3892.0xcdc]
>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>
>>> warning: FFUsb2Asio::init()
>>>
>>> warning: FFUsb2Asio::init() : no available filters found
>>> warning:
>>>
>>> warning: +FFUsb2Asio::~FFUsb2Asio()
>>>
>>> warning: FFUsb2Asio::stop()
>>>
>>> warning: FFUsb2Asio::disposeBuffers()
>>>
>>> warning: -FFUsb2Asio::~FFUsb2Asio()
>>>
>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>
>>> PortAudio V19-devel (built Jul 31 2013 12:17:21)
>>>    0: dac0 (Microsoft Sound Mapper - Output)
>>>    1: dac1 (Speakers (EDIROL UA-25EX))
>>>    2: dac2 (Speakers (VIA High Definition A)
>>>    3: dac3 (SPDIF Interface (TX0) (VIA High)
>>>    4: dac4 (Primary Sound Driver)
>>>    5: dac5 (Speakers (EDIROL UA-25EX))
>>>    6: dac6 (Speakers (VIA High Definition Audio))
>>>    7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
>>> PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
>>> [New Thread 3892.0x1600]
>>> [New Thread 3892.0x1764]
>>> [New Thread 3892.0x1378]
>>> writing 4096 sample blks of 64-bit floats to dac
>>> SECTION 1:
>>> [New Thread 3892.0x11e8]
>>> new alloc for instr 1:
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> [Switching to Thread 3892.0x11e8]
>>> 0x6c51ff83 in spoutsf (csound=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>> 106     }
>>> (gdb) bt
>>> #0  0x6c51ff83 in spoutsf (csound=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at
>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>> #4  0x649458cb in pthread_create_wrapper () from
>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>> #5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>> #6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
>>> #7  0x7710850d in KERNEL32!BaseThreadInitThunk () from
>>> C:\Windows\SysWOW64\kernel32.dll
>>> #8  0x778bbf39 in ?? ()
>>> #9  0x778bbf0c in ?? ()
>>> #10 0x00000000 in ?? ()
>>> (gdb)
>>>
>>>
>>>
>>>
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera <mantaraya36@gmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Sorry, had not pushed. It's there now. It's nearly the same example you
>>>> posted.
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>>
>>>> On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins
>>>> <michael.gogins@gmail.com> wrote:
>>>>>
>>>>> I do not pull this test. Is it in the develop branch?
>>>>>
>>>>> Regards,
>>>>> Mike
>>>>>
>>>>>
>>>>> ===========================
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera
>>>>> <mantaraya36@gmail.com> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've added a test in the tests directory for the performance thread,
>>>>>> and it seems OK there. Although there are some issues reported by valgrind,
>>>>>> I don't think these are the ones causing the reported problem.
>>>>>>
>>>>>> src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
>>>>>> ==14507== Memcheck, a memory error detector
>>>>>> ==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et
>>>>>> al.
>>>>>> ==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright
>>>>>> info
>>>>>> ==14507== Command: ./testPerfThread
>>>>>> ==14507==
>>>>>>
>>>>>>
>>>>>>      CUnit - A Unit testing framework for C - Version 2.1-0
>>>>>>      http://cunit.sourceforge.net/
>>>>>>
>>>>>>
>>>>>> Suite: perfthread tests
>>>>>>   Test: Test Performance Thread ...
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> ==14507== Use of uninitialised value of size 8
>>>>>> ==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>> ==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>> (csound.c:1917)
>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>> (csound_orc_semantics.c:2230)
>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>> (csound_orc_compile.c:1649)
>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>> (csound.hpp:189)
>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>> ==14507==
>>>>>> passed
>>>>>>
>>>>>> --Run Summary: Type      Total     Ran  Passed  Failed
>>>>>>                suites        1       1     n/a       0
>>>>>>                tests         1       1       1       0
>>>>>>                asserts       0       0       0       0
>>>>>> ==14507==
>>>>>> ==14507== HEAP SUMMARY:
>>>>>> ==14507==     in use at exit: 119,800 bytes in 1,877 blocks
>>>>>> ==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156
>>>>>> bytes allocated
>>>>>> ==14507==
>>>>>> ==14507== LEAK SUMMARY:
>>>>>> ==14507==    definitely lost: 807 bytes in 9 blocks
>>>>>> ==14507==    indirectly lost: 26,097 bytes in 386 blocks
>>>>>> ==14507==      possibly lost: 42,993 bytes in 1,313 blocks
>>>>>> ==14507==    still reachable: 49,903 bytes in 169 blocks
>>>>>> ==14507==         suppressed: 0 bytes in 0 blocks
>>>>>> ==14507== Rerun with --leak-check=full to see details of leaked memory
>>>>>> ==14507==
>>>>>> ==14507== For counts of detected and suppressed errors, rerun with: -v
>>>>>> ==14507== Use --track-origins=yes to see where uninitialised values
>>>>>> come from
>>>>>> ==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2
>>>>>> from 2)
>>>>>>
>>>>>> Cheers,
>>>>>> Andrés
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins
>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>
>>>>>>> There definitely appears to be a bug in CsoundPerformanceThread. The
>>>>>>> following program exhibits it on my PC. I see thge exact same stack trace in
>>>>>>> CsoundQt and in a Lua version of this program.
>>>>>>>
>>>>>>> #include "csound.hpp"
>>>>>>> #include "csPerfThread.hpp"
>>>>>>>
>>>>>>> int useThreads = true;
>>>>>>>
>>>>>>> int main(int argc, char *argv[])
>>>>>>> {
>>>>>>>     Csound csound;
>>>>>>>     csound.Compile(argc,argv);
>>>>>>>     csound.Start();
>>>>>>>     if (useThreads) {
>>>>>>>         CsoundPerformanceThread
>>>>>>> performanceThread(csound.GetCsound());
>>>>>>>         performanceThread.Play();
>>>>>>>         performanceThread.Join();
>>>>>>>     } else {
>>>>>>>         while (csound.PerformKsmps() == 0) {}
>>>>>>>     }
>>>>>>>  }
>>>>>>>
>>>>>>> Note that execution is perfect if useThreads is set to false.
>>>>>>>
>>>>>>> The debugger output is:
>>>>>>>
>>>>>>>  gdb --args csperfthread.exe ../trapped.csd
>>>>>>> NU gdb (GDB) 7.6
>>>>>>> opyright (C) 2013 Free Software Foundation, Inc.
>>>>>>> icense GPLv3+: GNU GPL version 3 or later
>>>>>>> <http://gnu.org/licenses/gpl.html>
>>>>>>> his is free software: you are free to change and redistribute it.
>>>>>>> here is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>>>> copying"
>>>>>>> nd "show warranty" for details.
>>>>>>> his GDB was configured as "i686-w64-mingw32".
>>>>>>> or bug reporting instructions, please see:
>>>>>>> http://www.gnu.org/software/gdb/bugs/>...
>>>>>>> eading symbols from
>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
>>>>>>> gdb) run
>>>>>>> tarting program:
>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe
>>>>>>> ../trapped.csd
>>>>>>> New Thread 3552.0xea0]
>>>>>>> irtual_keyboard real time MIDI plugin for Csound
>>>>>>> dBFS level = 32768.0
>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>> ibsndfile-1.0.25
>>>>>>> nifiedCSD:  ../trapped.csd
>>>>>>> TARTING FILE
>>>>>>> reating options
>>>>>>> reating orchestra
>>>>>>> reating score
>>>>>>> taudio: PortAudio module enabled ...
>>>>>>> sing callback interface
>>>>>>> tmidi: PortMIDI module enabled
>>>>>>> lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
>>>>>>> orting score ...
>>>>>>>        ... done
>>>>>>> lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>> isplays suppressed
>>>>>>> dBFS level = 32768.0
>>>>>>> rch now loaded
>>>>>>> udio buffered in 4096 sample-frame blocks
>>>>>>> riting 16384-byte blks of shorts to test.wav (WAV)
>>>>>>> ECTION 1:
>>>>>>> sound is already started, call csoundReset()
>>>>>>> efore starting again
>>>>>>> New Thread 3552.0x19fc]
>>>>>>> table 1:
>>>>>>> table 2:
>>>>>>> table 3:
>>>>>>> table 4:
>>>>>>> table 5:
>>>>>>> table 6:
>>>>>>> table 7:
>>>>>>> table 8:
>>>>>>> table 9:
>>>>>>> table 10:
>>>>>>> table 11:
>>>>>>> table 12:
>>>>>>> table 13:
>>>>>>> table 14:
>>>>>>> table 15:
>>>>>>> table 16:
>>>>>>> table 17:
>>>>>>> table 18:
>>>>>>> table 19:
>>>>>>> table 20:
>>>>>>> table 21:
>>>>>>> table 22:
>>>>>>> ew alloc for instr 1:
>>>>>>> ew alloc for instr 100:
>>>>>>>
>>>>>>> rogram received signal SIGSEGV, Segmentation fault.
>>>>>>> Switching to Thread 3552.0x19fc]
>>>>>>> x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>> 06     }
>>>>>>> gdb) bt
>>>>>>> 0  0x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>> 1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>> 2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>> 3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at
>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>> 4  0x649458cb in pthread_create_wrapper () from
>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>> 5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>> 6  0x77349147 in msvcrt!iswalnum () from
>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>> 7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>> 8  0x7751bf39 in ?? ()
>>>>>>> 9  0x7751bf0c in ?? ()
>>>>>>> 10 0x00000000 in ?? ()
>>>>>>> gdb)
>>>>>>>
>>>>>>>
>>>>>>> ===========================
>>>>>>> Michael Gogins
>>>>>>> Irreducible Productions
>>>>>>> http://michaelgogins.tumblr.com
>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins
>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>
>>>>>>>> I see that this is happening when CsoundEngine cleans up csound,
>>>>>>>> stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist
>>>>>>>> when CsoundQt wants to reference it?
>>>>>>>>
>>>>>>>>
>>>>>>>> ===========================
>>>>>>>> Michael Gogins
>>>>>>>> Irreducible Productions
>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini
>>>>>>>> <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>>>>
>>>>>>>>> CsoundPerformanceThread is working perfectly from Python.
>>>>>>>>> On 16 Aug 2013, at 12:29, Michael Gogins wrote:
>>>>>>>>>
>>>>>>>>> > However, this backtrace seems to rule out CsoundPerformanceThread
>>>>>>>>> > since this crash happens before the thread is created. This implies a bad
>>>>>>>>> > write by CsoundQt itself.
>>>>>>>>> >
>>>>>>>>> > Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>> > 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>> > root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>> >     at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>> > 1481        opcodeName = root->value->lexeme;
>>>>>>>>> > (gdb) bt
>>>>>>>>> > #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>> > root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>> >     at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>> > #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70,
>>>>>>>>> > root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>> >     at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
>>>>>>>>> > #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
>>>>>>>>> > #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0)
>>>>>>>>> > at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
>>>>>>>>> > #4  0x6c5d5985 in csoundCompileArgs
>>>>>>>>> > (csound=csound@entry=0x17676a70, argc=4, argc@entry=5,
>>>>>>>>> > argv=argv@entry=0x19bd2c18)
>>>>>>>>> >     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
>>>>>>>>> > #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5,
>>>>>>>>> > argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
>>>>>>>>> > #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at
>>>>>>>>> > src/csoundengine.cpp:779
>>>>>>>>> > #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188,
>>>>>>>>> > options=0x1760ae70) at src/csoundengine.cpp:618
>>>>>>>>> > #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0,
>>>>>>>>> > options=0x1760ae70) at src/basedocument.cpp:234
>>>>>>>>> > #9  0x0041c26e in DocumentPage::play (this=0x18608ae0,
>>>>>>>>> > options=0x1760ae70) at src/documentpage.cpp:1203
>>>>>>>>> > #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true,
>>>>>>>>> > index=4) at src/qutecsound.cpp:1387
>>>>>>>>> > #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8,
>>>>>>>>> > _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at
>>>>>>>>> > build/moc/moc_qutecsound.cpp:441
>>>>>>>>> > #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>> > signalOffset=3, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>> > kernel\qobject.cpp:3479
>>>>>>>>> > #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>> > m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>> > kernel\qobject.cpp:3354
>>>>>>>>> > #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true)
>>>>>>>>> > at .moc/debug_shared/moc_qaction.cpp:356
>>>>>>>>> > #15 0x0d933c4e in QAction::activate (this=0x1763f138,
>>>>>>>>> > event=QAction::Trigger) at kernel\qaction.cpp:1175
>>>>>>>>> > #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at
>>>>>>>>> > kernel/qaction.h:185
>>>>>>>>> > #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698)
>>>>>>>>> > at widgets\qtoolbutton.cpp:948
>>>>>>>>> > #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8)
>>>>>>>>> > at widgets\qabstractbutton.cpp:522
>>>>>>>>> > #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent
>>>>>>>>> > (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
>>>>>>>>> > #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent
>>>>>>>>> > (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
>>>>>>>>> > #21 0x0d96d1b9 in QWidget::event (this=0x1773c698,
>>>>>>>>> > event=0x28d1d0) at kernel\qwidget.cpp:7877
>>>>>>>>> > #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698,
>>>>>>>>> > e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
>>>>>>>>> > #23 0x0dade6e6 in QToolButton::event (this=0x1773c698,
>>>>>>>>> > event=0x28d1d0) at widgets\qtoolbutton.cpp:964
>>>>>>>>> > #24 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>> > (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at
>>>>>>>>> > kernel\qapplication.cpp:3455
>>>>>>>>> > #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c,
>>>>>>>>> > receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
>>>>>>>>> > #26 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>> > (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at
>>>>>>>>> > kernel\qcoreapplication.cpp:871
>>>>>>>>> > #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>> > (receiver=0x1773c698, event=0x28d1d0)
>>>>>>>>> >     at
>>>>>>>>> > ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>> > #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent
>>>>>>>>> > (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698,
>>>>>>>>> > nativeWidget=0x2e3b9b8,
>>>>>>>>> >     buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=...,
>>>>>>>>> > spontaneous=true) at kernel\qapplication.cpp:2485
>>>>>>>>> > #29 0x0d984219 in QWidgetWindow::handleMouseEvent
>>>>>>>>> > (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
>>>>>>>>> > #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0,
>>>>>>>>> > event=0x28d920) at kernel\qwidgetwindow.cpp:158
>>>>>>>>> > #31 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>> > (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at
>>>>>>>>> > kernel\qapplication.cpp:3455
>>>>>>>>> > #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c,
>>>>>>>>> > receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
>>>>>>>>> > #33 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>> > (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at
>>>>>>>>> > kernel\qcoreapplication.cpp:871
>>>>>>>>> > #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>> > (receiver=0x176391d0, event=0x28d920)
>>>>>>>>> >     at
>>>>>>>>> > ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>> > #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent
>>>>>>>>> > (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
>>>>>>>>> > #36 0x06849c5d in
>>>>>>>>> > QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at
>>>>>>>>> > kernel\qguiapplication.cpp:1262
>>>>>>>>> > #37 0x06840790 in
>>>>>>>>> > QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at
>>>>>>>>> > kernel\qwindowsysteminterface.cpp:581
>>>>>>>>> > #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents
>>>>>>>>> > (flags=...) at kernel\qwindowsysteminterface.cpp:561
>>>>>>>>> > #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents
>>>>>>>>> > (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
>>>>>>>>> > #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025,
>>>>>>>>> > wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
>>>>>>>>> > #41 0x761c77d8 in gapfnScSendMessage () from
>>>>>>>>> > C:\Windows\SysWOW64\user32.dll
>>>>>>>>> > #42 0x003b040e in ?? ()
>>>>>>>>> > #43 0x00000401 in ?? ()
>>>>>>>>> > #44 0x00000000 in ?? ()
>>>>>>>>> > (gdb)
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins
>>>>>>>>> > <michael.gogins@gmail.com> wrote:
>>>>>>>>> > To rule out or in CsoundPerformanceThread, I will write a short
>>>>>>>>> > C++ test program that uses it and run it with various csds. But I won't have
>>>>>>>>> > time to do this until tonight.
>>>>>>>>> >
>>>>>>>>> > Regards,
>>>>>>>>> > Mike
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins
>>>>>>>>> > <michael.gogins@gmail.com> wrote:
>>>>>>>>> > There are also lots of warnings about missing signals for slots
>>>>>>>>> > in Qt. And missing properties.
>>>>>>>>> >
>>>>>>>>> > Regards,
>>>>>>>>> > Mike
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins
>>>>>>>>> > <michael.gogins@gmail.com> wrote:
>>>>>>>>> > I've been seeing this for a day or so now, running CsoundQt with
>>>>>>>>> > a variety of files, this with your test.cd:
>>>>>>>>> >
>>>>>>>>> > Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>> > [Switching to Thread 6688.0x1590]
>>>>>>>>> > 0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> > 106     }
>>>>>>>>> > (gdb) bt
>>>>>>>>> > #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> > #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>> > #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>> > #3  0x6b8895ee in CsoundPerformanceThread::Perform
>>>>>>>>> > (this=0x1922de30) at
>>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>> > #4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>> > c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>> > #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> > #6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>> > C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> > #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>> > C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>> > #8  0x7751bf39 in ?? ()
>>>>>>>>> > #9  0x7751bf0c in ?? ()
>>>>>>>>> > #10 0x00000000 in ?? ()
>>>>>>>>> > (gdb)
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins
>>>>>>>>> > <michael.gogins@gmail.com> wrote:
>>>>>>>>> > I have just run this with head code for both Csound and CsoundQt.
>>>>>>>>> > All is good with rendering with plain Csound. In CsoundQt all is good with
>>>>>>>>> > rendering in the terminal. If I render to file in CsoundQt, it works once
>>>>>>>>> > for each file, then hangs or crashes CsoundQt. If I render to audio in
>>>>>>>>> > CsoundQt, it hangs or crashes the first time.
>>>>>>>>> >
>>>>>>>>> > Did anyone try an empty csd?
>>>>>>>>> >
>>>>>>>>> > If I run an empty csd in CsoundQt and render to terminal, all is
>>>>>>>>> > fine. If I render to file in CsoundQt or render to audio in CsoundQt with an
>>>>>>>>> > empty file, it hangs.
>>>>>>>>> >
>>>>>>>>> > CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's
>>>>>>>>> > CsoundEngine are places to look for trouble.
>>>>>>>>> >
>>>>>>>>> > I think it's pretty clear from this behavior across platforms
>>>>>>>>> > that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious
>>>>>>>>> > bug not specific to Windows. Behavior various however from machine to
>>>>>>>>> > machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are
>>>>>>>>> > corrupting Csound variables.
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > Regards,
>>>>>>>>> > Mike
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ===========================
>>>>>>>>> > Michael Gogins
>>>>>>>>> > Irreducible Productions
>>>>>>>>> > http://michaelgogins.tumblr.com
>>>>>>>>> > Michael dot Gogins at gmail dot com
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz
>>>>>>>>> > <jh@joachimheintz.de> wrote:
>>>>>>>>> > hi -
>>>>>>>>> >
>>>>>>>>> > i experience a somehow strange bug in csoundqt.
>>>>>>>>> >
>>>>>>>>> > when i run StrayNumToFt.csd via the PLAY button, i get lots of
>>>>>>>>> > errors:
>>>>>>>>> > INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>>>>>>> >
>>>>>>>>> > when i run the same file as RUN IN TERM, it is fine (same from
>>>>>>>>> > the command line).
>>>>>>>>> >
>>>>>>>>> > when i run a very simple csd with strtod in csoundqt, i get no
>>>>>>>>> > output at all (again no problem in "run in term").
>>>>>>>>> >
>>>>>>>>> > this is with csound6 and csoundqt both from git, on ubuntu studio
>>>>>>>>> > 12.04.
>>>>>>>>> >
>>>>>>>>> > best -
>>>>>>>>> >
>>>>>>>>> >         joachim
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ------------------------------------------------------------------------------
>>>>>>>>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> > It's a free troubleshooting tool designed for production.
>>>>>>>>> > Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> > Download for free and get started troubleshooting in minutes.
>>>>>>>>> >
>>>>>>>>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>> > _______________________________________________
>>>>>>>>> > Csound-devel mailing list
>>>>>>>>> > Csound-devel@lists.sourceforge.net
>>>>>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > ------------------------------------------------------------------------------
>>>>>>>>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> > It's a free troubleshooting tool designed for production.
>>>>>>>>> > Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> > Download for free and get started troubleshooting in minutes.
>>>>>>>>> >
>>>>>>>>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>>>>>>>>> > Csound-devel mailing list
>>>>>>>>> > Csound-devel@lists.sourceforge.net
>>>>>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>> Dr Victor Lazzarini
>>>>>>>>> Senior Lecturer
>>>>>>>>> Dept. of Music
>>>>>>>>> NUI Maynooth Ireland
>>>>>>>>> tel.: +353 1 708 3545
>>>>>>>>> Victor dot Lazzarini AT nuim dot ie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>> It's a free troubleshooting tool designed for production.
>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>> It's a free troubleshooting tool designed for production.
>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>> Download for free and get started troubleshooting in minutes.
>>>>>
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>> It's a free troubleshooting tool designed for production.
>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>> Download for free and get started troubleshooting in minutes.
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>> It's a free troubleshooting tool designed for production.
>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>> Download for free and get started troubleshooting in minutes.
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-17 20:43
FromVictor Lazzarini
SubjectRe: [Cs-dev] bug with strtod in csoundqt
I have the impression that if the atomic builtins weren't there, Csound would not build.
On 17 Aug 2013, at 20:26, Steven Yi wrote:

> Hi Michael,
> 
> I'm wondering, could you try a build with "-DUSE_ATOMIC_BUILTIN=0"?  I
> just added that flag, and I'm wondering if that was not used at all on
> Windows previously and now it might be and causing problems.  Also,
> perhaps a longshot, maybe double check that any custom flags in
> Custom.cmake are applied to both CMAKE_C_FLAGS as well as
> CMAKE_CXX_FLAGS.
> 
> steven
> 
> On Sat, Aug 17, 2013 at 2:46 PM, Michael Gogins
>  wrote:
>> At the moment I have no access to a Linux computer, so I cannot use
>> valgrind. Can you try it on Windows?
>> 
>> Regards,
>> Mike
>> 
>> 
>> 
>> 
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>> 
>> 
>> On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera 
>> wrote:
>>> 
>>> OK, so it's a perfThread issue then. Can you run it with valgrind?
>>> 
>>> Cheers,
>>> Andrés
>>> 
>>> 
>>> On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins
>>>  wrote:
>>>> 
>>>> Here's what it does (exactly the same thing as with my example):
>>>> 
>>>> $ gdb tests/c/testPerfThread.exe
>>>> GNU gdb (GDB) 7.6
>>>> Copyright (C) 2013 Free Software Foundation, Inc.
>>>> License GPLv3+: GNU GPL version 3 or later
>>>> 
>>>> This is free software: you are free to change and redistribute it.
>>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>>> copying"
>>>> and "show warranty" for details.
>>>> This GDB was configured as "i686-w64-mingw32".
>>>> For bug reporting instructions, please see:
>>>> ...
>>>> Reading symbols from
>>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
>>>> (gdb) run
>>>> Starting program:
>>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
>>>> [New Thread 3892.0x20]
>>>> 
>>>> 
>>>>     CUnit - A unit testing framework for C - Version 2.1-2
>>>>     http://cunit.sourceforge.net/
>>>> 
>>>> 
>>>> Suite: perfthread tests
>>>>  Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin
>>>> for Csound
>>>> 0dBFS level = 32768.0
>>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>>> libsndfile-1.0.25
>>>> rtaudio: PortAudio module enabled ...
>>>> using callback interface
>>>> rtmidi: PortMIDI module enabled
>>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>>> graphics suppressed, ascii substituted
>>>> 0dBFS level = 32768.0
>>>> orch now loaded
>>>> audio buffered in 4096 sample-frame blocks
>>>> [New Thread 3892.0x78c]
>>>> [New Thread 3892.0xe24]
>>>> [New Thread 3892.0xf28]
>>>> [New Thread 3892.0x460]
>>>> [New Thread 3892.0x1258]
>>>> [New Thread 3892.0x14a0]
>>>> [New Thread 3892.0xcdc]
>>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>> 
>>>> warning: FFUsb2Asio::init()
>>>> 
>>>> warning: FFUsb2Asio::init() : no available filters found
>>>> warning:
>>>> 
>>>> warning: +FFUsb2Asio::~FFUsb2Asio()
>>>> 
>>>> warning: FFUsb2Asio::stop()
>>>> 
>>>> warning: FFUsb2Asio::disposeBuffers()
>>>> 
>>>> warning: -FFUsb2Asio::~FFUsb2Asio()
>>>> 
>>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>> 
>>>> PortAudio V19-devel (built Jul 31 2013 12:17:21)
>>>>   0: dac0 (Microsoft Sound Mapper - Output)
>>>>   1: dac1 (Speakers (EDIROL UA-25EX))
>>>>   2: dac2 (Speakers (VIA High Definition A)
>>>>   3: dac3 (SPDIF Interface (TX0) (VIA High)
>>>>   4: dac4 (Primary Sound Driver)
>>>>   5: dac5 (Speakers (EDIROL UA-25EX))
>>>>   6: dac6 (Speakers (VIA High Definition Audio))
>>>>   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
>>>> PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
>>>> [New Thread 3892.0x1600]
>>>> [New Thread 3892.0x1764]
>>>> [New Thread 3892.0x1378]
>>>> writing 4096 sample blks of 64-bit floats to dac
>>>> SECTION 1:
>>>> [New Thread 3892.0x11e8]
>>>> new alloc for instr 1:
>>>> 
>>>> Program received signal SIGSEGV, Segmentation fault.
>>>> [Switching to Thread 3892.0x11e8]
>>>> 0x6c51ff83 in spoutsf (csound=0x430048) at
>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>> 106     }
>>>> (gdb) bt
>>>> #0  0x6c51ff83 in spoutsf (csound=0x430048) at
>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at
>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at
>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at
>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>> #4  0x649458cb in pthread_create_wrapper () from
>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>> #5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>> #6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
>>>> #7  0x7710850d in KERNEL32!BaseThreadInitThunk () from
>>>> C:\Windows\SysWOW64\kernel32.dll
>>>> #8  0x778bbf39 in ?? ()
>>>> #9  0x778bbf0c in ?? ()
>>>> #10 0x00000000 in ?? ()
>>>> (gdb)
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ===========================
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://michaelgogins.tumblr.com
>>>> Michael dot Gogins at gmail dot com
>>>> 
>>>> 
>>>> On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera 
>>>> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> Sorry, had not pushed. It's there now. It's nearly the same example you
>>>>> posted.
>>>>> 
>>>>> Cheers,
>>>>> Andrés
>>>>> 
>>>>> 
>>>>> On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins
>>>>>  wrote:
>>>>>> 
>>>>>> I do not pull this test. Is it in the develop branch?
>>>>>> 
>>>>>> Regards,
>>>>>> Mike
>>>>>> 
>>>>>> 
>>>>>> ===========================
>>>>>> Michael Gogins
>>>>>> Irreducible Productions
>>>>>> http://michaelgogins.tumblr.com
>>>>>> Michael dot Gogins at gmail dot com
>>>>>> 
>>>>>> 
>>>>>> On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera
>>>>>>  wrote:
>>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> I've added a test in the tests directory for the performance thread,
>>>>>>> and it seems OK there. Although there are some issues reported by valgrind,
>>>>>>> I don't think these are the ones causing the reported problem.
>>>>>>> 
>>>>>>> src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
>>>>>>> ==14507== Memcheck, a memory error detector
>>>>>>> ==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et
>>>>>>> al.
>>>>>>> ==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright
>>>>>>> info
>>>>>>> ==14507== Command: ./testPerfThread
>>>>>>> ==14507==
>>>>>>> 
>>>>>>> 
>>>>>>>     CUnit - A Unit testing framework for C - Version 2.1-0
>>>>>>>     http://cunit.sourceforge.net/
>>>>>>> 
>>>>>>> 
>>>>>>> Suite: perfthread tests
>>>>>>>  Test: Test Performance Thread ...
>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>> ==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>> (csound.c:1917)
>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>> (csound_orc_compile.c:1649)
>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>> (csound.hpp:189)
>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>> ==14507==
>>>>>>> ==14507== Use of uninitialised value of size 8
>>>>>>> ==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
>>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>> (csound.c:1917)
>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>> (csound_orc_compile.c:1649)
>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>> (csound.hpp:189)
>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>> ==14507==
>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>> ==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
>>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>> (csound.c:1917)
>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>> (csound_orc_compile.c:1649)
>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>> (csound.hpp:189)
>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>> ==14507==
>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>> ==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>> (csound.c:1917)
>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>> (csound_orc_compile.c:1649)
>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>> (csound.hpp:189)
>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>> ==14507==
>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>> ==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>> (csound.c:1917)
>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>> (csound_orc_compile.c:1649)
>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>> (csound.hpp:189)
>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>> ==14507==
>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>> ==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>> (csound.c:1917)
>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>> (csound_orc_compile.c:1649)
>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>> (csound.hpp:189)
>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>> ==14507==
>>>>>>> passed
>>>>>>> 
>>>>>>> --Run Summary: Type      Total     Ran  Passed  Failed
>>>>>>>               suites        1       1     n/a       0
>>>>>>>               tests         1       1       1       0
>>>>>>>               asserts       0       0       0       0
>>>>>>> ==14507==
>>>>>>> ==14507== HEAP SUMMARY:
>>>>>>> ==14507==     in use at exit: 119,800 bytes in 1,877 blocks
>>>>>>> ==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156
>>>>>>> bytes allocated
>>>>>>> ==14507==
>>>>>>> ==14507== LEAK SUMMARY:
>>>>>>> ==14507==    definitely lost: 807 bytes in 9 blocks
>>>>>>> ==14507==    indirectly lost: 26,097 bytes in 386 blocks
>>>>>>> ==14507==      possibly lost: 42,993 bytes in 1,313 blocks
>>>>>>> ==14507==    still reachable: 49,903 bytes in 169 blocks
>>>>>>> ==14507==         suppressed: 0 bytes in 0 blocks
>>>>>>> ==14507== Rerun with --leak-check=full to see details of leaked memory
>>>>>>> ==14507==
>>>>>>> ==14507== For counts of detected and suppressed errors, rerun with: -v
>>>>>>> ==14507== Use --track-origins=yes to see where uninitialised values
>>>>>>> come from
>>>>>>> ==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2
>>>>>>> from 2)
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> Andrés
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins
>>>>>>>  wrote:
>>>>>>>> 
>>>>>>>> There definitely appears to be a bug in CsoundPerformanceThread. The
>>>>>>>> following program exhibits it on my PC. I see thge exact same stack trace in
>>>>>>>> CsoundQt and in a Lua version of this program.
>>>>>>>> 
>>>>>>>> #include "csound.hpp"
>>>>>>>> #include "csPerfThread.hpp"
>>>>>>>> 
>>>>>>>> int useThreads = true;
>>>>>>>> 
>>>>>>>> int main(int argc, char *argv[])
>>>>>>>> {
>>>>>>>>    Csound csound;
>>>>>>>>    csound.Compile(argc,argv);
>>>>>>>>    csound.Start();
>>>>>>>>    if (useThreads) {
>>>>>>>>        CsoundPerformanceThread
>>>>>>>> performanceThread(csound.GetCsound());
>>>>>>>>        performanceThread.Play();
>>>>>>>>        performanceThread.Join();
>>>>>>>>    } else {
>>>>>>>>        while (csound.PerformKsmps() == 0) {}
>>>>>>>>    }
>>>>>>>> }
>>>>>>>> 
>>>>>>>> Note that execution is perfect if useThreads is set to false.
>>>>>>>> 
>>>>>>>> The debugger output is:
>>>>>>>> 
>>>>>>>> gdb --args csperfthread.exe ../trapped.csd
>>>>>>>> NU gdb (GDB) 7.6
>>>>>>>> opyright (C) 2013 Free Software Foundation, Inc.
>>>>>>>> icense GPLv3+: GNU GPL version 3 or later
>>>>>>>> 
>>>>>>>> his is free software: you are free to change and redistribute it.
>>>>>>>> here is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>>>>> copying"
>>>>>>>> nd "show warranty" for details.
>>>>>>>> his GDB was configured as "i686-w64-mingw32".
>>>>>>>> or bug reporting instructions, please see:
>>>>>>>> http://www.gnu.org/software/gdb/bugs/>...
>>>>>>>> eading symbols from
>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
>>>>>>>> gdb) run
>>>>>>>> tarting program:
>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe
>>>>>>>> ../trapped.csd
>>>>>>>> New Thread 3552.0xea0]
>>>>>>>> irtual_keyboard real time MIDI plugin for Csound
>>>>>>>> dBFS level = 32768.0
>>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>>> ibsndfile-1.0.25
>>>>>>>> nifiedCSD:  ../trapped.csd
>>>>>>>> TARTING FILE
>>>>>>>> reating options
>>>>>>>> reating orchestra
>>>>>>>> reating score
>>>>>>>> taudio: PortAudio module enabled ...
>>>>>>>> sing callback interface
>>>>>>>> tmidi: PortMIDI module enabled
>>>>>>>> lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
>>>>>>>> orting score ...
>>>>>>>>       ... done
>>>>>>>> lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
>>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>>> isplays suppressed
>>>>>>>> dBFS level = 32768.0
>>>>>>>> rch now loaded
>>>>>>>> udio buffered in 4096 sample-frame blocks
>>>>>>>> riting 16384-byte blks of shorts to test.wav (WAV)
>>>>>>>> ECTION 1:
>>>>>>>> sound is already started, call csoundReset()
>>>>>>>> efore starting again
>>>>>>>> New Thread 3552.0x19fc]
>>>>>>>> table 1:
>>>>>>>> table 2:
>>>>>>>> table 3:
>>>>>>>> table 4:
>>>>>>>> table 5:
>>>>>>>> table 6:
>>>>>>>> table 7:
>>>>>>>> table 8:
>>>>>>>> table 9:
>>>>>>>> table 10:
>>>>>>>> table 11:
>>>>>>>> table 12:
>>>>>>>> table 13:
>>>>>>>> table 14:
>>>>>>>> table 15:
>>>>>>>> table 16:
>>>>>>>> table 17:
>>>>>>>> table 18:
>>>>>>>> table 19:
>>>>>>>> table 20:
>>>>>>>> table 21:
>>>>>>>> table 22:
>>>>>>>> ew alloc for instr 1:
>>>>>>>> ew alloc for instr 100:
>>>>>>>> 
>>>>>>>> rogram received signal SIGSEGV, Segmentation fault.
>>>>>>>> Switching to Thread 3552.0x19fc]
>>>>>>>> x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>> 06     }
>>>>>>>> gdb) bt
>>>>>>>> 0  0x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>> 1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at
>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>> 2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at
>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>> 3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at
>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>> 4  0x649458cb in pthread_create_wrapper () from
>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>> 5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>> 6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>> 7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>>> 8  0x7751bf39 in ?? ()
>>>>>>>> 9  0x7751bf0c in ?? ()
>>>>>>>> 10 0x00000000 in ?? ()
>>>>>>>> gdb)
>>>>>>>> 
>>>>>>>> 
>>>>>>>> ===========================
>>>>>>>> Michael Gogins
>>>>>>>> Irreducible Productions
>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins
>>>>>>>>  wrote:
>>>>>>>>> 
>>>>>>>>> I see that this is happening when CsoundEngine cleans up csound,
>>>>>>>>> stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist
>>>>>>>>> when CsoundQt wants to reference it?
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> ===========================
>>>>>>>>> Michael Gogins
>>>>>>>>> Irreducible Productions
>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini
>>>>>>>>>  wrote:
>>>>>>>>>> 
>>>>>>>>>> CsoundPerformanceThread is working perfectly from Python.
>>>>>>>>>> On 16 Aug 2013, at 12:29, Michael Gogins wrote:
>>>>>>>>>> 
>>>>>>>>>>> However, this backtrace seems to rule out CsoundPerformanceThread
>>>>>>>>>>> since this crash happens before the thread is created. This implies a bad
>>>>>>>>>>> write by CsoundQt itself.
>>>>>>>>>>> 
>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>    at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>>>> 1481        opcodeName = root->value->lexeme;
>>>>>>>>>>> (gdb) bt
>>>>>>>>>>> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>    at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>>>> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70,
>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>    at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
>>>>>>>>>>> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
>>>>>>>>>>> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0)
>>>>>>>>>>> at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
>>>>>>>>>>> #4  0x6c5d5985 in csoundCompileArgs
>>>>>>>>>>> (csound=csound@entry=0x17676a70, argc=4, argc@entry=5,
>>>>>>>>>>> argv=argv@entry=0x19bd2c18)
>>>>>>>>>>>    at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
>>>>>>>>>>> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5,
>>>>>>>>>>> argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
>>>>>>>>>>> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at
>>>>>>>>>>> src/csoundengine.cpp:779
>>>>>>>>>>> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188,
>>>>>>>>>>> options=0x1760ae70) at src/csoundengine.cpp:618
>>>>>>>>>>> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0,
>>>>>>>>>>> options=0x1760ae70) at src/basedocument.cpp:234
>>>>>>>>>>> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0,
>>>>>>>>>>> options=0x1760ae70) at src/documentpage.cpp:1203
>>>>>>>>>>> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true,
>>>>>>>>>>> index=4) at src/qutecsound.cpp:1387
>>>>>>>>>>> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8,
>>>>>>>>>>> _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at
>>>>>>>>>>> build/moc/moc_qutecsound.cpp:441
>>>>>>>>>>> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>>>> signalOffset=3, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>>>> kernel\qobject.cpp:3479
>>>>>>>>>>> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>>>> m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>>>> kernel\qobject.cpp:3354
>>>>>>>>>>> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true)
>>>>>>>>>>> at .moc/debug_shared/moc_qaction.cpp:356
>>>>>>>>>>> #15 0x0d933c4e in QAction::activate (this=0x1763f138,
>>>>>>>>>>> event=QAction::Trigger) at kernel\qaction.cpp:1175
>>>>>>>>>>> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at
>>>>>>>>>>> kernel/qaction.h:185
>>>>>>>>>>> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698)
>>>>>>>>>>> at widgets\qtoolbutton.cpp:948
>>>>>>>>>>> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8)
>>>>>>>>>>> at widgets\qabstractbutton.cpp:522
>>>>>>>>>>> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent
>>>>>>>>>>> (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
>>>>>>>>>>> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent
>>>>>>>>>>> (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
>>>>>>>>>>> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698,
>>>>>>>>>>> event=0x28d1d0) at kernel\qwidget.cpp:7877
>>>>>>>>>>> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698,
>>>>>>>>>>> e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
>>>>>>>>>>> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698,
>>>>>>>>>>> event=0x28d1d0) at widgets\qtoolbutton.cpp:964
>>>>>>>>>>> #24 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>>>> (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at
>>>>>>>>>>> kernel\qapplication.cpp:3455
>>>>>>>>>>> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c,
>>>>>>>>>>> receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
>>>>>>>>>>> #26 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>>>> (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at
>>>>>>>>>>> kernel\qcoreapplication.cpp:871
>>>>>>>>>>> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>>>> (receiver=0x1773c698, event=0x28d1d0)
>>>>>>>>>>>    at
>>>>>>>>>>> ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>>>> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent
>>>>>>>>>>> (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698,
>>>>>>>>>>> nativeWidget=0x2e3b9b8,
>>>>>>>>>>>    buttonDown=0xdf4e178 , lastMouseReceiver=...,
>>>>>>>>>>> spontaneous=true) at kernel\qapplication.cpp:2485
>>>>>>>>>>> #29 0x0d984219 in QWidgetWindow::handleMouseEvent
>>>>>>>>>>> (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
>>>>>>>>>>> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0,
>>>>>>>>>>> event=0x28d920) at kernel\qwidgetwindow.cpp:158
>>>>>>>>>>> #31 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>>>> (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at
>>>>>>>>>>> kernel\qapplication.cpp:3455
>>>>>>>>>>> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c,
>>>>>>>>>>> receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
>>>>>>>>>>> #33 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>>>> (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at
>>>>>>>>>>> kernel\qcoreapplication.cpp:871
>>>>>>>>>>> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>>>> (receiver=0x176391d0, event=0x28d920)
>>>>>>>>>>>    at
>>>>>>>>>>> ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>>>> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent
>>>>>>>>>>> (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
>>>>>>>>>>> #36 0x06849c5d in
>>>>>>>>>>> QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at
>>>>>>>>>>> kernel\qguiapplication.cpp:1262
>>>>>>>>>>> #37 0x06840790 in
>>>>>>>>>>> QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at
>>>>>>>>>>> kernel\qwindowsysteminterface.cpp:581
>>>>>>>>>>> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents
>>>>>>>>>>> (flags=...) at kernel\qwindowsysteminterface.cpp:561
>>>>>>>>>>> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents
>>>>>>>>>>> (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
>>>>>>>>>>> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025,
>>>>>>>>>>> wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
>>>>>>>>>>> #41 0x761c77d8 in gapfnScSendMessage () from
>>>>>>>>>>> C:\Windows\SysWOW64\user32.dll
>>>>>>>>>>> #42 0x003b040e in ?? ()
>>>>>>>>>>> #43 0x00000401 in ?? ()
>>>>>>>>>>> #44 0x00000000 in ?? ()
>>>>>>>>>>> (gdb)
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ===========================
>>>>>>>>>>> Michael Gogins
>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins
>>>>>>>>>>>  wrote:
>>>>>>>>>>> To rule out or in CsoundPerformanceThread, I will write a short
>>>>>>>>>>> C++ test program that uses it and run it with various csds. But I won't have
>>>>>>>>>>> time to do this until tonight.
>>>>>>>>>>> 
>>>>>>>>>>> Regards,
>>>>>>>>>>> Mike
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ===========================
>>>>>>>>>>> Michael Gogins
>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins
>>>>>>>>>>>  wrote:
>>>>>>>>>>> There are also lots of warnings about missing signals for slots
>>>>>>>>>>> in Qt. And missing properties.
>>>>>>>>>>> 
>>>>>>>>>>> Regards,
>>>>>>>>>>> Mike
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ===========================
>>>>>>>>>>> Michael Gogins
>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins
>>>>>>>>>>>  wrote:
>>>>>>>>>>> I've been seeing this for a day or so now, running CsoundQt with
>>>>>>>>>>> a variety of files, this with your test.cd:
>>>>>>>>>>> 
>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>> [Switching to Thread 6688.0x1590]
>>>>>>>>>>> 0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>>>> 106     }
>>>>>>>>>>> (gdb) bt
>>>>>>>>>>> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform
>>>>>>>>>>> (this=0x1922de30) at
>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>>>> #4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>>>> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>>>> #6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>>>> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>>>> #8  0x7751bf39 in ?? ()
>>>>>>>>>>> #9  0x7751bf0c in ?? ()
>>>>>>>>>>> #10 0x00000000 in ?? ()
>>>>>>>>>>> (gdb)
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ===========================
>>>>>>>>>>> Michael Gogins
>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins
>>>>>>>>>>>  wrote:
>>>>>>>>>>> I have just run this with head code for both Csound and CsoundQt.
>>>>>>>>>>> All is good with rendering with plain Csound. In CsoundQt all is good with
>>>>>>>>>>> rendering in the terminal. If I render to file in CsoundQt, it works once
>>>>>>>>>>> for each file, then hangs or crashes CsoundQt. If I render to audio in
>>>>>>>>>>> CsoundQt, it hangs or crashes the first time.
>>>>>>>>>>> 
>>>>>>>>>>> Did anyone try an empty csd?
>>>>>>>>>>> 
>>>>>>>>>>> If I run an empty csd in CsoundQt and render to terminal, all is
>>>>>>>>>>> fine. If I render to file in CsoundQt or render to audio in CsoundQt with an
>>>>>>>>>>> empty file, it hangs.
>>>>>>>>>>> 
>>>>>>>>>>> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's
>>>>>>>>>>> CsoundEngine are places to look for trouble.
>>>>>>>>>>> 
>>>>>>>>>>> I think it's pretty clear from this behavior across platforms
>>>>>>>>>>> that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious
>>>>>>>>>>> bug not specific to Windows. Behavior various however from machine to
>>>>>>>>>>> machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are
>>>>>>>>>>> corrupting Csound variables.
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> Regards,
>>>>>>>>>>> Mike
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ===========================
>>>>>>>>>>> Michael Gogins
>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz
>>>>>>>>>>>  wrote:
>>>>>>>>>>> hi -
>>>>>>>>>>> 
>>>>>>>>>>> i experience a somehow strange bug in csoundqt.
>>>>>>>>>>> 
>>>>>>>>>>> when i run StrayNumToFt.csd via the PLAY button, i get lots of
>>>>>>>>>>> errors:
>>>>>>>>>>> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>>>>>>>>> 
>>>>>>>>>>> when i run the same file as RUN IN TERM, it is fine (same from
>>>>>>>>>>> the command line).
>>>>>>>>>>> 
>>>>>>>>>>> when i run a very simple csd with strtod in csoundqt, i get no
>>>>>>>>>>> output at all (again no problem in "run in term").
>>>>>>>>>>> 
>>>>>>>>>>> this is with csound6 and csoundqt both from git, on ubuntu studio
>>>>>>>>>>> 12.04.
>>>>>>>>>>> 
>>>>>>>>>>> best -
>>>>>>>>>>> 
>>>>>>>>>>>        joachim
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>> 
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>> 
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>> 
>>>>>>>>>> Dr Victor Lazzarini
>>>>>>>>>> Senior Lecturer
>>>>>>>>>> Dept. of Music
>>>>>>>>>> NUI Maynooth Ireland
>>>>>>>>>> tel.: +353 1 708 3545
>>>>>>>>>> Victor dot Lazzarini AT nuim dot ie
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>> 
>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>> 
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>> 
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>> It's a free troubleshooting tool designed for production.
>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>> 
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>> It's a free troubleshooting tool designed for production.
>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>> Download for free and get started troubleshooting in minutes.
>>>>> 
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>> It's a free troubleshooting tool designed for production.
>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>> Download for free and get started troubleshooting in minutes.
>>>> 
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>> It's a free troubleshooting tool designed for production.
>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>> Download for free and get started troubleshooting in minutes.
>>> 
>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
> 
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead. 
> Download for free and get started troubleshooting in minutes. 
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

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





------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-17 20:44
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
Thanks Michael, I think the atomic builtin stuff is more for me to
know if I've broken something or not.  The C/Cxx flags was something I
just noticed in the Custom.cmake.ex and thought worth mentioning. It's
likely that neither are the cause of the issue you're having, but
figured worth trying.

On Sat, Aug 17, 2013 at 3:39 PM, Michael Gogins
 wrote:
> I have been making sure that the C and the C++ flags are the same all along.
>
> I have been using the builtin atomics for ages. There was never a problem
> before. But I will try as you suggest.
>
> Regards,
> Mike
>
>
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Sat, Aug 17, 2013 at 3:26 PM, Steven Yi  wrote:
>>
>> Hi Michael,
>>
>> I'm wondering, could you try a build with "-DUSE_ATOMIC_BUILTIN=0"?  I
>> just added that flag, and I'm wondering if that was not used at all on
>> Windows previously and now it might be and causing problems.  Also,
>> perhaps a longshot, maybe double check that any custom flags in
>> Custom.cmake are applied to both CMAKE_C_FLAGS as well as
>> CMAKE_CXX_FLAGS.
>>
>> steven
>>
>> On Sat, Aug 17, 2013 at 2:46 PM, Michael Gogins
>>  wrote:
>> > At the moment I have no access to a Linux computer, so I cannot use
>> > valgrind. Can you try it on Windows?
>> >
>> > Regards,
>> > Mike
>> >
>> >
>> >
>> >
>> > ===========================
>> > Michael Gogins
>> > Irreducible Productions
>> > http://michaelgogins.tumblr.com
>> > Michael dot Gogins at gmail dot com
>> >
>> >
>> > On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera 
>> > wrote:
>> >>
>> >> OK, so it's a perfThread issue then. Can you run it with valgrind?
>> >>
>> >> Cheers,
>> >> Andrés
>> >>
>> >>
>> >> On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins
>> >>  wrote:
>> >>>
>> >>> Here's what it does (exactly the same thing as with my example):
>> >>>
>> >>> $ gdb tests/c/testPerfThread.exe
>> >>> GNU gdb (GDB) 7.6
>> >>> Copyright (C) 2013 Free Software Foundation, Inc.
>> >>> License GPLv3+: GNU GPL version 3 or later
>> >>> 
>> >>> This is free software: you are free to change and redistribute it.
>> >>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>> >>> copying"
>> >>> and "show warranty" for details.
>> >>> This GDB was configured as "i686-w64-mingw32".
>> >>> For bug reporting instructions, please see:
>> >>> ...
>> >>> Reading symbols from
>> >>>
>> >>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
>> >>> (gdb) run
>> >>> Starting program:
>> >>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
>> >>> [New Thread 3892.0x20]
>> >>>
>> >>>
>> >>>      CUnit - A unit testing framework for C - Version 2.1-2
>> >>>      http://cunit.sourceforge.net/
>> >>>
>> >>>
>> >>> Suite: perfthread tests
>> >>>   Test: Test Performance Thread ...virtual_keyboard real time MIDI
>> >>> plugin
>> >>> for Csound
>> >>> 0dBFS level = 32768.0
>> >>> Csound version 6.00.1 (double samples) Aug 16 2013
>> >>> libsndfile-1.0.25
>> >>> rtaudio: PortAudio module enabled ...
>> >>> using callback interface
>> >>> rtmidi: PortMIDI module enabled
>> >>> Csound version 6.00.1 (double samples) Aug 16 2013
>> >>> graphics suppressed, ascii substituted
>> >>> 0dBFS level = 32768.0
>> >>> orch now loaded
>> >>> audio buffered in 4096 sample-frame blocks
>> >>> [New Thread 3892.0x78c]
>> >>> [New Thread 3892.0xe24]
>> >>> [New Thread 3892.0xf28]
>> >>> [New Thread 3892.0x460]
>> >>> [New Thread 3892.0x1258]
>> >>> [New Thread 3892.0x14a0]
>> >>> [New Thread 3892.0xcdc]
>> >>> warning: FFUsb2Asio::FFUsb2Asio()
>> >>>
>> >>> warning: FFUsb2Asio::init()
>> >>>
>> >>> warning: FFUsb2Asio::init() : no available filters found
>> >>> warning:
>> >>>
>> >>> warning: +FFUsb2Asio::~FFUsb2Asio()
>> >>>
>> >>> warning: FFUsb2Asio::stop()
>> >>>
>> >>> warning: FFUsb2Asio::disposeBuffers()
>> >>>
>> >>> warning: -FFUsb2Asio::~FFUsb2Asio()
>> >>>
>> >>> warning: FFUsb2Asio::FFUsb2Asio()
>> >>>
>> >>> PortAudio V19-devel (built Jul 31 2013 12:17:21)
>> >>>    0: dac0 (Microsoft Sound Mapper - Output)
>> >>>    1: dac1 (Speakers (EDIROL UA-25EX))
>> >>>    2: dac2 (Speakers (VIA High Definition A)
>> >>>    3: dac3 (SPDIF Interface (TX0) (VIA High)
>> >>>    4: dac4 (Primary Sound Driver)
>> >>>    5: dac5 (Speakers (EDIROL UA-25EX))
>> >>>    6: dac6 (Speakers (VIA High Definition Audio))
>> >>>    7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
>> >>> PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
>> >>> [New Thread 3892.0x1600]
>> >>> [New Thread 3892.0x1764]
>> >>> [New Thread 3892.0x1378]
>> >>> writing 4096 sample blks of 64-bit floats to dac
>> >>> SECTION 1:
>> >>> [New Thread 3892.0x11e8]
>> >>> new alloc for instr 1:
>> >>>
>> >>> Program received signal SIGSEGV, Segmentation fault.
>> >>> [Switching to Thread 3892.0x11e8]
>> >>> 0x6c51ff83 in spoutsf (csound=0x430048) at
>> >>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>> >>> 106     }
>> >>> (gdb) bt
>> >>> #0  0x6c51ff83 in spoutsf (csound=0x430048) at
>> >>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>> >>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at
>> >>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>> >>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at
>> >>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>> >>> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at
>> >>>
>> >>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>> >>> #4  0x649458cb in pthread_create_wrapper () from
>> >>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>> >>> #5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>> >>> #6  0x74f89147 in msvcrt!iswalnum () from
>> >>> C:\Windows\SysWOW64\msvcrt.dll
>> >>> #7  0x7710850d in KERNEL32!BaseThreadInitThunk () from
>> >>> C:\Windows\SysWOW64\kernel32.dll
>> >>> #8  0x778bbf39 in ?? ()
>> >>> #9  0x778bbf0c in ?? ()
>> >>> #10 0x00000000 in ?? ()
>> >>> (gdb)
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ===========================
>> >>> Michael Gogins
>> >>> Irreducible Productions
>> >>> http://michaelgogins.tumblr.com
>> >>> Michael dot Gogins at gmail dot com
>> >>>
>> >>>
>> >>> On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera
>> >>> 
>> >>> wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> Sorry, had not pushed. It's there now. It's nearly the same example
>> >>>> you
>> >>>> posted.
>> >>>>
>> >>>> Cheers,
>> >>>> Andrés
>> >>>>
>> >>>>
>> >>>> On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins
>> >>>>  wrote:
>> >>>>>
>> >>>>> I do not pull this test. Is it in the develop branch?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>>
>> >>>>> ===========================
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>>
>> >>>>>
>> >>>>> On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera
>> >>>>>  wrote:
>> >>>>>>
>> >>>>>> Hi,
>> >>>>>>
>> >>>>>> I've added a test in the tests directory for the performance
>> >>>>>> thread,
>> >>>>>> and it seems OK there. Although there are some issues reported by
>> >>>>>> valgrind,
>> >>>>>> I don't think these are the ones causing the reported problem.
>> >>>>>>
>> >>>>>> src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
>> >>>>>> ==14507== Memcheck, a memory error detector
>> >>>>>> ==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward
>> >>>>>> et
>> >>>>>> al.
>> >>>>>> ==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for
>> >>>>>> copyright
>> >>>>>> info
>> >>>>>> ==14507== Command: ./testPerfThread
>> >>>>>> ==14507==
>> >>>>>>
>> >>>>>>
>> >>>>>>      CUnit - A Unit testing framework for C - Version 2.1-0
>> >>>>>>      http://cunit.sourceforge.net/
>> >>>>>>
>> >>>>>>
>> >>>>>> Suite: perfthread tests
>> >>>>>>   Test: Test Performance Thread ...
>> >>>>>> ==14507== Conditional jump or move depends on uninitialised
>> >>>>>> value(s)
>> >>>>>> ==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
>> >>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>> >>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>> >>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>> >>>>>> (csound.c:1917)
>> >>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>> >>>>>> ==14507==    by 0x50A7024: print_tree_xml
>> >>>>>> (csound_orc_semantics.c:2230)
>> >>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>> >>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>> >>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>> >>>>>> (csound_orc_compile.c:1649)
>> >>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>> >>>>>> (csound.hpp:189)
>> >>>>>> ==14507==    by 0x4065AC: test_perfthread()
>> >>>>>> (perfthread_test.cpp:27)
>> >>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>> >>>>>> ==14507==
>> >>>>>> ==14507== Use of uninitialised value of size 8
>> >>>>>> ==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
>> >>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>> >>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>> >>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>> >>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>> >>>>>> (csound.c:1917)
>> >>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>> >>>>>> ==14507==    by 0x50A7024: print_tree_xml
>> >>>>>> (csound_orc_semantics.c:2230)
>> >>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>> >>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>> >>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>> >>>>>> (csound_orc_compile.c:1649)
>> >>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>> >>>>>> (csound.hpp:189)
>> >>>>>> ==14507==    by 0x4065AC: test_perfthread()
>> >>>>>> (perfthread_test.cpp:27)
>> >>>>>> ==14507==
>> >>>>>> ==14507== Conditional jump or move depends on uninitialised
>> >>>>>> value(s)
>> >>>>>> ==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
>> >>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>> >>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>> >>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>> >>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>> >>>>>> (csound.c:1917)
>> >>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>> >>>>>> ==14507==    by 0x50A7024: print_tree_xml
>> >>>>>> (csound_orc_semantics.c:2230)
>> >>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>> >>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>> >>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>> >>>>>> (csound_orc_compile.c:1649)
>> >>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>> >>>>>> (csound.hpp:189)
>> >>>>>> ==14507==    by 0x4065AC: test_perfthread()
>> >>>>>> (perfthread_test.cpp:27)
>> >>>>>> ==14507==
>> >>>>>> ==14507== Conditional jump or move depends on uninitialised
>> >>>>>> value(s)
>> >>>>>> ==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
>> >>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>> >>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>> >>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>> >>>>>> (csound.c:1917)
>> >>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>> >>>>>> ==14507==    by 0x50A7024: print_tree_xml
>> >>>>>> (csound_orc_semantics.c:2230)
>> >>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>> >>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>> >>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>> >>>>>> (csound_orc_compile.c:1649)
>> >>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>> >>>>>> (csound.hpp:189)
>> >>>>>> ==14507==    by 0x4065AC: test_perfthread()
>> >>>>>> (perfthread_test.cpp:27)
>> >>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>> >>>>>> ==14507==
>> >>>>>> ==14507== Conditional jump or move depends on uninitialised
>> >>>>>> value(s)
>> >>>>>> ==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
>> >>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>> >>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>> >>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>> >>>>>> (csound.c:1917)
>> >>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>> >>>>>> ==14507==    by 0x50A7024: print_tree_xml
>> >>>>>> (csound_orc_semantics.c:2230)
>> >>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>> >>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>> >>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>> >>>>>> (csound_orc_compile.c:1649)
>> >>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>> >>>>>> (csound.hpp:189)
>> >>>>>> ==14507==    by 0x4065AC: test_perfthread()
>> >>>>>> (perfthread_test.cpp:27)
>> >>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>> >>>>>> ==14507==
>> >>>>>> ==14507== Conditional jump or move depends on uninitialised
>> >>>>>> value(s)
>> >>>>>> ==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
>> >>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>> >>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>> >>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>> >>>>>> (csound.c:1917)
>> >>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>> >>>>>> ==14507==    by 0x50A7024: print_tree_xml
>> >>>>>> (csound_orc_semantics.c:2230)
>> >>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>> >>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>> >>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>> >>>>>> (csound_orc_compile.c:1649)
>> >>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>> >>>>>> (csound.hpp:189)
>> >>>>>> ==14507==    by 0x4065AC: test_perfthread()
>> >>>>>> (perfthread_test.cpp:27)
>> >>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>> >>>>>> ==14507==
>> >>>>>> passed
>> >>>>>>
>> >>>>>> --Run Summary: Type      Total     Ran  Passed  Failed
>> >>>>>>                suites        1       1     n/a       0
>> >>>>>>                tests         1       1       1       0
>> >>>>>>                asserts       0       0       0       0
>> >>>>>> ==14507==
>> >>>>>> ==14507== HEAP SUMMARY:
>> >>>>>> ==14507==     in use at exit: 119,800 bytes in 1,877 blocks
>> >>>>>> ==14507==   total heap usage: 21,527 allocs, 19,650 frees,
>> >>>>>> 1,910,156
>> >>>>>> bytes allocated
>> >>>>>> ==14507==
>> >>>>>> ==14507== LEAK SUMMARY:
>> >>>>>> ==14507==    definitely lost: 807 bytes in 9 blocks
>> >>>>>> ==14507==    indirectly lost: 26,097 bytes in 386 blocks
>> >>>>>> ==14507==      possibly lost: 42,993 bytes in 1,313 blocks
>> >>>>>> ==14507==    still reachable: 49,903 bytes in 169 blocks
>> >>>>>> ==14507==         suppressed: 0 bytes in 0 blocks
>> >>>>>> ==14507== Rerun with --leak-check=full to see details of leaked
>> >>>>>> memory
>> >>>>>> ==14507==
>> >>>>>> ==14507== For counts of detected and suppressed errors, rerun with:
>> >>>>>> -v
>> >>>>>> ==14507== Use --track-origins=yes to see where uninitialised values
>> >>>>>> come from
>> >>>>>> ==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2
>> >>>>>> from 2)
>> >>>>>>
>> >>>>>> Cheers,
>> >>>>>> Andrés
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins
>> >>>>>>  wrote:
>> >>>>>>>
>> >>>>>>> There definitely appears to be a bug in CsoundPerformanceThread.
>> >>>>>>> The
>> >>>>>>> following program exhibits it on my PC. I see thge exact same
>> >>>>>>> stack trace in
>> >>>>>>> CsoundQt and in a Lua version of this program.
>> >>>>>>>
>> >>>>>>> #include "csound.hpp"
>> >>>>>>> #include "csPerfThread.hpp"
>> >>>>>>>
>> >>>>>>> int useThreads = true;
>> >>>>>>>
>> >>>>>>> int main(int argc, char *argv[])
>> >>>>>>> {
>> >>>>>>>     Csound csound;
>> >>>>>>>     csound.Compile(argc,argv);
>> >>>>>>>     csound.Start();
>> >>>>>>>     if (useThreads) {
>> >>>>>>>         CsoundPerformanceThread
>> >>>>>>> performanceThread(csound.GetCsound());
>> >>>>>>>         performanceThread.Play();
>> >>>>>>>         performanceThread.Join();
>> >>>>>>>     } else {
>> >>>>>>>         while (csound.PerformKsmps() == 0) {}
>> >>>>>>>     }
>> >>>>>>>  }
>> >>>>>>>
>> >>>>>>> Note that execution is perfect if useThreads is set to false.
>> >>>>>>>
>> >>>>>>> The debugger output is:
>> >>>>>>>
>> >>>>>>>  gdb --args csperfthread.exe ../trapped.csd
>> >>>>>>> NU gdb (GDB) 7.6
>> >>>>>>> opyright (C) 2013 Free Software Foundation, Inc.
>> >>>>>>> icense GPLv3+: GNU GPL version 3 or later
>> >>>>>>> 
>> >>>>>>> his is free software: you are free to change and redistribute it.
>> >>>>>>> here is NO WARRANTY, to the extent permitted by law.  Type "show
>> >>>>>>> copying"
>> >>>>>>> nd "show warranty" for details.
>> >>>>>>> his GDB was configured as "i686-w64-mingw32".
>> >>>>>>> or bug reporting instructions, please see:
>> >>>>>>> http://www.gnu.org/software/gdb/bugs/>...
>> >>>>>>> eading symbols from
>> >>>>>>>
>> >>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
>> >>>>>>> gdb) run
>> >>>>>>> tarting program:
>> >>>>>>>
>> >>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe
>> >>>>>>> ../trapped.csd
>> >>>>>>> New Thread 3552.0xea0]
>> >>>>>>> irtual_keyboard real time MIDI plugin for Csound
>> >>>>>>> dBFS level = 32768.0
>> >>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>> >>>>>>> ibsndfile-1.0.25
>> >>>>>>> nifiedCSD:  ../trapped.csd
>> >>>>>>> TARTING FILE
>> >>>>>>> reating options
>> >>>>>>> reating orchestra
>> >>>>>>> reating score
>> >>>>>>> taudio: PortAudio module enabled ...
>> >>>>>>> sing callback interface
>> >>>>>>> tmidi: PortMIDI module enabled
>> >>>>>>> lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
>> >>>>>>> orting score ...
>> >>>>>>>        ... done
>> >>>>>>> lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
>> >>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>> >>>>>>> isplays suppressed
>> >>>>>>> dBFS level = 32768.0
>> >>>>>>> rch now loaded
>> >>>>>>> udio buffered in 4096 sample-frame blocks
>> >>>>>>> riting 16384-byte blks of shorts to test.wav (WAV)
>> >>>>>>> ECTION 1:
>> >>>>>>> sound is already started, call csoundReset()
>> >>>>>>> efore starting again
>> >>>>>>> New Thread 3552.0x19fc]
>> >>>>>>> table 1:
>> >>>>>>> table 2:
>> >>>>>>> table 3:
>> >>>>>>> table 4:
>> >>>>>>> table 5:
>> >>>>>>> table 6:
>> >>>>>>> table 7:
>> >>>>>>> table 8:
>> >>>>>>> table 9:
>> >>>>>>> table 10:
>> >>>>>>> table 11:
>> >>>>>>> table 12:
>> >>>>>>> table 13:
>> >>>>>>> table 14:
>> >>>>>>> table 15:
>> >>>>>>> table 16:
>> >>>>>>> table 17:
>> >>>>>>> table 18:
>> >>>>>>> table 19:
>> >>>>>>> table 20:
>> >>>>>>> table 21:
>> >>>>>>> table 22:
>> >>>>>>> ew alloc for instr 1:
>> >>>>>>> ew alloc for instr 100:
>> >>>>>>>
>> >>>>>>> rogram received signal SIGSEGV, Segmentation fault.
>> >>>>>>> Switching to Thread 3552.0x19fc]
>> >>>>>>> x6c51ff83 in spoutsf (csound=0x660048) at
>> >>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>> >>>>>>> 06     }
>> >>>>>>> gdb) bt
>> >>>>>>> 0  0x6c51ff83 in spoutsf (csound=0x660048) at
>> >>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>> >>>>>>> 1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at
>> >>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>> >>>>>>> 2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at
>> >>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>> >>>>>>> 3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60)
>> >>>>>>> at
>> >>>>>>>
>> >>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>> >>>>>>> 4  0x649458cb in pthread_create_wrapper () from
>> >>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>> >>>>>>> 5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>> >>>>>>> 6  0x77349147 in msvcrt!iswalnum () from
>> >>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>> >>>>>>> 7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>> >>>>>>> C:\Windows\SysWOW64\kernel32.dll
>> >>>>>>> 8  0x7751bf39 in ?? ()
>> >>>>>>> 9  0x7751bf0c in ?? ()
>> >>>>>>> 10 0x00000000 in ?? ()
>> >>>>>>> gdb)
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> ===========================
>> >>>>>>> Michael Gogins
>> >>>>>>> Irreducible Productions
>> >>>>>>> http://michaelgogins.tumblr.com
>> >>>>>>> Michael dot Gogins at gmail dot com
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins
>> >>>>>>>  wrote:
>> >>>>>>>>
>> >>>>>>>> I see that this is happening when CsoundEngine cleans up csound,
>> >>>>>>>> stack frame 12. Maybe Csound has cleaned up stuff so that it
>> >>>>>>>> doesn't exist
>> >>>>>>>> when CsoundQt wants to reference it?
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> ===========================
>> >>>>>>>> Michael Gogins
>> >>>>>>>> Irreducible Productions
>> >>>>>>>> http://michaelgogins.tumblr.com
>> >>>>>>>> Michael dot Gogins at gmail dot com
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini
>> >>>>>>>>  wrote:
>> >>>>>>>>>
>> >>>>>>>>> CsoundPerformanceThread is working perfectly from Python.
>> >>>>>>>>> On 16 Aug 2013, at 12:29, Michael Gogins wrote:
>> >>>>>>>>>
>> >>>>>>>>> > However, this backtrace seems to rule out
>> >>>>>>>>> > CsoundPerformanceThread
>> >>>>>>>>> > since this crash happens before the thread is created. This
>> >>>>>>>>> > implies a bad
>> >>>>>>>>> > write by CsoundQt itself.
>> >>>>>>>>> >
>> >>>>>>>>> > Program received signal SIGSEGV, Segmentation fault.
>> >>>>>>>>> > 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>> >>>>>>>>> > root=root@entry=0x19424448,
>> >>>>>>>>> > typeTable=typeTable@entry=0x194244c0)
>> >>>>>>>>> >     at
>> >>>>>>>>> >
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>> >>>>>>>>> > 1481        opcodeName = root->value->lexeme;
>> >>>>>>>>> > (gdb) bt
>> >>>>>>>>> > #0  0x6c64dd28 in verify_opcode
>> >>>>>>>>> > (csound=csound@entry=0x17676a70,
>> >>>>>>>>> > root=root@entry=0x19424448,
>> >>>>>>>>> > typeTable=typeTable@entry=0x194244c0)
>> >>>>>>>>> >     at
>> >>>>>>>>> >
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>> >>>>>>>>> > #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70,
>> >>>>>>>>> > root=root@entry=0x19424448,
>> >>>>>>>>> > typeTable=typeTable@entry=0x194244c0)
>> >>>>>>>>> >     at
>> >>>>>>>>> >
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
>> >>>>>>>>> > #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0)
>> >>>>>>>>> > at
>> >>>>>>>>> >
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
>> >>>>>>>>> > #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70,
>> >>>>>>>>> > str=0x0)
>> >>>>>>>>> > at
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
>> >>>>>>>>> > #4  0x6c5d5985 in csoundCompileArgs
>> >>>>>>>>> > (csound=csound@entry=0x17676a70, argc=4, argc@entry=5,
>> >>>>>>>>> > argv=argv@entry=0x19bd2c18)
>> >>>>>>>>> >     at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
>> >>>>>>>>> > #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5,
>> >>>>>>>>> > argv=0x19bd2c18) at
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
>> >>>>>>>>> > #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at
>> >>>>>>>>> > src/csoundengine.cpp:779
>> >>>>>>>>> > #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188,
>> >>>>>>>>> > options=0x1760ae70) at src/csoundengine.cpp:618
>> >>>>>>>>> > #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0,
>> >>>>>>>>> > options=0x1760ae70) at src/basedocument.cpp:234
>> >>>>>>>>> > #9  0x0041c26e in DocumentPage::play (this=0x18608ae0,
>> >>>>>>>>> > options=0x1760ae70) at src/documentpage.cpp:1203
>> >>>>>>>>> > #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8,
>> >>>>>>>>> > realtime=true,
>> >>>>>>>>> > index=4) at src/qutecsound.cpp:1387
>> >>>>>>>>> > #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8,
>> >>>>>>>>> > _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at
>> >>>>>>>>> > build/moc/moc_qutecsound.cpp:441
>> >>>>>>>>> > #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138,
>> >>>>>>>>> > signalOffset=3, local_signal_index=1, argv=0x28c8e8) at
>> >>>>>>>>> > kernel\qobject.cpp:3479
>> >>>>>>>>> > #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138,
>> >>>>>>>>> > m=0xdd50000 <_data_start__>, local_signal_index=1,
>> >>>>>>>>> > argv=0x28c8e8) at
>> >>>>>>>>> > kernel\qobject.cpp:3354
>> >>>>>>>>> > #14 0x0d934699 in QAction::triggered (this=0x1763f138,
>> >>>>>>>>> > _t1=true)
>> >>>>>>>>> > at .moc/debug_shared/moc_qaction.cpp:356
>> >>>>>>>>> > #15 0x0d933c4e in QAction::activate (this=0x1763f138,
>> >>>>>>>>> > event=QAction::Trigger) at kernel\qaction.cpp:1175
>> >>>>>>>>> > #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at
>> >>>>>>>>> > kernel/qaction.h:185
>> >>>>>>>>> > #17 0x0dade681 in QToolButton::nextCheckState
>> >>>>>>>>> > (this=0x1773c698)
>> >>>>>>>>> > at widgets\qtoolbutton.cpp:948
>> >>>>>>>>> > #18 0x0da29692 in QAbstractButtonPrivate::click
>> >>>>>>>>> > (this=0x1773c6c8)
>> >>>>>>>>> > at widgets\qabstractbutton.cpp:522
>> >>>>>>>>> > #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent
>> >>>>>>>>> > (this=0x1773c698, e=0x28d1d0) at
>> >>>>>>>>> > widgets\qabstractbutton.cpp:1124
>> >>>>>>>>> > #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent
>> >>>>>>>>> > (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
>> >>>>>>>>> > #21 0x0d96d1b9 in QWidget::event (this=0x1773c698,
>> >>>>>>>>> > event=0x28d1d0) at kernel\qwidget.cpp:7877
>> >>>>>>>>> > #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698,
>> >>>>>>>>> > e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
>> >>>>>>>>> > #23 0x0dade6e6 in QToolButton::event (this=0x1773c698,
>> >>>>>>>>> > event=0x28d1d0) at widgets\qtoolbutton.cpp:964
>> >>>>>>>>> > #24 0x0d93db21 in QApplicationPrivate::notify_helper
>> >>>>>>>>> > (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at
>> >>>>>>>>> > kernel\qapplication.cpp:3455
>> >>>>>>>>> > #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c,
>> >>>>>>>>> > receiver=0x1773c698, e=0x28d1d0) at
>> >>>>>>>>> > kernel\qapplication.cpp:2991
>> >>>>>>>>> > #26 0x031d9dce in QCoreApplication::notifyInternal
>> >>>>>>>>> > (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at
>> >>>>>>>>> > kernel\qcoreapplication.cpp:871
>> >>>>>>>>> > #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent
>> >>>>>>>>> > (receiver=0x1773c698, event=0x28d1d0)
>> >>>>>>>>> >     at
>> >>>>>>>>> >
>> >>>>>>>>> > ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>> >>>>>>>>> > #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent
>> >>>>>>>>> > (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698,
>> >>>>>>>>> > nativeWidget=0x2e3b9b8,
>> >>>>>>>>> >     buttonDown=0xdf4e178 ,
>> >>>>>>>>> > lastMouseReceiver=...,
>> >>>>>>>>> > spontaneous=true) at kernel\qapplication.cpp:2485
>> >>>>>>>>> > #29 0x0d984219 in QWidgetWindow::handleMouseEvent
>> >>>>>>>>> > (this=0x176391d0, event=0x28d920) at
>> >>>>>>>>> > kernel\qwidgetwindow.cpp:464
>> >>>>>>>>> > #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0,
>> >>>>>>>>> > event=0x28d920) at kernel\qwidgetwindow.cpp:158
>> >>>>>>>>> > #31 0x0d93db21 in QApplicationPrivate::notify_helper
>> >>>>>>>>> > (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at
>> >>>>>>>>> > kernel\qapplication.cpp:3455
>> >>>>>>>>> > #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c,
>> >>>>>>>>> > receiver=0x176391d0, e=0x28d920) at
>> >>>>>>>>> > kernel\qapplication.cpp:2876
>> >>>>>>>>> > #33 0x031d9dce in QCoreApplication::notifyInternal
>> >>>>>>>>> > (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at
>> >>>>>>>>> > kernel\qcoreapplication.cpp:871
>> >>>>>>>>> > #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent
>> >>>>>>>>> > (receiver=0x176391d0, event=0x28d920)
>> >>>>>>>>> >     at
>> >>>>>>>>> >
>> >>>>>>>>> > ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>> >>>>>>>>> > #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent
>> >>>>>>>>> > (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
>> >>>>>>>>> > #36 0x06849c5d in
>> >>>>>>>>> > QGuiApplicationPrivate::processWindowSystemEvent
>> >>>>>>>>> > (e=0x1946fa88) at
>> >>>>>>>>> > kernel\qguiapplication.cpp:1262
>> >>>>>>>>> > #37 0x06840790 in
>> >>>>>>>>> > QWindowSystemInterface::sendWindowSystemEventsImplementation
>> >>>>>>>>> > (flags=...) at
>> >>>>>>>>> > kernel\qwindowsysteminterface.cpp:581
>> >>>>>>>>> > #38 0x0684071d in
>> >>>>>>>>> > QWindowSystemInterface::sendWindowSystemEvents
>> >>>>>>>>> > (flags=...) at kernel\qwindowsysteminterface.cpp:561
>> >>>>>>>>> > #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents
>> >>>>>>>>> > (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
>> >>>>>>>>> > #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e,
>> >>>>>>>>> > message=1025,
>> >>>>>>>>> > wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
>> >>>>>>>>> > #41 0x761c77d8 in gapfnScSendMessage () from
>> >>>>>>>>> > C:\Windows\SysWOW64\user32.dll
>> >>>>>>>>> > #42 0x003b040e in ?? ()
>> >>>>>>>>> > #43 0x00000401 in ?? ()
>> >>>>>>>>> > #44 0x00000000 in ?? ()
>> >>>>>>>>> > (gdb)
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ===========================
>> >>>>>>>>> > Michael Gogins
>> >>>>>>>>> > Irreducible Productions
>> >>>>>>>>> > http://michaelgogins.tumblr.com
>> >>>>>>>>> > Michael dot Gogins at gmail dot com
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins
>> >>>>>>>>> >  wrote:
>> >>>>>>>>> > To rule out or in CsoundPerformanceThread, I will write a
>> >>>>>>>>> > short
>> >>>>>>>>> > C++ test program that uses it and run it with various csds.
>> >>>>>>>>> > But I won't have
>> >>>>>>>>> > time to do this until tonight.
>> >>>>>>>>> >
>> >>>>>>>>> > Regards,
>> >>>>>>>>> > Mike
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ===========================
>> >>>>>>>>> > Michael Gogins
>> >>>>>>>>> > Irreducible Productions
>> >>>>>>>>> > http://michaelgogins.tumblr.com
>> >>>>>>>>> > Michael dot Gogins at gmail dot com
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins
>> >>>>>>>>> >  wrote:
>> >>>>>>>>> > There are also lots of warnings about missing signals for
>> >>>>>>>>> > slots
>> >>>>>>>>> > in Qt. And missing properties.
>> >>>>>>>>> >
>> >>>>>>>>> > Regards,
>> >>>>>>>>> > Mike
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ===========================
>> >>>>>>>>> > Michael Gogins
>> >>>>>>>>> > Irreducible Productions
>> >>>>>>>>> > http://michaelgogins.tumblr.com
>> >>>>>>>>> > Michael dot Gogins at gmail dot com
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins
>> >>>>>>>>> >  wrote:
>> >>>>>>>>> > I've been seeing this for a day or so now, running CsoundQt
>> >>>>>>>>> > with
>> >>>>>>>>> > a variety of files, this with your test.cd:
>> >>>>>>>>> >
>> >>>>>>>>> > Program received signal SIGSEGV, Segmentation fault.
>> >>>>>>>>> > [Switching to Thread 6688.0x1590]
>> >>>>>>>>> > 0x6c51ff83 in spoutsf (csound=0x1733a388) at
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>> >>>>>>>>> > 106     }
>> >>>>>>>>> > (gdb) bt
>> >>>>>>>>> > #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>> >>>>>>>>> > #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>> >>>>>>>>> > #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>> >>>>>>>>> > #3  0x6b8895ee in CsoundPerformanceThread::Perform
>> >>>>>>>>> > (this=0x1922de30) at
>> >>>>>>>>> >
>> >>>>>>>>> > c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>> >>>>>>>>> > #4  0x649458cb in pthread_create_wrapper () from
>> >>>>>>>>> > c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>> >>>>>>>>> > #5  0x7734906a in ui64tow () from
>> >>>>>>>>> > C:\Windows\SysWOW64\msvcrt.dll
>> >>>>>>>>> > #6  0x77349147 in msvcrt!iswalnum () from
>> >>>>>>>>> > C:\Windows\SysWOW64\msvcrt.dll
>> >>>>>>>>> > #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>> >>>>>>>>> > C:\Windows\SysWOW64\kernel32.dll
>> >>>>>>>>> > #8  0x7751bf39 in ?? ()
>> >>>>>>>>> > #9  0x7751bf0c in ?? ()
>> >>>>>>>>> > #10 0x00000000 in ?? ()
>> >>>>>>>>> > (gdb)
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ===========================
>> >>>>>>>>> > Michael Gogins
>> >>>>>>>>> > Irreducible Productions
>> >>>>>>>>> > http://michaelgogins.tumblr.com
>> >>>>>>>>> > Michael dot Gogins at gmail dot com
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins
>> >>>>>>>>> >  wrote:
>> >>>>>>>>> > I have just run this with head code for both Csound and
>> >>>>>>>>> > CsoundQt.
>> >>>>>>>>> > All is good with rendering with plain Csound. In CsoundQt all
>> >>>>>>>>> > is good with
>> >>>>>>>>> > rendering in the terminal. If I render to file in CsoundQt, it
>> >>>>>>>>> > works once
>> >>>>>>>>> > for each file, then hangs or crashes CsoundQt. If I render to
>> >>>>>>>>> > audio in
>> >>>>>>>>> > CsoundQt, it hangs or crashes the first time.
>> >>>>>>>>> >
>> >>>>>>>>> > Did anyone try an empty csd?
>> >>>>>>>>> >
>> >>>>>>>>> > If I run an empty csd in CsoundQt and render to terminal, all
>> >>>>>>>>> > is
>> >>>>>>>>> > fine. If I render to file in CsoundQt or render to audio in
>> >>>>>>>>> > CsoundQt with an
>> >>>>>>>>> > empty file, it hangs.
>> >>>>>>>>> >
>> >>>>>>>>> > CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's
>> >>>>>>>>> > CsoundEngine are places to look for trouble.
>> >>>>>>>>> >
>> >>>>>>>>> > I think it's pretty clear from this behavior across platforms
>> >>>>>>>>> > that current CsoundPerformanceThread or CsoundQt for Csound 6
>> >>>>>>>>> > has a serious
>> >>>>>>>>> > bug not specific to Windows. Behavior various however from
>> >>>>>>>>> > machine to
>> >>>>>>>>> > machine. I suspect that bad CsoundPerformanceThread or
>> >>>>>>>>> > CsoundQt writes are
>> >>>>>>>>> > corrupting Csound variables.
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > Regards,
>> >>>>>>>>> > Mike
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ===========================
>> >>>>>>>>> > Michael Gogins
>> >>>>>>>>> > Irreducible Productions
>> >>>>>>>>> > http://michaelgogins.tumblr.com
>> >>>>>>>>> > Michael dot Gogins at gmail dot com
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz
>> >>>>>>>>> >  wrote:
>> >>>>>>>>> > hi -
>> >>>>>>>>> >
>> >>>>>>>>> > i experience a somehow strange bug in csoundqt.
>> >>>>>>>>> >
>> >>>>>>>>> > when i run StrayNumToFt.csd via the PLAY button, i get lots of
>> >>>>>>>>> > errors:
>> >>>>>>>>> > INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid
>> >>>>>>>>> > format
>> >>>>>>>>> >
>> >>>>>>>>> > when i run the same file as RUN IN TERM, it is fine (same from
>> >>>>>>>>> > the command line).
>> >>>>>>>>> >
>> >>>>>>>>> > when i run a very simple csd with strtod in csoundqt, i get no
>> >>>>>>>>> > output at all (again no problem in "run in term").
>> >>>>>>>>> >
>> >>>>>>>>> > this is with csound6 and csoundqt both from git, on ubuntu
>> >>>>>>>>> > studio
>> >>>>>>>>> > 12.04.
>> >>>>>>>>> >
>> >>>>>>>>> > best -
>> >>>>>>>>> >
>> >>>>>>>>> >         joachim
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ------------------------------------------------------------------------------
>> >>>>>>>>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>>>>>>> > It's a free troubleshooting tool designed for production.
>> >>>>>>>>> > Get down to code-level detail for bottlenecks, with <2%
>> >>>>>>>>> > overhead.
>> >>>>>>>>> > Download for free and get started troubleshooting in minutes.
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>>>>>>>> > _______________________________________________
>> >>>>>>>>> > Csound-devel mailing list
>> >>>>>>>>> > Csound-devel@lists.sourceforge.net
>> >>>>>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > ------------------------------------------------------------------------------
>> >>>>>>>>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>>>>>>> > It's a free troubleshooting tool designed for production.
>> >>>>>>>>> > Get down to code-level detail for bottlenecks, with <2%
>> >>>>>>>>> > overhead.
>> >>>>>>>>> > Download for free and get started troubleshooting in minutes.
>> >>>>>>>>> >
>> >>>>>>>>> >
>> >>>>>>>>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>> >>>>>>>>> > Csound-devel mailing list
>> >>>>>>>>> > Csound-devel@lists.sourceforge.net
>> >>>>>>>>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>>>>>>
>> >>>>>>>>> Dr Victor Lazzarini
>> >>>>>>>>> Senior Lecturer
>> >>>>>>>>> Dept. of Music
>> >>>>>>>>> NUI Maynooth Ireland
>> >>>>>>>>> tel.: +353 1 708 3545
>> >>>>>>>>> Victor dot Lazzarini AT nuim dot ie
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> ------------------------------------------------------------------------------
>> >>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>>>>>>> It's a free troubleshooting tool designed for production.
>> >>>>>>>>> Get down to code-level detail for bottlenecks, with <2%
>> >>>>>>>>> overhead.
>> >>>>>>>>> Download for free and get started troubleshooting in minutes.
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>>>>>>>> _______________________________________________
>> >>>>>>>>> Csound-devel mailing list
>> >>>>>>>>> Csound-devel@lists.sourceforge.net
>> >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> ------------------------------------------------------------------------------
>> >>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>>>>> It's a free troubleshooting tool designed for production.
>> >>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> >>>>>>> Download for free and get started troubleshooting in minutes.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>>>>>> _______________________________________________
>> >>>>>>> Csound-devel mailing list
>> >>>>>>> Csound-devel@lists.sourceforge.net
>> >>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> ------------------------------------------------------------------------------
>> >>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>>>> It's a free troubleshooting tool designed for production.
>> >>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> >>>>>> Download for free and get started troubleshooting in minutes.
>> >>>>>>
>> >>>>>>
>> >>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>>>>> _______________________________________________
>> >>>>>> Csound-devel mailing list
>> >>>>>> Csound-devel@lists.sourceforge.net
>> >>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> ------------------------------------------------------------------------------
>> >>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>>> It's a free troubleshooting tool designed for production.
>> >>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> >>>>> Download for free and get started troubleshooting in minutes.
>> >>>>>
>> >>>>>
>> >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>>>> _______________________________________________
>> >>>>> Csound-devel mailing list
>> >>>>> Csound-devel@lists.sourceforge.net
>> >>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>>> It's a free troubleshooting tool designed for production.
>> >>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> >>>> Download for free and get started troubleshooting in minutes.
>> >>>>
>> >>>>
>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >>> It's a free troubleshooting tool designed for production.
>> >>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> >>> Download for free and get started troubleshooting in minutes.
>> >>>
>> >>>
>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> >> It's a free troubleshooting tool designed for production.
>> >> Get down to code-level detail for bottlenecks, with <2% overhead.
>> >> Download for free and get started troubleshooting in minutes.
>> >>
>> >>
>> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> > It's a free troubleshooting tool designed for production.
>> > Get down to code-level detail for bottlenecks, with <2% overhead.
>> > Download for free and get started troubleshooting in minutes.
>> >
>> > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-17 20:47
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
I'm finding weird results. It seems that atomic builtins can be
present for some data types but not others. I've read that x86_64 will
be guaranteed to have the atomics for 64-bit types, while others are
maybe/maybe not.  We have most of the code protected by
HAVE_ATOMIC_BUILTIN, except there are some uses in cs_new_dispatch.c
that are not protected.

On Sat, Aug 17, 2013 at 3:43 PM, Victor Lazzarini
 wrote:
> I have the impression that if the atomic builtins weren't there, Csound would not build.
> On 17 Aug 2013, at 20:26, Steven Yi wrote:
>
>> Hi Michael,
>>
>> I'm wondering, could you try a build with "-DUSE_ATOMIC_BUILTIN=0"?  I
>> just added that flag, and I'm wondering if that was not used at all on
>> Windows previously and now it might be and causing problems.  Also,
>> perhaps a longshot, maybe double check that any custom flags in
>> Custom.cmake are applied to both CMAKE_C_FLAGS as well as
>> CMAKE_CXX_FLAGS.
>>
>> steven
>>
>> On Sat, Aug 17, 2013 at 2:46 PM, Michael Gogins
>>  wrote:
>>> At the moment I have no access to a Linux computer, so I cannot use
>>> valgrind. Can you try it on Windows?
>>>
>>> Regards,
>>> Mike
>>>
>>>
>>>
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera 
>>> wrote:
>>>>
>>>> OK, so it's a perfThread issue then. Can you run it with valgrind?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>>
>>>> On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins
>>>>  wrote:
>>>>>
>>>>> Here's what it does (exactly the same thing as with my example):
>>>>>
>>>>> $ gdb tests/c/testPerfThread.exe
>>>>> GNU gdb (GDB) 7.6
>>>>> Copyright (C) 2013 Free Software Foundation, Inc.
>>>>> License GPLv3+: GNU GPL version 3 or later
>>>>> 
>>>>> This is free software: you are free to change and redistribute it.
>>>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>> copying"
>>>>> and "show warranty" for details.
>>>>> This GDB was configured as "i686-w64-mingw32".
>>>>> For bug reporting instructions, please see:
>>>>> ...
>>>>> Reading symbols from
>>>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
>>>>> (gdb) run
>>>>> Starting program:
>>>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
>>>>> [New Thread 3892.0x20]
>>>>>
>>>>>
>>>>>     CUnit - A unit testing framework for C - Version 2.1-2
>>>>>     http://cunit.sourceforge.net/
>>>>>
>>>>>
>>>>> Suite: perfthread tests
>>>>>  Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin
>>>>> for Csound
>>>>> 0dBFS level = 32768.0
>>>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>>>> libsndfile-1.0.25
>>>>> rtaudio: PortAudio module enabled ...
>>>>> using callback interface
>>>>> rtmidi: PortMIDI module enabled
>>>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>>>> graphics suppressed, ascii substituted
>>>>> 0dBFS level = 32768.0
>>>>> orch now loaded
>>>>> audio buffered in 4096 sample-frame blocks
>>>>> [New Thread 3892.0x78c]
>>>>> [New Thread 3892.0xe24]
>>>>> [New Thread 3892.0xf28]
>>>>> [New Thread 3892.0x460]
>>>>> [New Thread 3892.0x1258]
>>>>> [New Thread 3892.0x14a0]
>>>>> [New Thread 3892.0xcdc]
>>>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>>>
>>>>> warning: FFUsb2Asio::init()
>>>>>
>>>>> warning: FFUsb2Asio::init() : no available filters found
>>>>> warning:
>>>>>
>>>>> warning: +FFUsb2Asio::~FFUsb2Asio()
>>>>>
>>>>> warning: FFUsb2Asio::stop()
>>>>>
>>>>> warning: FFUsb2Asio::disposeBuffers()
>>>>>
>>>>> warning: -FFUsb2Asio::~FFUsb2Asio()
>>>>>
>>>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>>>
>>>>> PortAudio V19-devel (built Jul 31 2013 12:17:21)
>>>>>   0: dac0 (Microsoft Sound Mapper - Output)
>>>>>   1: dac1 (Speakers (EDIROL UA-25EX))
>>>>>   2: dac2 (Speakers (VIA High Definition A)
>>>>>   3: dac3 (SPDIF Interface (TX0) (VIA High)
>>>>>   4: dac4 (Primary Sound Driver)
>>>>>   5: dac5 (Speakers (EDIROL UA-25EX))
>>>>>   6: dac6 (Speakers (VIA High Definition Audio))
>>>>>   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
>>>>> PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
>>>>> [New Thread 3892.0x1600]
>>>>> [New Thread 3892.0x1764]
>>>>> [New Thread 3892.0x1378]
>>>>> writing 4096 sample blks of 64-bit floats to dac
>>>>> SECTION 1:
>>>>> [New Thread 3892.0x11e8]
>>>>> new alloc for instr 1:
>>>>>
>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>> [Switching to Thread 3892.0x11e8]
>>>>> 0x6c51ff83 in spoutsf (csound=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>> 106     }
>>>>> (gdb) bt
>>>>> #0  0x6c51ff83 in spoutsf (csound=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>> #4  0x649458cb in pthread_create_wrapper () from
>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>> #5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>> #6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
>>>>> #7  0x7710850d in KERNEL32!BaseThreadInitThunk () from
>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>> #8  0x778bbf39 in ?? ()
>>>>> #9  0x778bbf0c in ?? ()
>>>>> #10 0x00000000 in ?? ()
>>>>> (gdb)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ===========================
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera 
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Sorry, had not pushed. It's there now. It's nearly the same example you
>>>>>> posted.
>>>>>>
>>>>>> Cheers,
>>>>>> Andrés
>>>>>>
>>>>>>
>>>>>> On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins
>>>>>>  wrote:
>>>>>>>
>>>>>>> I do not pull this test. Is it in the develop branch?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Mike
>>>>>>>
>>>>>>>
>>>>>>> ===========================
>>>>>>> Michael Gogins
>>>>>>> Irreducible Productions
>>>>>>> http://michaelgogins.tumblr.com
>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>
>>>>>>>
>>>>>>> On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera
>>>>>>>  wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I've added a test in the tests directory for the performance thread,
>>>>>>>> and it seems OK there. Although there are some issues reported by valgrind,
>>>>>>>> I don't think these are the ones causing the reported problem.
>>>>>>>>
>>>>>>>> src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
>>>>>>>> ==14507== Memcheck, a memory error detector
>>>>>>>> ==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et
>>>>>>>> al.
>>>>>>>> ==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright
>>>>>>>> info
>>>>>>>> ==14507== Command: ./testPerfThread
>>>>>>>> ==14507==
>>>>>>>>
>>>>>>>>
>>>>>>>>     CUnit - A Unit testing framework for C - Version 2.1-0
>>>>>>>>     http://cunit.sourceforge.net/
>>>>>>>>
>>>>>>>>
>>>>>>>> Suite: perfthread tests
>>>>>>>>  Test: Test Performance Thread ...
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Use of uninitialised value of size 8
>>>>>>>> ==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
>>>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
>>>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> passed
>>>>>>>>
>>>>>>>> --Run Summary: Type      Total     Ran  Passed  Failed
>>>>>>>>               suites        1       1     n/a       0
>>>>>>>>               tests         1       1       1       0
>>>>>>>>               asserts       0       0       0       0
>>>>>>>> ==14507==
>>>>>>>> ==14507== HEAP SUMMARY:
>>>>>>>> ==14507==     in use at exit: 119,800 bytes in 1,877 blocks
>>>>>>>> ==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156
>>>>>>>> bytes allocated
>>>>>>>> ==14507==
>>>>>>>> ==14507== LEAK SUMMARY:
>>>>>>>> ==14507==    definitely lost: 807 bytes in 9 blocks
>>>>>>>> ==14507==    indirectly lost: 26,097 bytes in 386 blocks
>>>>>>>> ==14507==      possibly lost: 42,993 bytes in 1,313 blocks
>>>>>>>> ==14507==    still reachable: 49,903 bytes in 169 blocks
>>>>>>>> ==14507==         suppressed: 0 bytes in 0 blocks
>>>>>>>> ==14507== Rerun with --leak-check=full to see details of leaked memory
>>>>>>>> ==14507==
>>>>>>>> ==14507== For counts of detected and suppressed errors, rerun with: -v
>>>>>>>> ==14507== Use --track-origins=yes to see where uninitialised values
>>>>>>>> come from
>>>>>>>> ==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2
>>>>>>>> from 2)
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Andrés
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins
>>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>> There definitely appears to be a bug in CsoundPerformanceThread. The
>>>>>>>>> following program exhibits it on my PC. I see thge exact same stack trace in
>>>>>>>>> CsoundQt and in a Lua version of this program.
>>>>>>>>>
>>>>>>>>> #include "csound.hpp"
>>>>>>>>> #include "csPerfThread.hpp"
>>>>>>>>>
>>>>>>>>> int useThreads = true;
>>>>>>>>>
>>>>>>>>> int main(int argc, char *argv[])
>>>>>>>>> {
>>>>>>>>>    Csound csound;
>>>>>>>>>    csound.Compile(argc,argv);
>>>>>>>>>    csound.Start();
>>>>>>>>>    if (useThreads) {
>>>>>>>>>        CsoundPerformanceThread
>>>>>>>>> performanceThread(csound.GetCsound());
>>>>>>>>>        performanceThread.Play();
>>>>>>>>>        performanceThread.Join();
>>>>>>>>>    } else {
>>>>>>>>>        while (csound.PerformKsmps() == 0) {}
>>>>>>>>>    }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> Note that execution is perfect if useThreads is set to false.
>>>>>>>>>
>>>>>>>>> The debugger output is:
>>>>>>>>>
>>>>>>>>> gdb --args csperfthread.exe ../trapped.csd
>>>>>>>>> NU gdb (GDB) 7.6
>>>>>>>>> opyright (C) 2013 Free Software Foundation, Inc.
>>>>>>>>> icense GPLv3+: GNU GPL version 3 or later
>>>>>>>>> 
>>>>>>>>> his is free software: you are free to change and redistribute it.
>>>>>>>>> here is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>>>>>> copying"
>>>>>>>>> nd "show warranty" for details.
>>>>>>>>> his GDB was configured as "i686-w64-mingw32".
>>>>>>>>> or bug reporting instructions, please see:
>>>>>>>>> http://www.gnu.org/software/gdb/bugs/>...
>>>>>>>>> eading symbols from
>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
>>>>>>>>> gdb) run
>>>>>>>>> tarting program:
>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe
>>>>>>>>> ../trapped.csd
>>>>>>>>> New Thread 3552.0xea0]
>>>>>>>>> irtual_keyboard real time MIDI plugin for Csound
>>>>>>>>> dBFS level = 32768.0
>>>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>>>> ibsndfile-1.0.25
>>>>>>>>> nifiedCSD:  ../trapped.csd
>>>>>>>>> TARTING FILE
>>>>>>>>> reating options
>>>>>>>>> reating orchestra
>>>>>>>>> reating score
>>>>>>>>> taudio: PortAudio module enabled ...
>>>>>>>>> sing callback interface
>>>>>>>>> tmidi: PortMIDI module enabled
>>>>>>>>> lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
>>>>>>>>> orting score ...
>>>>>>>>>       ... done
>>>>>>>>> lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
>>>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>>>> isplays suppressed
>>>>>>>>> dBFS level = 32768.0
>>>>>>>>> rch now loaded
>>>>>>>>> udio buffered in 4096 sample-frame blocks
>>>>>>>>> riting 16384-byte blks of shorts to test.wav (WAV)
>>>>>>>>> ECTION 1:
>>>>>>>>> sound is already started, call csoundReset()
>>>>>>>>> efore starting again
>>>>>>>>> New Thread 3552.0x19fc]
>>>>>>>>> table 1:
>>>>>>>>> table 2:
>>>>>>>>> table 3:
>>>>>>>>> table 4:
>>>>>>>>> table 5:
>>>>>>>>> table 6:
>>>>>>>>> table 7:
>>>>>>>>> table 8:
>>>>>>>>> table 9:
>>>>>>>>> table 10:
>>>>>>>>> table 11:
>>>>>>>>> table 12:
>>>>>>>>> table 13:
>>>>>>>>> table 14:
>>>>>>>>> table 15:
>>>>>>>>> table 16:
>>>>>>>>> table 17:
>>>>>>>>> table 18:
>>>>>>>>> table 19:
>>>>>>>>> table 20:
>>>>>>>>> table 21:
>>>>>>>>> table 22:
>>>>>>>>> ew alloc for instr 1:
>>>>>>>>> ew alloc for instr 100:
>>>>>>>>>
>>>>>>>>> rogram received signal SIGSEGV, Segmentation fault.
>>>>>>>>> Switching to Thread 3552.0x19fc]
>>>>>>>>> x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> 06     }
>>>>>>>>> gdb) bt
>>>>>>>>> 0  0x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> 1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>> 2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>> 3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>> 4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>> 5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> 6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> 7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>> 8  0x7751bf39 in ?? ()
>>>>>>>>> 9  0x7751bf0c in ?? ()
>>>>>>>>> 10 0x00000000 in ?? ()
>>>>>>>>> gdb)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ===========================
>>>>>>>>> Michael Gogins
>>>>>>>>> Irreducible Productions
>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins
>>>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>> I see that this is happening when CsoundEngine cleans up csound,
>>>>>>>>>> stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist
>>>>>>>>>> when CsoundQt wants to reference it?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ===========================
>>>>>>>>>> Michael Gogins
>>>>>>>>>> Irreducible Productions
>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini
>>>>>>>>>>  wrote:
>>>>>>>>>>>
>>>>>>>>>>> CsoundPerformanceThread is working perfectly from Python.
>>>>>>>>>>> On 16 Aug 2013, at 12:29, Michael Gogins wrote:
>>>>>>>>>>>
>>>>>>>>>>>> However, this backtrace seems to rule out CsoundPerformanceThread
>>>>>>>>>>>> since this crash happens before the thread is created. This implies a bad
>>>>>>>>>>>> write by CsoundQt itself.
>>>>>>>>>>>>
>>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>>> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>>>>> 1481        opcodeName = root->value->lexeme;
>>>>>>>>>>>> (gdb) bt
>>>>>>>>>>>> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>>>>> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70,
>>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
>>>>>>>>>>>> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
>>>>>>>>>>>> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0)
>>>>>>>>>>>> at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
>>>>>>>>>>>> #4  0x6c5d5985 in csoundCompileArgs
>>>>>>>>>>>> (csound=csound@entry=0x17676a70, argc=4, argc@entry=5,
>>>>>>>>>>>> argv=argv@entry=0x19bd2c18)
>>>>>>>>>>>>    at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
>>>>>>>>>>>> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5,
>>>>>>>>>>>> argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
>>>>>>>>>>>> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at
>>>>>>>>>>>> src/csoundengine.cpp:779
>>>>>>>>>>>> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188,
>>>>>>>>>>>> options=0x1760ae70) at src/csoundengine.cpp:618
>>>>>>>>>>>> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0,
>>>>>>>>>>>> options=0x1760ae70) at src/basedocument.cpp:234
>>>>>>>>>>>> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0,
>>>>>>>>>>>> options=0x1760ae70) at src/documentpage.cpp:1203
>>>>>>>>>>>> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true,
>>>>>>>>>>>> index=4) at src/qutecsound.cpp:1387
>>>>>>>>>>>> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8,
>>>>>>>>>>>> _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at
>>>>>>>>>>>> build/moc/moc_qutecsound.cpp:441
>>>>>>>>>>>> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>>>>> signalOffset=3, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>>>>> kernel\qobject.cpp:3479
>>>>>>>>>>>> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>>>>> m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>>>>> kernel\qobject.cpp:3354
>>>>>>>>>>>> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true)
>>>>>>>>>>>> at .moc/debug_shared/moc_qaction.cpp:356
>>>>>>>>>>>> #15 0x0d933c4e in QAction::activate (this=0x1763f138,
>>>>>>>>>>>> event=QAction::Trigger) at kernel\qaction.cpp:1175
>>>>>>>>>>>> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at
>>>>>>>>>>>> kernel/qaction.h:185
>>>>>>>>>>>> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698)
>>>>>>>>>>>> at widgets\qtoolbutton.cpp:948
>>>>>>>>>>>> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8)
>>>>>>>>>>>> at widgets\qabstractbutton.cpp:522
>>>>>>>>>>>> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent
>>>>>>>>>>>> (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
>>>>>>>>>>>> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent
>>>>>>>>>>>> (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
>>>>>>>>>>>> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698,
>>>>>>>>>>>> event=0x28d1d0) at kernel\qwidget.cpp:7877
>>>>>>>>>>>> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698,
>>>>>>>>>>>> e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
>>>>>>>>>>>> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698,
>>>>>>>>>>>> event=0x28d1d0) at widgets\qtoolbutton.cpp:964
>>>>>>>>>>>> #24 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>>>>> (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at
>>>>>>>>>>>> kernel\qapplication.cpp:3455
>>>>>>>>>>>> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c,
>>>>>>>>>>>> receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
>>>>>>>>>>>> #26 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>>>>> (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at
>>>>>>>>>>>> kernel\qcoreapplication.cpp:871
>>>>>>>>>>>> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>>>>> (receiver=0x1773c698, event=0x28d1d0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>>>>> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent
>>>>>>>>>>>> (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698,
>>>>>>>>>>>> nativeWidget=0x2e3b9b8,
>>>>>>>>>>>>    buttonDown=0xdf4e178 , lastMouseReceiver=...,
>>>>>>>>>>>> spontaneous=true) at kernel\qapplication.cpp:2485
>>>>>>>>>>>> #29 0x0d984219 in QWidgetWindow::handleMouseEvent
>>>>>>>>>>>> (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
>>>>>>>>>>>> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0,
>>>>>>>>>>>> event=0x28d920) at kernel\qwidgetwindow.cpp:158
>>>>>>>>>>>> #31 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>>>>> (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at
>>>>>>>>>>>> kernel\qapplication.cpp:3455
>>>>>>>>>>>> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c,
>>>>>>>>>>>> receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
>>>>>>>>>>>> #33 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>>>>> (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at
>>>>>>>>>>>> kernel\qcoreapplication.cpp:871
>>>>>>>>>>>> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>>>>> (receiver=0x176391d0, event=0x28d920)
>>>>>>>>>>>>    at
>>>>>>>>>>>> ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>>>>> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent
>>>>>>>>>>>> (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
>>>>>>>>>>>> #36 0x06849c5d in
>>>>>>>>>>>> QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at
>>>>>>>>>>>> kernel\qguiapplication.cpp:1262
>>>>>>>>>>>> #37 0x06840790 in
>>>>>>>>>>>> QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at
>>>>>>>>>>>> kernel\qwindowsysteminterface.cpp:581
>>>>>>>>>>>> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents
>>>>>>>>>>>> (flags=...) at kernel\qwindowsysteminterface.cpp:561
>>>>>>>>>>>> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents
>>>>>>>>>>>> (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
>>>>>>>>>>>> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025,
>>>>>>>>>>>> wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
>>>>>>>>>>>> #41 0x761c77d8 in gapfnScSendMessage () from
>>>>>>>>>>>> C:\Windows\SysWOW64\user32.dll
>>>>>>>>>>>> #42 0x003b040e in ?? ()
>>>>>>>>>>>> #43 0x00000401 in ?? ()
>>>>>>>>>>>> #44 0x00000000 in ?? ()
>>>>>>>>>>>> (gdb)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>> To rule out or in CsoundPerformanceThread, I will write a short
>>>>>>>>>>>> C++ test program that uses it and run it with various csds. But I won't have
>>>>>>>>>>>> time to do this until tonight.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>> There are also lots of warnings about missing signals for slots
>>>>>>>>>>>> in Qt. And missing properties.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>> I've been seeing this for a day or so now, running CsoundQt with
>>>>>>>>>>>> a variety of files, this with your test.cd:
>>>>>>>>>>>>
>>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>>> [Switching to Thread 6688.0x1590]
>>>>>>>>>>>> 0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>>>>> 106     }
>>>>>>>>>>>> (gdb) bt
>>>>>>>>>>>> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>>>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>>>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>>>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform
>>>>>>>>>>>> (this=0x1922de30) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>>>>> #4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>>>>> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>>>>> #6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>>>>> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>>>>> #8  0x7751bf39 in ?? ()
>>>>>>>>>>>> #9  0x7751bf0c in ?? ()
>>>>>>>>>>>> #10 0x00000000 in ?? ()
>>>>>>>>>>>> (gdb)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>> I have just run this with head code for both Csound and CsoundQt.
>>>>>>>>>>>> All is good with rendering with plain Csound. In CsoundQt all is good with
>>>>>>>>>>>> rendering in the terminal. If I render to file in CsoundQt, it works once
>>>>>>>>>>>> for each file, then hangs or crashes CsoundQt. If I render to audio in
>>>>>>>>>>>> CsoundQt, it hangs or crashes the first time.
>>>>>>>>>>>>
>>>>>>>>>>>> Did anyone try an empty csd?
>>>>>>>>>>>>
>>>>>>>>>>>> If I run an empty csd in CsoundQt and render to terminal, all is
>>>>>>>>>>>> fine. If I render to file in CsoundQt or render to audio in CsoundQt with an
>>>>>>>>>>>> empty file, it hangs.
>>>>>>>>>>>>
>>>>>>>>>>>> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's
>>>>>>>>>>>> CsoundEngine are places to look for trouble.
>>>>>>>>>>>>
>>>>>>>>>>>> I think it's pretty clear from this behavior across platforms
>>>>>>>>>>>> that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious
>>>>>>>>>>>> bug not specific to Windows. Behavior various however from machine to
>>>>>>>>>>>> machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are
>>>>>>>>>>>> corrupting Csound variables.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>> hi -
>>>>>>>>>>>>
>>>>>>>>>>>> i experience a somehow strange bug in csoundqt.
>>>>>>>>>>>>
>>>>>>>>>>>> when i run StrayNumToFt.csd via the PLAY button, i get lots of
>>>>>>>>>>>> errors:
>>>>>>>>>>>> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>>>>>>>>>>
>>>>>>>>>>>> when i run the same file as RUN IN TERM, it is fine (same from
>>>>>>>>>>>> the command line).
>>>>>>>>>>>>
>>>>>>>>>>>> when i run a very simple csd with strtod in csoundqt, i get no
>>>>>>>>>>>> output at all (again no problem in "run in term").
>>>>>>>>>>>>
>>>>>>>>>>>> this is with csound6 and csoundqt both from git, on ubuntu studio
>>>>>>>>>>>> 12.04.
>>>>>>>>>>>>
>>>>>>>>>>>> best -
>>>>>>>>>>>>
>>>>>>>>>>>>        joachim
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>>>
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>>>
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>
>>>>>>>>>>> Dr Victor Lazzarini
>>>>>>>>>>> Senior Lecturer
>>>>>>>>>>> Dept. of Music
>>>>>>>>>>> NUI Maynooth Ireland
>>>>>>>>>>> tel.: +353 1 708 3545
>>>>>>>>>>> Victor dot Lazzarini AT nuim dot ie
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>>
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>> It's a free troubleshooting tool designed for production.
>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>> It's a free troubleshooting tool designed for production.
>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>> Download for free and get started troubleshooting in minutes.
>>>>>
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>> It's a free troubleshooting tool designed for production.
>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>> Download for free and get started troubleshooting in minutes.
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>> It's a free troubleshooting tool designed for production.
>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>> Download for free and get started troubleshooting in minutes.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-17 20:57
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
I'm not doing a build without atomic builtins at this time.

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Aug 17, 2013 at 3:47 PM, Steven Yi <stevenyi@gmail.com> wrote:
I'm finding weird results. It seems that atomic builtins can be
present for some data types but not others. I've read that x86_64 will
be guaranteed to have the atomics for 64-bit types, while others are
maybe/maybe not.  We have most of the code protected by
HAVE_ATOMIC_BUILTIN, except there are some uses in cs_new_dispatch.c
that are not protected.

On Sat, Aug 17, 2013 at 3:43 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
> I have the impression that if the atomic builtins weren't there, Csound would not build.
> On 17 Aug 2013, at 20:26, Steven Yi wrote:
>
>> Hi Michael,
>>
>> I'm wondering, could you try a build with "-DUSE_ATOMIC_BUILTIN=0"?  I
>> just added that flag, and I'm wondering if that was not used at all on
>> Windows previously and now it might be and causing problems.  Also,
>> perhaps a longshot, maybe double check that any custom flags in
>> Custom.cmake are applied to both CMAKE_C_FLAGS as well as
>> CMAKE_CXX_FLAGS.
>>
>> steven
>>
>> On Sat, Aug 17, 2013 at 2:46 PM, Michael Gogins
>> <michael.gogins@gmail.com> wrote:
>>> At the moment I have no access to a Linux computer, so I cannot use
>>> valgrind. Can you try it on Windows?
>>>
>>> Regards,
>>> Mike
>>>
>>>
>>>
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Sat, Aug 17, 2013 at 2:32 PM, Andres Cabrera <mantaraya36@gmail.com>
>>> wrote:
>>>>
>>>> OK, so it's a perfThread issue then. Can you run it with valgrind?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>>
>>>> On Sat, Aug 17, 2013 at 10:31 AM, Michael Gogins
>>>> <michael.gogins@gmail.com> wrote:
>>>>>
>>>>> Here's what it does (exactly the same thing as with my example):
>>>>>
>>>>> $ gdb tests/c/testPerfThread.exe
>>>>> GNU gdb (GDB) 7.6
>>>>> Copyright (C) 2013 Free Software Foundation, Inc.
>>>>> License GPLv3+: GNU GPL version 3 or later
>>>>> <http://gnu.org/licenses/gpl.html>
>>>>> This is free software: you are free to change and redistribute it.
>>>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>> copying"
>>>>> and "show warranty" for details.
>>>>> This GDB was configured as "i686-w64-mingw32".
>>>>> For bug reporting instructions, please see:
>>>>> <http://www.gnu.org/software/gdb/bugs/>...
>>>>> Reading symbols from
>>>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe...done.
>>>>> (gdb) run
>>>>> Starting program:
>>>>> c:\Users\mkg.sorabji\csound-csound6-git\tests\c\testPerfThread.exe
>>>>> [New Thread 3892.0x20]
>>>>>
>>>>>
>>>>>     CUnit - A unit testing framework for C - Version 2.1-2
>>>>>     http://cunit.sourceforge.net/
>>>>>
>>>>>
>>>>> Suite: perfthread tests
>>>>>  Test: Test Performance Thread ...virtual_keyboard real time MIDI plugin
>>>>> for Csound
>>>>> 0dBFS level = 32768.0
>>>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>>>> libsndfile-1.0.25
>>>>> rtaudio: PortAudio module enabled ...
>>>>> using callback interface
>>>>> rtmidi: PortMIDI module enabled
>>>>> Csound version 6.00.1 (double samples) Aug 16 2013
>>>>> graphics suppressed, ascii substituted
>>>>> 0dBFS level = 32768.0
>>>>> orch now loaded
>>>>> audio buffered in 4096 sample-frame blocks
>>>>> [New Thread 3892.0x78c]
>>>>> [New Thread 3892.0xe24]
>>>>> [New Thread 3892.0xf28]
>>>>> [New Thread 3892.0x460]
>>>>> [New Thread 3892.0x1258]
>>>>> [New Thread 3892.0x14a0]
>>>>> [New Thread 3892.0xcdc]
>>>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>>>
>>>>> warning: FFUsb2Asio::init()
>>>>>
>>>>> warning: FFUsb2Asio::init() : no available filters found
>>>>> warning:
>>>>>
>>>>> warning: +FFUsb2Asio::~FFUsb2Asio()
>>>>>
>>>>> warning: FFUsb2Asio::stop()
>>>>>
>>>>> warning: FFUsb2Asio::disposeBuffers()
>>>>>
>>>>> warning: -FFUsb2Asio::~FFUsb2Asio()
>>>>>
>>>>> warning: FFUsb2Asio::FFUsb2Asio()
>>>>>
>>>>> PortAudio V19-devel (built Jul 31 2013 12:17:21)
>>>>>   0: dac0 (Microsoft Sound Mapper - Output)
>>>>>   1: dac1 (Speakers (EDIROL UA-25EX))
>>>>>   2: dac2 (Speakers (VIA High Definition A)
>>>>>   3: dac3 (SPDIF Interface (TX0) (VIA High)
>>>>>   4: dac4 (Primary Sound Driver)
>>>>>   5: dac5 (Speakers (EDIROL UA-25EX))
>>>>>   6: dac6 (Speakers (VIA High Definition Audio))
>>>>>   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
>>>>> PortAudio: selected output device 'Speakers (EDIROL UA-25EX)'
>>>>> [New Thread 3892.0x1600]
>>>>> [New Thread 3892.0x1764]
>>>>> [New Thread 3892.0x1378]
>>>>> writing 4096 sample blks of 64-bit floats to dac
>>>>> SECTION 1:
>>>>> [New Thread 3892.0x11e8]
>>>>> new alloc for instr 1:
>>>>>
>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>> [Switching to Thread 3892.0x11e8]
>>>>> 0x6c51ff83 in spoutsf (csound=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>> 106     }
>>>>> (gdb) bt
>>>>> #0  0x6c51ff83 in spoutsf (csound=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x430048) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fcf0) at
>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>> #4  0x649458cb in pthread_create_wrapper () from
>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>> #5  0x74f8906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>> #6  0x74f89147 in msvcrt!iswalnum () from C:\Windows\SysWOW64\msvcrt.dll
>>>>> #7  0x7710850d in KERNEL32!BaseThreadInitThunk () from
>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>> #8  0x778bbf39 in ?? ()
>>>>> #9  0x778bbf0c in ?? ()
>>>>> #10 0x00000000 in ?? ()
>>>>> (gdb)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ===========================
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> On Sat, Aug 17, 2013 at 12:43 PM, Andres Cabrera <mantaraya36@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Sorry, had not pushed. It's there now. It's nearly the same example you
>>>>>> posted.
>>>>>>
>>>>>> Cheers,
>>>>>> Andrés
>>>>>>
>>>>>>
>>>>>> On Sat, Aug 17, 2013 at 3:01 AM, Michael Gogins
>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>
>>>>>>> I do not pull this test. Is it in the develop branch?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Mike
>>>>>>>
>>>>>>>
>>>>>>> ===========================
>>>>>>> Michael Gogins
>>>>>>> Irreducible Productions
>>>>>>> http://michaelgogins.tumblr.com
>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>
>>>>>>>
>>>>>>> On Sat, Aug 17, 2013 at 12:38 AM, Andres Cabrera
>>>>>>> <mantaraya36@gmail.com> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I've added a test in the tests directory for the performance thread,
>>>>>>>> and it seems OK there. Although there are some issues reported by valgrind,
>>>>>>>> I don't think these are the ones causing the reported problem.
>>>>>>>>
>>>>>>>> src/csound-csound6-git-build/tests/c $ valgrind ./testPerfThread
>>>>>>>> ==14507== Memcheck, a memory error detector
>>>>>>>> ==14507== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et
>>>>>>>> al.
>>>>>>>> ==14507== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright
>>>>>>>> info
>>>>>>>> ==14507== Command: ./testPerfThread
>>>>>>>> ==14507==
>>>>>>>>
>>>>>>>>
>>>>>>>>     CUnit - A Unit testing framework for C - Version 2.1-0
>>>>>>>>     http://cunit.sourceforge.net/
>>>>>>>>
>>>>>>>>
>>>>>>>> Suite: perfthread tests
>>>>>>>>  Test: Test Performance Thread ...
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF60E0: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Use of uninitialised value of size 8
>>>>>>>> ==14507==    at 0x5CF565B: _itoa_word (_itoa.c:179)
>>>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF5665: _itoa_word (_itoa.c:179)
>>>>>>>> ==14507==    by 0x5CF9B91: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF9BE4: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF61BE: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> ==14507== Conditional jump or move depends on uninitialised value(s)
>>>>>>>> ==14507==    at 0x5CF6238: vfprintf (vfprintf.c:1654)
>>>>>>>> ==14507==    by 0x5CFACAE: buffered_vfprintf (vfprintf.c:2341)
>>>>>>>> ==14507==    by 0x5CF5A2D: vfprintf (vfprintf.c:1307)
>>>>>>>> ==14507==    by 0x4FCF656: csoundDefaultMessageCallback
>>>>>>>> (csound.c:1917)
>>>>>>>> ==14507==    by 0x4FCF8D1: csoundMessage (csound.c:1973)
>>>>>>>> ==14507==    by 0x50A7024: print_tree_xml
>>>>>>>> (csound_orc_semantics.c:2230)
>>>>>>>> ==14507==    by 0x50A71A2: print_tree (csound_orc_semantics.c:2253)
>>>>>>>> ==14507==    by 0x50B1A6B: csoundParseOrc (new_orc_parser.c:169)
>>>>>>>> ==14507==    by 0x50B010C: csoundCompileOrc
>>>>>>>> (csound_orc_compile.c:1649)
>>>>>>>> ==14507==    by 0x406A3A: Csound::CompileOrc(char const*)
>>>>>>>> (csound.hpp:189)
>>>>>>>> ==14507==    by 0x4065AC: test_perfthread() (perfthread_test.cpp:27)
>>>>>>>> ==14507==    by 0x534205F: ??? (in /usr/lib/libcunit.so.1.0.1)
>>>>>>>> ==14507==
>>>>>>>> passed
>>>>>>>>
>>>>>>>> --Run Summary: Type      Total     Ran  Passed  Failed
>>>>>>>>               suites        1       1     n/a       0
>>>>>>>>               tests         1       1       1       0
>>>>>>>>               asserts       0       0       0       0
>>>>>>>> ==14507==
>>>>>>>> ==14507== HEAP SUMMARY:
>>>>>>>> ==14507==     in use at exit: 119,800 bytes in 1,877 blocks
>>>>>>>> ==14507==   total heap usage: 21,527 allocs, 19,650 frees, 1,910,156
>>>>>>>> bytes allocated
>>>>>>>> ==14507==
>>>>>>>> ==14507== LEAK SUMMARY:
>>>>>>>> ==14507==    definitely lost: 807 bytes in 9 blocks
>>>>>>>> ==14507==    indirectly lost: 26,097 bytes in 386 blocks
>>>>>>>> ==14507==      possibly lost: 42,993 bytes in 1,313 blocks
>>>>>>>> ==14507==    still reachable: 49,903 bytes in 169 blocks
>>>>>>>> ==14507==         suppressed: 0 bytes in 0 blocks
>>>>>>>> ==14507== Rerun with --leak-check=full to see details of leaked memory
>>>>>>>> ==14507==
>>>>>>>> ==14507== For counts of detected and suppressed errors, rerun with: -v
>>>>>>>> ==14507== Use --track-origins=yes to see where uninitialised values
>>>>>>>> come from
>>>>>>>> ==14507== ERROR SUMMARY: 198 errors from 6 contexts (suppressed: 2
>>>>>>>> from 2)
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Andrés
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Aug 16, 2013 at 5:49 PM, Michael Gogins
>>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>> There definitely appears to be a bug in CsoundPerformanceThread. The
>>>>>>>>> following program exhibits it on my PC. I see thge exact same stack trace in
>>>>>>>>> CsoundQt and in a Lua version of this program.
>>>>>>>>>
>>>>>>>>> #include "csound.hpp"
>>>>>>>>> #include "csPerfThread.hpp"
>>>>>>>>>
>>>>>>>>> int useThreads = true;
>>>>>>>>>
>>>>>>>>> int main(int argc, char *argv[])
>>>>>>>>> {
>>>>>>>>>    Csound csound;
>>>>>>>>>    csound.Compile(argc,argv);
>>>>>>>>>    csound.Start();
>>>>>>>>>    if (useThreads) {
>>>>>>>>>        CsoundPerformanceThread
>>>>>>>>> performanceThread(csound.GetCsound());
>>>>>>>>>        performanceThread.Play();
>>>>>>>>>        performanceThread.Join();
>>>>>>>>>    } else {
>>>>>>>>>        while (csound.PerformKsmps() == 0) {}
>>>>>>>>>    }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> Note that execution is perfect if useThreads is set to false.
>>>>>>>>>
>>>>>>>>> The debugger output is:
>>>>>>>>>
>>>>>>>>> gdb --args csperfthread.exe ../trapped.csd
>>>>>>>>> NU gdb (GDB) 7.6
>>>>>>>>> opyright (C) 2013 Free Software Foundation, Inc.
>>>>>>>>> icense GPLv3+: GNU GPL version 3 or later
>>>>>>>>> <http://gnu.org/licenses/gpl.html>
>>>>>>>>> his is free software: you are free to change and redistribute it.
>>>>>>>>> here is NO WARRANTY, to the extent permitted by law.  Type "show
>>>>>>>>> copying"
>>>>>>>>> nd "show warranty" for details.
>>>>>>>>> his GDB was configured as "i686-w64-mingw32".
>>>>>>>>> or bug reporting instructions, please see:
>>>>>>>>> http://www.gnu.org/software/gdb/bugs/>...
>>>>>>>>> eading symbols from
>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe...done.
>>>>>>>>> gdb) run
>>>>>>>>> tarting program:
>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\examples\cplusplus\csperfthread.exe
>>>>>>>>> ../trapped.csd
>>>>>>>>> New Thread 3552.0xea0]
>>>>>>>>> irtual_keyboard real time MIDI plugin for Csound
>>>>>>>>> dBFS level = 32768.0
>>>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>>>> ibsndfile-1.0.25
>>>>>>>>> nifiedCSD:  ../trapped.csd
>>>>>>>>> TARTING FILE
>>>>>>>>> reating options
>>>>>>>>> reating orchestra
>>>>>>>>> reating score
>>>>>>>>> taudio: PortAudio module enabled ...
>>>>>>>>> sing callback interface
>>>>>>>>> tmidi: PortMIDI module enabled
>>>>>>>>> lapsed time at end of orchestra compile: real: 0.070s, CPU: 0.070s
>>>>>>>>> orting score ...
>>>>>>>>>       ... done
>>>>>>>>> lapsed time at end of score sort: real: 0.076s, CPU: 0.076s
>>>>>>>>> sound version 6.00.1 (double samples) Aug 16 2013
>>>>>>>>> isplays suppressed
>>>>>>>>> dBFS level = 32768.0
>>>>>>>>> rch now loaded
>>>>>>>>> udio buffered in 4096 sample-frame blocks
>>>>>>>>> riting 16384-byte blks of shorts to test.wav (WAV)
>>>>>>>>> ECTION 1:
>>>>>>>>> sound is already started, call csoundReset()
>>>>>>>>> efore starting again
>>>>>>>>> New Thread 3552.0x19fc]
>>>>>>>>> table 1:
>>>>>>>>> table 2:
>>>>>>>>> table 3:
>>>>>>>>> table 4:
>>>>>>>>> table 5:
>>>>>>>>> table 6:
>>>>>>>>> table 7:
>>>>>>>>> table 8:
>>>>>>>>> table 9:
>>>>>>>>> table 10:
>>>>>>>>> table 11:
>>>>>>>>> table 12:
>>>>>>>>> table 13:
>>>>>>>>> table 14:
>>>>>>>>> table 15:
>>>>>>>>> table 16:
>>>>>>>>> table 17:
>>>>>>>>> table 18:
>>>>>>>>> table 19:
>>>>>>>>> table 20:
>>>>>>>>> table 21:
>>>>>>>>> table 22:
>>>>>>>>> ew alloc for instr 1:
>>>>>>>>> ew alloc for instr 100:
>>>>>>>>>
>>>>>>>>> rogram received signal SIGSEGV, Segmentation fault.
>>>>>>>>> Switching to Thread 3552.0x19fc]
>>>>>>>>> x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> 06     }
>>>>>>>>> gdb) bt
>>>>>>>>> 0  0x6c51ff83 in spoutsf (csound=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>> 1  0x6c5d3a67 in kperf (csound=csound@entry=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>> 2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x660048) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>> 3  0x6b8895ee in CsoundPerformanceThread::Perform (this=0x28fe60) at
>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>> 4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>> 5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> 6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>> 7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>> 8  0x7751bf39 in ?? ()
>>>>>>>>> 9  0x7751bf0c in ?? ()
>>>>>>>>> 10 0x00000000 in ?? ()
>>>>>>>>> gdb)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ===========================
>>>>>>>>> Michael Gogins
>>>>>>>>> Irreducible Productions
>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Aug 16, 2013 at 8:52 AM, Michael Gogins
>>>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>> I see that this is happening when CsoundEngine cleans up csound,
>>>>>>>>>> stack frame 12. Maybe Csound has cleaned up stuff so that it doesn't exist
>>>>>>>>>> when CsoundQt wants to reference it?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ===========================
>>>>>>>>>> Michael Gogins
>>>>>>>>>> Irreducible Productions
>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Fri, Aug 16, 2013 at 7:32 AM, Victor Lazzarini
>>>>>>>>>> <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>>>>>>
>>>>>>>>>>> CsoundPerformanceThread is working perfectly from Python.
>>>>>>>>>>> On 16 Aug 2013, at 12:29, Michael Gogins wrote:
>>>>>>>>>>>
>>>>>>>>>>>> However, this backtrace seems to rule out CsoundPerformanceThread
>>>>>>>>>>>> since this crash happens before the thread is created. This implies a bad
>>>>>>>>>>>> write by CsoundQt itself.
>>>>>>>>>>>>
>>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>>> 0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>>>>> 1481        opcodeName = root->value->lexeme;
>>>>>>>>>>>> (gdb) bt
>>>>>>>>>>>> #0  0x6c64dd28 in verify_opcode (csound=csound@entry=0x17676a70,
>>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1481
>>>>>>>>>>>> #1  0x6c64e33c in verify_tree (csound=csound@entry=0x17676a70,
>>>>>>>>>>>> root=root@entry=0x19424448, typeTable=typeTable@entry=0x194244c0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_semantics.c:1747
>>>>>>>>>>>> #2  0x6c6546b6 in csoundParseOrc (csound=0x17676a70, str=0x0) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Engine/new_orc_parser.c:182
>>>>>>>>>>>> #3  0x6c654248 in csoundCompileOrc (csound=0x17676a70, str=0x0)
>>>>>>>>>>>> at c:/Users/mkg.sorabji/csound-csound6-git/Engine/csound_orc_compile.c:1649
>>>>>>>>>>>> #4  0x6c5d5985 in csoundCompileArgs
>>>>>>>>>>>> (csound=csound@entry=0x17676a70, argc=4, argc@entry=5,
>>>>>>>>>>>> argv=argv@entry=0x19bd2c18)
>>>>>>>>>>>>    at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:226
>>>>>>>>>>>> #5  0x6c5d6863 in csoundCompile (csound=0x17676a70, argc=5,
>>>>>>>>>>>> argv=0x19bd2c18) at c:/Users/mkg.sorabji/csound-csound6-git/Top/main.c:464
>>>>>>>>>>>> #6  0x0040e7e1 in CsoundEngine::runCsound (this=0x18bdf188) at
>>>>>>>>>>>> src/csoundengine.cpp:779
>>>>>>>>>>>> #7  0x0040e00a in CsoundEngine::play (this=0x18bdf188,
>>>>>>>>>>>> options=0x1760ae70) at src/csoundengine.cpp:618
>>>>>>>>>>>> #8  0x004f0b4b in BaseDocument::play (this=0x18608ae0,
>>>>>>>>>>>> options=0x1760ae70) at src/basedocument.cpp:234
>>>>>>>>>>>> #9  0x0041c26e in DocumentPage::play (this=0x18608ae0,
>>>>>>>>>>>> options=0x1760ae70) at src/documentpage.cpp:1203
>>>>>>>>>>>> #10 0x0045fea5 in CsoundQt::play (this=0x2e3b9b8, realtime=true,
>>>>>>>>>>>> index=4) at src/qutecsound.cpp:1387
>>>>>>>>>>>> #11 0x0050bfe1 in CsoundQt::qt_static_metacall (_o=0x2e3b9b8,
>>>>>>>>>>>> _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x28c8e8) at
>>>>>>>>>>>> build/moc/moc_qutecsound.cpp:441
>>>>>>>>>>>> #12 0x032041c8 in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>>>>> signalOffset=3, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>>>>> kernel\qobject.cpp:3479
>>>>>>>>>>>> #13 0x03203b6a in QMetaObject::activate (sender=0x1763f138,
>>>>>>>>>>>> m=0xdd50000 <_data_start__>, local_signal_index=1, argv=0x28c8e8) at
>>>>>>>>>>>> kernel\qobject.cpp:3354
>>>>>>>>>>>> #14 0x0d934699 in QAction::triggered (this=0x1763f138, _t1=true)
>>>>>>>>>>>> at .moc/debug_shared/moc_qaction.cpp:356
>>>>>>>>>>>> #15 0x0d933c4e in QAction::activate (this=0x1763f138,
>>>>>>>>>>>> event=QAction::Trigger) at kernel\qaction.cpp:1175
>>>>>>>>>>>> #16 0x0dcd9dca in QAction::trigger (this=0x1763f138) at
>>>>>>>>>>>> kernel/qaction.h:185
>>>>>>>>>>>> #17 0x0dade681 in QToolButton::nextCheckState (this=0x1773c698)
>>>>>>>>>>>> at widgets\qtoolbutton.cpp:948
>>>>>>>>>>>> #18 0x0da29692 in QAbstractButtonPrivate::click (this=0x1773c6c8)
>>>>>>>>>>>> at widgets\qabstractbutton.cpp:522
>>>>>>>>>>>> #19 0x0da2a901 in QAbstractButton::mouseReleaseEvent
>>>>>>>>>>>> (this=0x1773c698, e=0x28d1d0) at widgets\qabstractbutton.cpp:1124
>>>>>>>>>>>> #20 0x0dadd3e2 in QToolButton::mouseReleaseEvent
>>>>>>>>>>>> (this=0x1773c698, e=0x28d1d0) at widgets\qtoolbutton.cpp:616
>>>>>>>>>>>> #21 0x0d96d1b9 in QWidget::event (this=0x1773c698,
>>>>>>>>>>>> event=0x28d1d0) at kernel\qwidget.cpp:7877
>>>>>>>>>>>> #22 0x0da2a776 in QAbstractButton::event (this=0x1773c698,
>>>>>>>>>>>> e=0x28d1d0) at widgets\qabstractbutton.cpp:1081
>>>>>>>>>>>> #23 0x0dade6e6 in QToolButton::event (this=0x1773c698,
>>>>>>>>>>>> event=0x28d1d0) at widgets\qtoolbutton.cpp:964
>>>>>>>>>>>> #24 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>>>>> (this=0x2d04fa8, receiver=0x1773c698, e=0x28d1d0) at
>>>>>>>>>>>> kernel\qapplication.cpp:3455
>>>>>>>>>>>> #25 0x0d93bc2d in QApplication::notify (this=0x28fd7c,
>>>>>>>>>>>> receiver=0x1773c698, e=0x28d1d0) at kernel\qapplication.cpp:2991
>>>>>>>>>>>> #26 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>>>>> (this=0x28fd7c, receiver=0x1773c698, event=0x28d1d0) at
>>>>>>>>>>>> kernel\qcoreapplication.cpp:871
>>>>>>>>>>>> #27 0x0dc75835 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>>>>> (receiver=0x1773c698, event=0x28d1d0)
>>>>>>>>>>>>    at
>>>>>>>>>>>> ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>>>>> #28 0x0d93aa4b in QApplicationPrivate::sendMouseEvent
>>>>>>>>>>>> (receiver=0x1773c698, event=0x28d1d0, alienWidget=0x1773c698,
>>>>>>>>>>>> nativeWidget=0x2e3b9b8,
>>>>>>>>>>>>    buttonDown=0xdf4e178 <qt_button_down>, lastMouseReceiver=...,
>>>>>>>>>>>> spontaneous=true) at kernel\qapplication.cpp:2485
>>>>>>>>>>>> #29 0x0d984219 in QWidgetWindow::handleMouseEvent
>>>>>>>>>>>> (this=0x176391d0, event=0x28d920) at kernel\qwidgetwindow.cpp:464
>>>>>>>>>>>> #30 0x0d98335b in QWidgetWindow::event (this=0x176391d0,
>>>>>>>>>>>> event=0x28d920) at kernel\qwidgetwindow.cpp:158
>>>>>>>>>>>> #31 0x0d93db21 in QApplicationPrivate::notify_helper
>>>>>>>>>>>> (this=0x2d04fa8, receiver=0x176391d0, e=0x28d920) at
>>>>>>>>>>>> kernel\qapplication.cpp:3455
>>>>>>>>>>>> #32 0x0d93b5e4 in QApplication::notify (this=0x28fd7c,
>>>>>>>>>>>> receiver=0x176391d0, e=0x28d920) at kernel\qapplication.cpp:2876
>>>>>>>>>>>> #33 0x031d9dce in QCoreApplication::notifyInternal
>>>>>>>>>>>> (this=0x28fd7c, receiver=0x176391d0, event=0x28d920) at
>>>>>>>>>>>> kernel\qcoreapplication.cpp:871
>>>>>>>>>>>> #34 0x06ae4455 in QCoreApplication::sendSpontaneousEvent
>>>>>>>>>>>> (receiver=0x176391d0, event=0x28d920)
>>>>>>>>>>>>    at
>>>>>>>>>>>> ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:235
>>>>>>>>>>>> #35 0x0684a477 in QGuiApplicationPrivate::processMouseEvent
>>>>>>>>>>>> (e=0x1946fa88) at kernel\qguiapplication.cpp:1439
>>>>>>>>>>>> #36 0x06849c5d in
>>>>>>>>>>>> QGuiApplicationPrivate::processWindowSystemEvent (e=0x1946fa88) at
>>>>>>>>>>>> kernel\qguiapplication.cpp:1262
>>>>>>>>>>>> #37 0x06840790 in
>>>>>>>>>>>> QWindowSystemInterface::sendWindowSystemEventsImplementation (flags=...) at
>>>>>>>>>>>> kernel\qwindowsysteminterface.cpp:581
>>>>>>>>>>>> #38 0x0684071d in QWindowSystemInterface::sendWindowSystemEvents
>>>>>>>>>>>> (flags=...) at kernel\qwindowsysteminterface.cpp:561
>>>>>>>>>>>> #39 0x6285caa9 in QWindowsGuiEventDispatcher::sendPostedEvents
>>>>>>>>>>>> (this=0x2d08768) at qwindowsguieventdispatcher.cpp:86
>>>>>>>>>>>> #40 0x0321f7f4 in qt_internal_proc (hwnd=0x3b040e, message=1025,
>>>>>>>>>>>> wp=0, lp=0) at kernel\qeventdispatcher_win.cpp:429
>>>>>>>>>>>> #41 0x761c77d8 in gapfnScSendMessage () from
>>>>>>>>>>>> C:\Windows\SysWOW64\user32.dll
>>>>>>>>>>>> #42 0x003b040e in ?? ()
>>>>>>>>>>>> #43 0x00000401 in ?? ()
>>>>>>>>>>>> #44 0x00000000 in ?? ()
>>>>>>>>>>>> (gdb)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:12 AM, Michael Gogins
>>>>>>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>>>>> To rule out or in CsoundPerformanceThread, I will write a short
>>>>>>>>>>>> C++ test program that uses it and run it with various csds. But I won't have
>>>>>>>>>>>> time to do this until tonight.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:07 AM, Michael Gogins
>>>>>>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>>>>> There are also lots of warnings about missing signals for slots
>>>>>>>>>>>> in Qt. And missing properties.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 7:05 AM, Michael Gogins
>>>>>>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>>>>> I've been seeing this for a day or so now, running CsoundQt with
>>>>>>>>>>>> a variety of files, this with your test.cd:
>>>>>>>>>>>>
>>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>>> [Switching to Thread 6688.0x1590]
>>>>>>>>>>>> 0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>>>>> 106     }
>>>>>>>>>>>> (gdb) bt
>>>>>>>>>>>> #0  0x6c51ff83 in spoutsf (csound=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/InOut/libsnd.c:106
>>>>>>>>>>>> #1  0x6c5d3a67 in kperf (csound=csound@entry=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1554
>>>>>>>>>>>> #2  0x6c5d3fa8 in csoundPerformKsmps (csound=0x1733a388) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/Top/csound.c:1612
>>>>>>>>>>>> #3  0x6b8895ee in CsoundPerformanceThread::Perform
>>>>>>>>>>>> (this=0x1922de30) at
>>>>>>>>>>>> c:/Users/mkg.sorabji/csound-csound6-git/interfaces/csPerfThread.cpp:300
>>>>>>>>>>>> #4  0x649458cb in pthread_create_wrapper () from
>>>>>>>>>>>> c:\Users\mkg.sorabji\csound-csound6-git\libwinpthread-1.dll
>>>>>>>>>>>> #5  0x7734906a in ui64tow () from C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>>>>> #6  0x77349147 in msvcrt!iswalnum () from
>>>>>>>>>>>> C:\Windows\SysWOW64\msvcrt.dll
>>>>>>>>>>>> #7  0x76c8850d in KERNEL32!BaseThreadInitThunk () from
>>>>>>>>>>>> C:\Windows\SysWOW64\kernel32.dll
>>>>>>>>>>>> #8  0x7751bf39 in ?? ()
>>>>>>>>>>>> #9  0x7751bf0c in ?? ()
>>>>>>>>>>>> #10 0x00000000 in ?? ()
>>>>>>>>>>>> (gdb)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Aug 16, 2013 at 6:13 AM, Michael Gogins
>>>>>>>>>>>> <michael.gogins@gmail.com> wrote:
>>>>>>>>>>>> I have just run this with head code for both Csound and CsoundQt.
>>>>>>>>>>>> All is good with rendering with plain Csound. In CsoundQt all is good with
>>>>>>>>>>>> rendering in the terminal. If I render to file in CsoundQt, it works once
>>>>>>>>>>>> for each file, then hangs or crashes CsoundQt. If I render to audio in
>>>>>>>>>>>> CsoundQt, it hangs or crashes the first time.
>>>>>>>>>>>>
>>>>>>>>>>>> Did anyone try an empty csd?
>>>>>>>>>>>>
>>>>>>>>>>>> If I run an empty csd in CsoundQt and render to terminal, all is
>>>>>>>>>>>> fine. If I render to file in CsoundQt or render to audio in CsoundQt with an
>>>>>>>>>>>> empty file, it hangs.
>>>>>>>>>>>>
>>>>>>>>>>>> CsoundQt uses CsoundPerformanceThread, so that and CsoundQt's
>>>>>>>>>>>> CsoundEngine are places to look for trouble.
>>>>>>>>>>>>
>>>>>>>>>>>> I think it's pretty clear from this behavior across platforms
>>>>>>>>>>>> that current CsoundPerformanceThread or CsoundQt for Csound 6 has a serious
>>>>>>>>>>>> bug not specific to Windows. Behavior various however from machine to
>>>>>>>>>>>> machine. I suspect that bad CsoundPerformanceThread or CsoundQt writes are
>>>>>>>>>>>> corrupting Csound variables.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ===========================
>>>>>>>>>>>> Michael Gogins
>>>>>>>>>>>> Irreducible Productions
>>>>>>>>>>>> http://michaelgogins.tumblr.com
>>>>>>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 15, 2013 at 4:59 PM, joachim heintz
>>>>>>>>>>>> <jh@joachimheintz.de> wrote:
>>>>>>>>>>>> hi -
>>>>>>>>>>>>
>>>>>>>>>>>> i experience a somehow strange bug in csoundqt.
>>>>>>>>>>>>
>>>>>>>>>>>> when i run StrayNumToFt.csd via the PLAY button, i get lots of
>>>>>>>>>>>> errors:
>>>>>>>>>>>> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>>>>>>>>>>
>>>>>>>>>>>> when i run the same file as RUN IN TERM, it is fine (same from
>>>>>>>>>>>> the command line).
>>>>>>>>>>>>
>>>>>>>>>>>> when i run a very simple csd with strtod in csoundqt, i get no
>>>>>>>>>>>> output at all (again no problem in "run in term").
>>>>>>>>>>>>
>>>>>>>>>>>> this is with csound6 and csoundqt both from git, on ubuntu studio
>>>>>>>>>>>> 12.04.
>>>>>>>>>>>>
>>>>>>>>>>>> best -
>>>>>>>>>>>>
>>>>>>>>>>>>        joachim
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>>>
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>>>
>>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk_______________________________________________
>>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>>
>>>>>>>>>>> Dr Victor Lazzarini
>>>>>>>>>>> Senior Lecturer
>>>>>>>>>>> Dept. of Music
>>>>>>>>>>> NUI Maynooth Ireland
>>>>>>>>>>> tel.: +353 1 708 3545
>>>>>>>>>>> Victor dot Lazzarini AT nuim dot ie
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>>>
>>>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-devel mailing list
>>>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>>
>>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-devel mailing list
>>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>>
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Csound-devel mailing list
>>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>>> It's a free troubleshooting tool designed for production.
>>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>>
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>>> It's a free troubleshooting tool designed for production.
>>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>>> Download for free and get started troubleshooting in minutes.
>>>>>>
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>>> It's a free troubleshooting tool designed for production.
>>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>>> Download for free and get started troubleshooting in minutes.
>>>>>
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>>> It's a free troubleshooting tool designed for production.
>>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>>> Download for free and get started troubleshooting in minutes.
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>>> It's a free troubleshooting tool designed for production.
>>> Get down to code-level detail for bottlenecks, with <2% overhead.
>>> Download for free and get started troubleshooting in minutes.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-28 13:34
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsStrayNumToFt.csd  None  None  
i just started csoundqt from the terminal, and tried again to run 
StrayNumToFt.csd. i thought i'd report the output here; perhaps it may 
help to see what's wrong (either with my configuration or with csoundqt).
thanks -
	joachim


jh@lenov:~$ /home/jh/src/qutecsound-code/bin/CsoundQt-d-py
virtual_keyboard real time MIDI plugin for Csound
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes.
0dBFS level = 32768,0
Csound version 6.00.1 (double samples) Aug 26 2013
libsndfile-1.0.25
Object::connect: No such slot WidgetPanel::dockStateChanged(bool)
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
Object::connect: No such signal LiveEventFrame::closed(LiveEventFrame *)
Object::connect:  (sender name:   'LiveEventFrame')
Object::connect:  (receiver name: 'LiveEventControl')
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
DocumentPage::getMacOptions() Option Options:  not found!
DocumentPage::applyMacOptions() no Geometry!
 loaded.
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
virtual_keyboard real time MIDI plugin for Csound
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes.
0dBFS level = 32768,0
Csound version 6.00.1 (double samples) Aug 26 2013
libsndfile-1.0.25
UnifiedCSD:  /home/jh/StrayNumToFt.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes.
sorting score ...
	... done
Csound version 6.00.1 (double samples) Aug 26 2013
displays suppressed
0dBFS level = 32768,0
orch now loaded
audio buffered in 1024 sample-frame blocks
writing 1024 sample blks of 64-bit floats to dac
SECTION 1:
csound
-b1024
-B4096
-+rtaudio=alsa
-odac
-+rtmidi=alsaraw
--env:CSNOSTOP=yes
/home/jh/StrayNumToFt.csd

Stray = '1 -2 3 4 5 6 7'
StrExpr1 = '1'
StrExpr1 = '-2'
StrExpr1 = '3'
StrExpr1 = '4'
StrExpr1 = '5'
StrExpr1 = '6'
StrExpr1 = '7'
ift# = 101, iftlen = 7
table content = [1,00000, -2,00000, 3,00000, 4,00000, 5,00000, 6,00000, 
7,00000]

Stray = '1.2  	2+3.45  6.7/-8.09 '
StrExpr1 = '1.2'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
ires	strtod	Str	
StrExpr1 = '2+3.45'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '6.7/-8.09'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
ift# = 102, iftlen = 3
table content = [7,00000, 2,00000, inf]
  - note deleted.  i1 had 4 init errors
	  B  0,010
Stray = '  	15%12  -5-3   '
StrExpr1 = '15%12'
StrExpr1 = '-5-3'
ift# = 103, iftlen = 2
table content = [3,00000, -8,00000]

Stray = '	 2^0.6	 2^(1/12) 2^(-1/12)  	16 32'
StrExpr1 = '2^0.6'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
StrExpr1 = '-1/12'
StrExpr1 = '2^-0,083333'
StrExpr1 = '16'
StrExpr1 = '32'
ift# = 104, iftlen = 5
table content = [4096,00000, 1,05946, 0,94387, 16,00000, 32,00000]
  - note deleted.  i1 had 1 init errors
	  B  0,030
Stray = '123*-4.56	 '
StrExpr1 = '123*-4.56'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
ift# = 105, iftlen = 1
table content = [-10,24996]
  - note deleted.  i1 had 1 init errors
	  B  0,040
Stray = '123*(-4.56)	 '
StrExpr1 = '-4.56'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
inum	strtod	S2	
StrExpr1 = '123*-0,000000'
ift# = 106, iftlen = 1
table content = [-0,00000]
  - note deleted.  i1 had 1 init errors
	  B  0,050
Stray = '	 '
WARNING! StrayNumToFt got empty string as input. Function table with 
length=1 created, but iftlen=0 returned.
ift# = 107, iftlen = 0
table content = [0,00000]

Stray = ''
WARNING! StrayNumToFt got empty string as input. Function table with 
length=1 created, but iftlen=0 returned.
ift# = 108, iftlen = 0
table content = [0,00000]

Stray = '-(1+2.7)*-3 2^-(-1/-12) -(-3.10*-65)/-3.4567 27%5'
StrExpr1 = '1+2.7'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '-1,000000*-3'
StrExpr1 = '-1/-12'
StrExpr1 = '2^-0,083333'
StrExpr1 = '-3.10*-65'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
StrExpr1 = '65,000000/-3.4567'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '27%5'
ift# = 109, iftlen = 4
table content = [3,00000, 0,94387, -21,66667, 2,00000]
  - note deleted.  i1 had 3 init errors
	  B  0,080
Stray = '1+2.7 2^(1/12) 3.10*65 27%5'
StrExpr1 = '1+2.7'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
StrExpr1 = '3.10*65'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
StrExpr1 = '27%5'
ift# = 110, iftlen = 4
table content = [6,00000, 1,05946, 65,00000, 2,00000]
  - note deleted.  i1 had 2 init errors
	  B  0,090
Stray = '1+2.7 2^(1/12) 3.10*65 27%6'
StrExpr1 = '1+2.7'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
StrExpr1 = '3.10*65'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
StrExpr1 = '27%6'
ift# = 13, iftlen = 4
table content = [1,08333, 1,05946, 65,00000, 3,00000]
  - note deleted.  i1 had 2 init errors
	  B  0,100
Stray = '1+2.7,2^(1/12),3.10*65,27%7'
StrExpr1 = '1+2.7'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
StrExpr1 = '3.10*65'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
StrExpr1 = '27%7'
ift# = 111, iftlen = 4
table content = [1,08333, 1,05946, 65,00000, 6,00000]
  - note deleted.  i1 had 2 init errors
	  B  0,110
Stray = '1+2.7, 2^(1/12), 3.10*65, 27%8'
StrExpr1 = '1+2.7'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '1/12'
StrExpr1 = ' 2^0,083333'
StrExpr1 = ' 3.10*65'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
StrExpr1 = ' 27%8'
ift# = 112, iftlen = 4
table content = [1,08333, 1,05946, 65,00000, 3,00000]
  - note deleted.  i1 had 2 init errors
	  B  0,120
Stray = '1+2.7,2^(1/12)|3.10*65,27%9'
StrExpr1 = '1+2.7'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
StrExpr1 = '3.10*65'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1	strtod	S1	
StrExpr1 = '27%9'
ift# = 113, iftlen = 4
table content = [1,08333, 1,05946, 65,00000, 0,00000]
  - note deleted.  i1 had 2 init errors
	  B  0,130Score finished in csoundPerformKsmps().
inactive allocs returned to freespace
end of score.		   overall amps:      0,0
	   overall samples out of range:        0
10 errors in performance
6 1024 sample blks of 64-bit floats written to dac
csoundDestroyThreadLock: : Erfolg
csoundDestroyThreadLock: : Erfolg
CsoundEngine::stopCsound() joined
CsoundQt::stop()  -1
messageListDispatcher quit
messageListDispatcher quit
CsoundQt::changePage index < 0
messageListDispatcher quit
end of score.		   overall amps:      0,0
	   overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 22,551s, CPU: 6,340s
jh@lenov:~$

Date2013-08-28 13:54
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] bug with strtod in csoundqt
The message "strtod: invalid format" means that the string not empty after
initial spaces and tabs and a number.  What is the argument?
==John ff



    x = cs_strtod(s, &tmp);
    if (UNLIKELY(*tmp != '\0'))
      return StrOp_ErrMsg(p, "invalid format");  <==================
    *p->indx = (MYFLT) x;



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-28 15:25
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
i attached the code which runs fine in plain csound6.


Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk:
> The message "strtod: invalid format" means that the string not empty after
> initial spaces and tabs and a number.  What is the argument?
> ==John ff
>
>
>
>      x = cs_strtod(s, &tmp);
>      if (UNLIKELY(*tmp != '\0'))
>        return StrOp_ErrMsg(p, "invalid format");  <==================
>      *p->indx = (MYFLT) x;
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-28 19:06
FromAndres Cabrera
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
Hi Joachim,

This seems like an issue with locale. Maybe CsoundQt is setting a different locale than the command line, and changing the decimal separator. Can this explain the problem?

Cheers,
Andrés


On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz <jh@joachimheintz.de> wrote:
i attached the code which runs fine in plain csound6.


Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk:
> The message "strtod: invalid format" means that the string not empty after
> initial spaces and tabs and a number.  What is the argument?
> ==John ff
>
>
>
>      x = cs_strtod(s, &tmp);
>      if (UNLIKELY(*tmp != '\0'))
>        return StrOp_ErrMsg(p, "invalid format");  <==================
>      *p->indx = (MYFLT) x;
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-28 19:43
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
hi andrés -

i think it could! but how could i / could we change this?
on a way i experienced that it is stupid in many ways not to install a 
native english os version (for instance because of an absolute idotic 
bug with jack on the german version of ubuntu studio). on the other hand 
i suspect i will not the only one who did or will do, as there may be 
other languages than english in the world ...
so, i am happy to be the guinea pig. what could be the solution?
thanks -
	joachim


Am 28.08.2013 20:06, schrieb Andres Cabrera:
> Hi Joachim,
>
> This seems like an issue with locale. Maybe CsoundQt is setting a
> different locale than the command line, and changing the decimal
> separator. Can this explain the problem?
>
> Cheers,
> Andrés
>
>
> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz  > wrote:
>
>     i attached the code which runs fine in plain csound6.
>
>
>     Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>     :
>      > The message "strtod: invalid format" means that the string not
>     empty after
>      > initial spaces and tabs and a number.  What is the argument?
>      > ==John ff
>      >
>      >
>      >
>      >      x = cs_strtod(s, &tmp);
>      >      if (UNLIKELY(*tmp != '\0'))
>      >        return StrOp_ErrMsg(p, "invalid format");  <==================
>      >      *p->indx = (MYFLT) x;
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------------
>      > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>     more!
>      > Discover the easy way to master current and previous Microsoft
>     technologies
>      > and advance your career. Get an incredible 1,500+ hours of
>     step-by-step
>      > tutorial videos with LearnDevNow. Subscribe today and save!
>      >
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>      > _______________________________________________
>      > Csound-devel mailing list
>      > Csound-devel@lists.sourceforge.net
>     
>      > https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >
>
>     ------------------------------------------------------------------------------
>     Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>     Discover the easy way to master current and previous Microsoft
>     technologies
>     and advance your career. Get an incredible 1,500+ hours of step-by-step
>     tutorial videos with LearnDevNow. Subscribe today and save!
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>     _______________________________________________
>     Csound-devel mailing list
>     Csound-devel@lists.sourceforge.net
>     
>     https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/li

Date2013-08-28 20:27
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
Just to note, earlier this summer we went through issues with Locale
and Csound.  I think we ended up with a semi-solution where certain
platforms used locale-agnostic functions and others did not.

However, I looked through the code and found two instances of strtod
still in use, instead of cs_strtod.  One of them was for the strtod
opcode.  I've made a couple changes and pushed those to GIT.  Joachim,
could you pull from the develop branch and try recompiling csound and
re-testing?

My guess is this: strtod will use the locale of the system.  cs_strtod
will always use the "C" locale which uses periods for decimal points.
With the csound executable, there's a bit of a hack that sets the C
locale then runs csound. When csound is used as a library (i.e.
CsoundQT), I don't know if that locale hack is used, or if some other
library changes the locale back to the native locale.  Either way,
cs_strtod is meant to solve that problem by being locale-agnostic
(always uses C Locale).  I think that might explain the issue between
running in csound commandline vs. CsoundQT.


On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz  wrote:
> hi andrés -
>
> i think it could! but how could i / could we change this?
> on a way i experienced that it is stupid in many ways not to install a
> native english os version (for instance because of an absolute idotic
> bug with jack on the german version of ubuntu studio). on the other hand
> i suspect i will not the only one who did or will do, as there may be
> other languages than english in the world ...
> so, i am happy to be the guinea pig. what could be the solution?
> thanks -
>         joachim
>
>
> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>> Hi Joachim,
>>
>> This seems like an issue with locale. Maybe CsoundQt is setting a
>> different locale than the command line, and changing the decimal
>> separator. Can this explain the problem?
>>
>> Cheers,
>> Andrés
>>
>>
>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz > > wrote:
>>
>>     i attached the code which runs fine in plain csound6.
>>
>>
>>     Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>     :
>>      > The message "strtod: invalid format" means that the string not
>>     empty after
>>      > initial spaces and tabs and a number.  What is the argument?
>>      > ==John ff
>>      >
>>      >
>>      >
>>      >      x = cs_strtod(s, &tmp);
>>      >      if (UNLIKELY(*tmp != '\0'))
>>      >        return StrOp_ErrMsg(p, "invalid format");  <==================
>>      >      *p->indx = (MYFLT) x;
>>      >
>>      >
>>      >
>>      >
>>     ------------------------------------------------------------------------------
>>      > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>     more!
>>      > Discover the easy way to master current and previous Microsoft
>>     technologies
>>      > and advance your career. Get an incredible 1,500+ hours of
>>     step-by-step
>>      > tutorial videos with LearnDevNow. Subscribe today and save!
>>      >
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>      > _______________________________________________
>>      > Csound-devel mailing list
>>      > Csound-devel@lists.sourceforge.net
>>     
>>      > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>      >
>>
>>     ------------------------------------------------------------------------------
>>     Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>     Discover the easy way to master current and previous Microsoft
>>     technologies
>>     and advance your career. Get an incredible 1,500+ hours of step-by-step
>>     tutorial videos with LearnDevNow. Subscribe today and save!
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>     _______________________________________________
>>     Csound-devel mailing list
>>     Csound-devel@lists.sourceforge.net
>>     
>>     https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>
>>
>>
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-28 21:23
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
thanks very much, steven. this seems to be the right path!:

earlier, i got this:

 >>
Stray = '1.2      2+3.45  6.7/-8.09 '
StrExpr1 = '1.2'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
ires    strtod    Str
StrExpr1 = '2+3.45'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2    strtod    S2
StrExpr1 = '6.7/-8.09'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1    strtod    S1
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2    strtod    S2
ift# = 102, iftlen = 3
table content = [7,00000, 2,00000, inf]
  - note deleted.  i1 had 4 init errors
       B  0,010
<<

now, with your change:

 >>
Stray = '1.2  	2+3.45  6.7/-8.09 '
StrExpr1 = '1.2'
StrExpr1 = '2+3.45'
StrExpr1 = '6.7/-8.09'
ift# = 102, iftlen = 3
table content = [1,20000, 5,45000, -0,82818]
<<

so, this error has disappeared!

but, unfortunately, this is not valuable for all the errors:

Stray = '	 2^0.6	 2^(1/12) 2^(-1/12)  	16 32'
StrExpr1 = '2^0.6'
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '-1/12'
StrExpr1 = '2^-0,083333'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2	strtod	S2	
StrExpr1 = '16'
StrExpr1 = '32'
ift# = 104, iftlen = 5
table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
  - note deleted.  i1 had 2 init errors


in total, i get "8 errors in performance" instead of 10 ... - at least a 
step in the right direction!


i am wondering:

1) why is this behaviour different if i
a) run in csoundqt, or
b) in terminal?

2) why is this behaviour different to csoundqt with csound5 where i 
never had these issues?

if there is an answer, it could perhaps be fixed. thanks again, and best 
regards -

	joachim


Am 28.08.2013 21:27, schrieb Steven Yi:
> Just to note, earlier this summer we went through issues with Locale
> and Csound.  I think we ended up with a semi-solution where certain
> platforms used locale-agnostic functions and others did not.
>
> However, I looked through the code and found two instances of strtod
> still in use, instead of cs_strtod.  One of them was for the strtod
> opcode.  I've made a couple changes and pushed those to GIT.  Joachim,
> could you pull from the develop branch and try recompiling csound and
> re-testing?
>
> My guess is this: strtod will use the locale of the system.  cs_strtod
> will always use the "C" locale which uses periods for decimal points.
> With the csound executable, there's a bit of a hack that sets the C
> locale then runs csound. When csound is used as a library (i.e.
> CsoundQT), I don't know if that locale hack is used, or if some other
> library changes the locale back to the native locale.  Either way,
> cs_strtod is meant to solve that problem by being locale-agnostic
> (always uses C Locale).  I think that might explain the issue between
> running in csound commandline vs. CsoundQT.
>
>
> On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz  wrote:
>> hi andrés -
>>
>> i think it could! but how could i / could we change this?
>> on a way i experienced that it is stupid in many ways not to install a
>> native english os version (for instance because of an absolute idotic
>> bug with jack on the german version of ubuntu studio). on the other hand
>> i suspect i will not the only one who did or will do, as there may be
>> other languages than english in the world ...
>> so, i am happy to be the guinea pig. what could be the solution?
>> thanks -
>>          joachim
>>
>>
>> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>>> Hi Joachim,
>>>
>>> This seems like an issue with locale. Maybe CsoundQt is setting a
>>> different locale than the command line, and changing the decimal
>>> separator. Can this explain the problem?
>>>
>>> Cheers,
>>> Andrés
>>>
>>>
>>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz >> > wrote:
>>>
>>>      i attached the code which runs fine in plain csound6.
>>>
>>>
>>>      Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>>      :
>>>       > The message "strtod: invalid format" means that the string not
>>>      empty after
>>>       > initial spaces and tabs and a number.  What is the argument?
>>>       > ==John ff
>>>       >
>>>       >
>>>       >
>>>       >      x = cs_strtod(s, &tmp);
>>>       >      if (UNLIKELY(*tmp != '\0'))
>>>       >        return StrOp_ErrMsg(p, "invalid format");  <==================
>>>       >      *p->indx = (MYFLT) x;
>>>       >
>>>       >
>>>       >
>>>       >
>>>      ------------------------------------------------------------------------------
>>>       > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>      more!
>>>       > Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>       > and advance your career. Get an incredible 1,500+ hours of
>>>      step-by-step
>>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       > _______________________________________________
>>>       > Csound-devel mailing list
>>>       > Csound-devel@lists.sourceforge.net
>>>      
>>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >
>>>
>>>      ------------------------------------------------------------------------------
>>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>      Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>      and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>      tutorial videos with LearnDevNow. Subscribe today and save!
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>      _______________________________________________
>>>      Csound-devel mailing list
>>>      Csound-devel@lists.sourceforge.net
>>>      
>>>      https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>> Discover the easy way to master current and previous Microsoft technologies
>>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>
>>>
>>>
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-

Date2013-08-28 21:27
FromMichael Gogins
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  
When you run "in terminal" from CsoundQt, it is really running as if it just plain old Csound. There is no CsoundPerformanceThread, and the Csound command sets up the locale etc.

When you in run "in CsoundQt", CsoundQt runs Csound using the Csound API and CsoundPerformanceThread. The Qt libraries or CsoundQt may have something to do with the locale.

Hope this helps,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Wed, Aug 28, 2013 at 4:23 PM, joachim heintz <jh@joachimheintz.de> wrote:
thanks very much, steven. this seems to be the right path!:

earlier, i got this:

 >>
Stray = '1.2      2+3.45  6.7/-8.09 '
StrExpr1 = '1.2'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
ires    strtod    Str
StrExpr1 = '2+3.45'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2    strtod    S2
StrExpr1 = '6.7/-8.09'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i1    strtod    S1
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2    strtod    S2
ift# = 102, iftlen = 3
table content = [7,00000, 2,00000, inf]
  - note deleted.  i1 had 4 init errors
       B  0,010
<<

now, with your change:

 >>
Stray = '1.2    2+3.45  6.7/-8.09 '
StrExpr1 = '1.2'
StrExpr1 = '2+3.45'
StrExpr1 = '6.7/-8.09'
ift# = 102, iftlen = 3
table content = [1,20000, 5,45000, -0,82818]
<<

so, this error has disappeared!

but, unfortunately, this is not valuable for all the errors:

Stray = '        2^0.6   2^(1/12) 2^(-1/12)     16 32'
StrExpr1 = '2^0.6'
StrExpr1 = '1/12'
StrExpr1 = '2^0,083333'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2      strtod  S2
StrExpr1 = '-1/12'
StrExpr1 = '2^-0,083333'
INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
i2      strtod  S2
StrExpr1 = '16'
StrExpr1 = '32'
ift# = 104, iftlen = 5
table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
  - note deleted.  i1 had 2 init errors


in total, i get "8 errors in performance" instead of 10 ... - at least a
step in the right direction!


i am wondering:

1) why is this behaviour different if i
a) run in csoundqt, or
b) in terminal?

2) why is this behaviour different to csoundqt with csound5 where i
never had these issues?

if there is an answer, it could perhaps be fixed. thanks again, and best
regards -

        joachim


Am 28.08.2013 21:27, schrieb Steven Yi:
> Just to note, earlier this summer we went through issues with Locale
> and Csound.  I think we ended up with a semi-solution where certain
> platforms used locale-agnostic functions and others did not.
>
> However, I looked through the code and found two instances of strtod
> still in use, instead of cs_strtod.  One of them was for the strtod
> opcode.  I've made a couple changes and pushed those to GIT.  Joachim,
> could you pull from the develop branch and try recompiling csound and
> re-testing?
>
> My guess is this: strtod will use the locale of the system.  cs_strtod
> will always use the "C" locale which uses periods for decimal points.
> With the csound executable, there's a bit of a hack that sets the C
> locale then runs csound. When csound is used as a library (i.e.
> CsoundQT), I don't know if that locale hack is used, or if some other
> library changes the locale back to the native locale.  Either way,
> cs_strtod is meant to solve that problem by being locale-agnostic
> (always uses C Locale).  I think that might explain the issue between
> running in csound commandline vs. CsoundQT.
>
>
> On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz <jh@joachimheintz.de> wrote:
>> hi andrés -
>>
>> i think it could! but how could i / could we change this?
>> on a way i experienced that it is stupid in many ways not to install a
>> native english os version (for instance because of an absolute idotic
>> bug with jack on the german version of ubuntu studio). on the other hand
>> i suspect i will not the only one who did or will do, as there may be
>> other languages than english in the world ...
>> so, i am happy to be the guinea pig. what could be the solution?
>> thanks -
>>          joachim
>>
>>
>> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>>> Hi Joachim,
>>>
>>> This seems like an issue with locale. Maybe CsoundQt is setting a
>>> different locale than the command line, and changing the decimal
>>> separator. Can this explain the problem?
>>>
>>> Cheers,
>>> Andrés
>>>
>>>
>>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz <jh@joachimheintz.de
>>> <mailto:jh@joachimheintz.de>> wrote:
>>>
>>>      i attached the code which runs fine in plain csound6.
>>>
>>>
>>>      Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>>      <mailto:jpff@cs.bath.ac.uk>:
>>>       > The message "strtod: invalid format" means that the string not
>>>      empty after
>>>       > initial spaces and tabs and a number.  What is the argument?
>>>       > ==John ff
>>>       >
>>>       >
>>>       >
>>>       >      x = cs_strtod(s, &tmp);
>>>       >      if (UNLIKELY(*tmp != '\0'))
>>>       >        return StrOp_ErrMsg(p, "invalid format");  <==================
>>>       >      *p->indx = (MYFLT) x;
>>>       >
>>>       >
>>>       >
>>>       >
>>>      ------------------------------------------------------------------------------
>>>       > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>      more!
>>>       > Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>       > and advance your career. Get an incredible 1,500+ hours of
>>>      step-by-step
>>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       > _______________________________________________
>>>       > Csound-devel mailing list
>>>       > Csound-devel@lists.sourceforge.net
>>>      <mailto:Csound-devel@lists.sourceforge.net>
>>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >
>>>
>>>      ------------------------------------------------------------------------------
>>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>      Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>      and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>      tutorial videos with LearnDevNow. Subscribe today and save!
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>      _______________________________________________
>>>      Csound-devel mailing list
>>>      Csound-devel@lists.sourceforge.net
>>>      <mailto:Csound-devel@lists.sourceforge.net>
>>>      https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>> Discover the easy way to master current and previous Microsoft technologies
>>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>
>>>
>>>
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-08-28 21:36
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
Hi Joachim,

I think this is in the same vein as strtod/cs_strtod. My guess is that
something is using sprintf and that's not been protected for locales.
 However, it looks like we need to change all sprintf to use locales.
Unfortunately, this is not a small change!  (sprintf is used in many
places)

Could someone else perhaps take a look at this one?  I think we just
need to create a cs_sprintf function similarly to strtod/cs_strtod,
and use cs_sprintf everywhere.  This could map to sprintf_l on
platforms where available. We'd need to modify CMakeLists.txt to
search for sprintf_l, something like:

check_function_exists(sprintf_l HAVE_SPRINTF_L)

if(HAVE_SPRINTF_L)
    add_definitions(-DHAVE_SPRINTF_L)
endif()

On Wed, Aug 28, 2013 at 4:23 PM, joachim heintz  wrote:
> thanks very much, steven. this seems to be the right path!:
>
> earlier, i got this:
>
>  >>
> Stray = '1.2      2+3.45  6.7/-8.09 '
> StrExpr1 = '1.2'
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> ires    strtod    Str
> StrExpr1 = '2+3.45'
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> i2    strtod    S2
> StrExpr1 = '6.7/-8.09'
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> i1    strtod    S1
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> i2    strtod    S2
> ift# = 102, iftlen = 3
> table content = [7,00000, 2,00000, inf]
>   - note deleted.  i1 had 4 init errors
>        B  0,010
> <<
>
> now, with your change:
>
>  >>
> Stray = '1.2    2+3.45  6.7/-8.09 '
> StrExpr1 = '1.2'
> StrExpr1 = '2+3.45'
> StrExpr1 = '6.7/-8.09'
> ift# = 102, iftlen = 3
> table content = [1,20000, 5,45000, -0,82818]
> <<
>
> so, this error has disappeared!
>
> but, unfortunately, this is not valuable for all the errors:
>
> Stray = '        2^0.6   2^(1/12) 2^(-1/12)     16 32'
> StrExpr1 = '2^0.6'
> StrExpr1 = '1/12'
> StrExpr1 = '2^0,083333'
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> i2      strtod  S2
> StrExpr1 = '-1/12'
> StrExpr1 = '2^-0,083333'
> INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
> i2      strtod  S2
> StrExpr1 = '16'
> StrExpr1 = '32'
> ift# = 104, iftlen = 5
> table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
>   - note deleted.  i1 had 2 init errors
>
>
> in total, i get "8 errors in performance" instead of 10 ... - at least a
> step in the right direction!
>
>
> i am wondering:
>
> 1) why is this behaviour different if i
> a) run in csoundqt, or
> b) in terminal?
>
> 2) why is this behaviour different to csoundqt with csound5 where i
> never had these issues?
>
> if there is an answer, it could perhaps be fixed. thanks again, and best
> regards -
>
>         joachim
>
>
> Am 28.08.2013 21:27, schrieb Steven Yi:
>> Just to note, earlier this summer we went through issues with Locale
>> and Csound.  I think we ended up with a semi-solution where certain
>> platforms used locale-agnostic functions and others did not.
>>
>> However, I looked through the code and found two instances of strtod
>> still in use, instead of cs_strtod.  One of them was for the strtod
>> opcode.  I've made a couple changes and pushed those to GIT.  Joachim,
>> could you pull from the develop branch and try recompiling csound and
>> re-testing?
>>
>> My guess is this: strtod will use the locale of the system.  cs_strtod
>> will always use the "C" locale which uses periods for decimal points.
>> With the csound executable, there's a bit of a hack that sets the C
>> locale then runs csound. When csound is used as a library (i.e.
>> CsoundQT), I don't know if that locale hack is used, or if some other
>> library changes the locale back to the native locale.  Either way,
>> cs_strtod is meant to solve that problem by being locale-agnostic
>> (always uses C Locale).  I think that might explain the issue between
>> running in csound commandline vs. CsoundQT.
>>
>>
>> On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz  wrote:
>>> hi andrés -
>>>
>>> i think it could! but how could i / could we change this?
>>> on a way i experienced that it is stupid in many ways not to install a
>>> native english os version (for instance because of an absolute idotic
>>> bug with jack on the german version of ubuntu studio). on the other hand
>>> i suspect i will not the only one who did or will do, as there may be
>>> other languages than english in the world ...
>>> so, i am happy to be the guinea pig. what could be the solution?
>>> thanks -
>>>          joachim
>>>
>>>
>>> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>>>> Hi Joachim,
>>>>
>>>> This seems like an issue with locale. Maybe CsoundQt is setting a
>>>> different locale than the command line, and changing the decimal
>>>> separator. Can this explain the problem?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>>
>>>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz >>> > wrote:
>>>>
>>>>      i attached the code which runs fine in plain csound6.
>>>>
>>>>
>>>>      Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>>>      :
>>>>       > The message "strtod: invalid format" means that the string not
>>>>      empty after
>>>>       > initial spaces and tabs and a number.  What is the argument?
>>>>       > ==John ff
>>>>       >
>>>>       >
>>>>       >
>>>>       >      x = cs_strtod(s, &tmp);
>>>>       >      if (UNLIKELY(*tmp != '\0'))
>>>>       >        return StrOp_ErrMsg(p, "invalid format");  <==================
>>>>       >      *p->indx = (MYFLT) x;
>>>>       >
>>>>       >
>>>>       >
>>>>       >
>>>>      ------------------------------------------------------------------------------
>>>>       > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>>      more!
>>>>       > Discover the easy way to master current and previous Microsoft
>>>>      technologies
>>>>       > and advance your career. Get an incredible 1,500+ hours of
>>>>      step-by-step
>>>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>>>>       >
>>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>       > _______________________________________________
>>>>       > Csound-devel mailing list
>>>>       > Csound-devel@lists.sourceforge.net
>>>>      
>>>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>       >
>>>>
>>>>      ------------------------------------------------------------------------------
>>>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>>      Discover the easy way to master current and previous Microsoft
>>>>      technologies
>>>>      and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>>      tutorial videos with LearnDevNow. Subscribe today and save!
>>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>      _______________________________________________
>>>>      Csound-devel mailing list
>>>>      Csound-devel@lists.sourceforge.net
>>>>      
>>>>      https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>> Discover the easy way to master current and previous Microsoft technologies
>>>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>> Discover the easy way to master current and previous Microsoft technologies
>>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-28 21:36
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
yes, thanks. as the qt libraries did not change on my computer, the 
problem seems to be either in the CsoundPerformanceThread (if it is 
different to the one in csound5), or in the new way csoundqt is using it.

	joachim


Am 28.08.2013 22:27, schrieb Michael Gogins:
> When you run "in terminal" from CsoundQt, it is really running as if it
> just plain old Csound. There is no CsoundPerformanceThread, and the
> Csound command sets up the locale etc.
>
> When you in run "in CsoundQt", CsoundQt runs Csound using the Csound API
> and CsoundPerformanceThread. The Qt libraries or CsoundQt may have
> something to do with the locale.
>
> Hope this helps,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Wed, Aug 28, 2013 at 4:23 PM, joachim heintz  > wrote:
>
>     thanks very much, steven. this seems to be the right path!:
>
>     earlier, i got this:
>
>       >>
>     Stray = '1.2      2+3.45  6.7/-8.09 '
>     StrExpr1 = '1.2'
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>     ires    strtod    Str
>     StrExpr1 = '2+3.45'
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>     i2    strtod    S2
>     StrExpr1 = '6.7/-8.09'
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>     i1    strtod    S1
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>     i2    strtod    S2
>     ift# = 102, iftlen = 3
>     table content = [7,00000, 2,00000, inf]
>        - note deleted.  i1 had 4 init errors
>             B  0,010
>     <<
>
>     now, with your change:
>
>       >>
>     Stray = '1.2    2+3.45  6.7/-8.09 '
>     StrExpr1 = '1.2'
>     StrExpr1 = '2+3.45'
>     StrExpr1 = '6.7/-8.09'
>     ift# = 102, iftlen = 3
>     table content = [1,20000, 5,45000, -0,82818]
>     <<
>
>     so, this error has disappeared!
>
>     but, unfortunately, this is not valuable for all the errors:
>
>     Stray = '        2^0.6   2^(1/12) 2^(-1/12)     16 32'
>     StrExpr1 = '2^0.6'
>     StrExpr1 = '1/12'
>     StrExpr1 = '2^0,083333'
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>     i2      strtod  S2
>     StrExpr1 = '-1/12'
>     StrExpr1 = '2^-0,083333'
>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>     i2      strtod  S2
>     StrExpr1 = '16'
>     StrExpr1 = '32'
>     ift# = 104, iftlen = 5
>     table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
>        - note deleted.  i1 had 2 init errors
>
>
>     in total, i get "8 errors in performance" instead of 10 ... - at least a
>     step in the right direction!
>
>
>     i am wondering:
>
>     1) why is this behaviour different if i
>     a) run in csoundqt, or
>     b) in terminal?
>
>     2) why is this behaviour different to csoundqt with csound5 where i
>     never had these issues?
>
>     if there is an answer, it could perhaps be fixed. thanks again, and best
>     regards -
>
>              joachim
>
>
>     Am 28.08.2013 21:27, schrieb Steven Yi:
>      > Just to note, earlier this summer we went through issues with Locale
>      > and Csound.  I think we ended up with a semi-solution where certain
>      > platforms used locale-agnostic functions and others did not.
>      >
>      > However, I looked through the code and found two instances of strtod
>      > still in use, instead of cs_strtod.  One of them was for the strtod
>      > opcode.  I've made a couple changes and pushed those to GIT.
>       Joachim,
>      > could you pull from the develop branch and try recompiling csound and
>      > re-testing?
>      >
>      > My guess is this: strtod will use the locale of the system.
>       cs_strtod
>      > will always use the "C" locale which uses periods for decimal points.
>      > With the csound executable, there's a bit of a hack that sets the C
>      > locale then runs csound. When csound is used as a library (i.e.
>      > CsoundQT), I don't know if that locale hack is used, or if some other
>      > library changes the locale back to the native locale.  Either way,
>      > cs_strtod is meant to solve that problem by being locale-agnostic
>      > (always uses C Locale).  I think that might explain the issue between
>      > running in csound commandline vs. CsoundQT.
>      >
>      >
>      > On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz
>     > wrote:
>      >> hi andrés -
>      >>
>      >> i think it could! but how could i / could we change this?
>      >> on a way i experienced that it is stupid in many ways not to
>     install a
>      >> native english os version (for instance because of an absolute
>     idotic
>      >> bug with jack on the german version of ubuntu studio). on the
>     other hand
>      >> i suspect i will not the only one who did or will do, as there
>     may be
>      >> other languages than english in the world ...
>      >> so, i am happy to be the guinea pig. what could be the solution?
>      >> thanks -
>      >>          joachim
>      >>
>      >>
>      >> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>      >>> Hi Joachim,
>      >>>
>      >>> This seems like an issue with locale. Maybe CsoundQt is setting a
>      >>> different locale than the command line, and changing the decimal
>      >>> separator. Can this explain the problem?
>      >>>
>      >>> Cheers,
>      >>> Andrés
>      >>>
>      >>>
>      >>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz
>     
>      >>> >> wrote:
>      >>>
>      >>>      i attached the code which runs fine in plain csound6.
>      >>>
>      >>>
>      >>>      Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>     
>      >>>      >:
>      >>>       > The message "strtod: invalid format" means that the
>     string not
>      >>>      empty after
>      >>>       > initial spaces and tabs and a number.  What is the
>     argument?
>      >>>       > ==John ff
>      >>>       >
>      >>>       >
>      >>>       >
>      >>>       >      x = cs_strtod(s, &tmp);
>      >>>       >      if (UNLIKELY(*tmp != '\0'))
>      >>>       >        return StrOp_ErrMsg(p, "invalid format");
>       <==================
>      >>>       >      *p->indx = (MYFLT) x;
>      >>>       >
>      >>>       >
>      >>>       >
>      >>>       >
>      >>>
>       ------------------------------------------------------------------------------
>      >>>       > Learn the latest--Visual Studio 2012, SharePoint 2013,
>     SQL 2012,
>      >>>      more!
>      >>>       > Discover the easy way to master current and previous
>     Microsoft
>      >>>      technologies
>      >>>       > and advance your career. Get an incredible 1,500+ hours of
>      >>>      step-by-step
>      >>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>      >>>       >
>      >>>
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>      >>>       > _______________________________________________
>      >>>       > Csound-devel mailing list
>      >>>       > Csound-devel@lists.sourceforge.net
>     
>      >>>           >
>      >>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >>>       >
>      >>>
>      >>>
>       ------------------------------------------------------------------------------
>      >>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>     2012, more!
>      >>>      Discover the easy way to master current and previous Microsoft
>      >>>      technologies
>      >>>      and advance your career. Get an incredible 1,500+ hours of
>     step-by-step
>      >>>      tutorial videos with LearnDevNow. Subscribe today and save!
>      >>>
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>      >>>      _______________________________________________
>      >>>      Csound-devel mailing list
>      >>> Csound-devel@lists.sourceforge.net
>     
>      >>>           >
>      >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >>>
>      >>>
>      >>>
>      >>>
>      >>>
>     ------------------------------------------------------------------------------
>      >>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>     2012, more!
>      >>> Discover the easy way to master current and previous Microsoft
>     technologies
>      >>> and advance your career. Get an incredible 1,500+ hours of
>     step-by-step
>      >>> tutorial videos with LearnDevNow. Subscribe today and save!
>      >>>
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>      >>>
>      >>>
>      >>>
>      >>> _______________________________________________
>      >>> Csound-devel mailing list
>      >>> Csound-devel@lists.sourceforge.net
>     
>      >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >>>
>      >>
>      >>
>     ------------------------------------------------------------------------------
>      >> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>     more!
>      >> Discover the easy way to master current and previous Microsoft
>     technologies
>      >> and advance your career. Get an incredible 1,500+ hours of
>     step-by-step
>      >> tutorial videos with LearnDevNow. Subscribe today and save!
>      >>
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>      >> _______________________________________________
>      >> Csound-devel mailing list
>      >> Csound-devel@lists.sourceforge.net
>     
>      >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >
>      >
>     ------------------------------------------------------------------------------
>      > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>     more!
>      > Discover the easy way to master current and previous Microsoft
>     technologies
>      > and advance your career. Get an incredible 1,500+ hours of
>     step-by-step
>      > tutorial videos with LearnDevNow. Subscribe today and save!
>      >
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>      > _______________________________________________
>      > Csound-devel mailing list
>      > Csound-devel@lists.sourceforge.net
>     
>      > https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >
>
>     ------------------------------------------------------------------------------
>     Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>     Discover the easy way to master current and previous Microsoft
>     technologies
>     and advance your career. Get an incredible 1,500+ hours of step-by-step
>     tutorial videos with LearnDevNow. Subscribe today and save!
>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>     _______________________________________________
>     Csound-devel mailing list
>     Csound-devel@lists.sourceforge.net
>     
>     https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-

Date2013-08-28 21:40
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
It might not be a problem with older Csound5/CsoundQT as all functions
were not protected like cs_strtod is being used in CS6.  In this case,
because it looks like we only have partial protection (strtod is
protected but sprintf is not), there's a disagreement there.  I
imagine with CS5, all the functions behaved the same way, so while
locale changes may have happened, at least they did for all functions.

I think CS6's direction to use locale agnostic implementations is the
correct one, but I think we just missed functions like sprintf.
Hopefully soon this can all be sorted out.

On Wed, Aug 28, 2013 at 4:36 PM, joachim heintz  wrote:
> yes, thanks. as the qt libraries did not change on my computer, the
> problem seems to be either in the CsoundPerformanceThread (if it is
> different to the one in csound5), or in the new way csoundqt is using it.
>
>         joachim
>
>
> Am 28.08.2013 22:27, schrieb Michael Gogins:
>> When you run "in terminal" from CsoundQt, it is really running as if it
>> just plain old Csound. There is no CsoundPerformanceThread, and the
>> Csound command sets up the locale etc.
>>
>> When you in run "in CsoundQt", CsoundQt runs Csound using the Csound API
>> and CsoundPerformanceThread. The Qt libraries or CsoundQt may have
>> something to do with the locale.
>>
>> Hope this helps,
>> Mike
>>
>>
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Wed, Aug 28, 2013 at 4:23 PM, joachim heintz > > wrote:
>>
>>     thanks very much, steven. this seems to be the right path!:
>>
>>     earlier, i got this:
>>
>>       >>
>>     Stray = '1.2      2+3.45  6.7/-8.09 '
>>     StrExpr1 = '1.2'
>>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>     ires    strtod    Str
>>     StrExpr1 = '2+3.45'
>>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>     i2    strtod    S2
>>     StrExpr1 = '6.7/-8.09'
>>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>     i1    strtod    S1
>>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>     i2    strtod    S2
>>     ift# = 102, iftlen = 3
>>     table content = [7,00000, 2,00000, inf]
>>        - note deleted.  i1 had 4 init errors
>>             B  0,010
>>     <<
>>
>>     now, with your change:
>>
>>       >>
>>     Stray = '1.2    2+3.45  6.7/-8.09 '
>>     StrExpr1 = '1.2'
>>     StrExpr1 = '2+3.45'
>>     StrExpr1 = '6.7/-8.09'
>>     ift# = 102, iftlen = 3
>>     table content = [1,20000, 5,45000, -0,82818]
>>     <<
>>
>>     so, this error has disappeared!
>>
>>     but, unfortunately, this is not valuable for all the errors:
>>
>>     Stray = '        2^0.6   2^(1/12) 2^(-1/12)     16 32'
>>     StrExpr1 = '2^0.6'
>>     StrExpr1 = '1/12'
>>     StrExpr1 = '2^0,083333'
>>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>     i2      strtod  S2
>>     StrExpr1 = '-1/12'
>>     StrExpr1 = '2^-0,083333'
>>     INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>     i2      strtod  S2
>>     StrExpr1 = '16'
>>     StrExpr1 = '32'
>>     ift# = 104, iftlen = 5
>>     table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
>>        - note deleted.  i1 had 2 init errors
>>
>>
>>     in total, i get "8 errors in performance" instead of 10 ... - at least a
>>     step in the right direction!
>>
>>
>>     i am wondering:
>>
>>     1) why is this behaviour different if i
>>     a) run in csoundqt, or
>>     b) in terminal?
>>
>>     2) why is this behaviour different to csoundqt with csound5 where i
>>     never had these issues?
>>
>>     if there is an answer, it could perhaps be fixed. thanks again, and best
>>     regards -
>>
>>              joachim
>>
>>
>>     Am 28.08.2013 21:27, schrieb Steven Yi:
>>      > Just to note, earlier this summer we went through issues with Locale
>>      > and Csound.  I think we ended up with a semi-solution where certain
>>      > platforms used locale-agnostic functions and others did not.
>>      >
>>      > However, I looked through the code and found two instances of strtod
>>      > still in use, instead of cs_strtod.  One of them was for the strtod
>>      > opcode.  I've made a couple changes and pushed those to GIT.
>>       Joachim,
>>      > could you pull from the develop branch and try recompiling csound and
>>      > re-testing?
>>      >
>>      > My guess is this: strtod will use the locale of the system.
>>       cs_strtod
>>      > will always use the "C" locale which uses periods for decimal points.
>>      > With the csound executable, there's a bit of a hack that sets the C
>>      > locale then runs csound. When csound is used as a library (i.e.
>>      > CsoundQT), I don't know if that locale hack is used, or if some other
>>      > library changes the locale back to the native locale.  Either way,
>>      > cs_strtod is meant to solve that problem by being locale-agnostic
>>      > (always uses C Locale).  I think that might explain the issue between
>>      > running in csound commandline vs. CsoundQT.
>>      >
>>      >
>>      > On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz
>>     > wrote:
>>      >> hi andrés -
>>      >>
>>      >> i think it could! but how could i / could we change this?
>>      >> on a way i experienced that it is stupid in many ways not to
>>     install a
>>      >> native english os version (for instance because of an absolute
>>     idotic
>>      >> bug with jack on the german version of ubuntu studio). on the
>>     other hand
>>      >> i suspect i will not the only one who did or will do, as there
>>     may be
>>      >> other languages than english in the world ...
>>      >> so, i am happy to be the guinea pig. what could be the solution?
>>      >> thanks -
>>      >>          joachim
>>      >>
>>      >>
>>      >> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>>      >>> Hi Joachim,
>>      >>>
>>      >>> This seems like an issue with locale. Maybe CsoundQt is setting a
>>      >>> different locale than the command line, and changing the decimal
>>      >>> separator. Can this explain the problem?
>>      >>>
>>      >>> Cheers,
>>      >>> Andrés
>>      >>>
>>      >>>
>>      >>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz
>>     
>>      >>> >> wrote:
>>      >>>
>>      >>>      i attached the code which runs fine in plain csound6.
>>      >>>
>>      >>>
>>      >>>      Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>     
>>      >>>      >:
>>      >>>       > The message "strtod: invalid format" means that the
>>     string not
>>      >>>      empty after
>>      >>>       > initial spaces and tabs and a number.  What is the
>>     argument?
>>      >>>       > ==John ff
>>      >>>       >
>>      >>>       >
>>      >>>       >
>>      >>>       >      x = cs_strtod(s, &tmp);
>>      >>>       >      if (UNLIKELY(*tmp != '\0'))
>>      >>>       >        return StrOp_ErrMsg(p, "invalid format");
>>       <==================
>>      >>>       >      *p->indx = (MYFLT) x;
>>      >>>       >
>>      >>>       >
>>      >>>       >
>>      >>>       >
>>      >>>
>>       ------------------------------------------------------------------------------
>>      >>>       > Learn the latest--Visual Studio 2012, SharePoint 2013,
>>     SQL 2012,
>>      >>>      more!
>>      >>>       > Discover the easy way to master current and previous
>>     Microsoft
>>      >>>      technologies
>>      >>>       > and advance your career. Get an incredible 1,500+ hours of
>>      >>>      step-by-step
>>      >>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>>      >>>       >
>>      >>>
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>      >>>       > _______________________________________________
>>      >>>       > Csound-devel mailing list
>>      >>>       > Csound-devel@lists.sourceforge.net
>>     
>>      >>>      >     >
>>      >>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>      >>>       >
>>      >>>
>>      >>>
>>       ------------------------------------------------------------------------------
>>      >>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>>     2012, more!
>>      >>>      Discover the easy way to master current and previous Microsoft
>>      >>>      technologies
>>      >>>      and advance your career. Get an incredible 1,500+ hours of
>>     step-by-step
>>      >>>      tutorial videos with LearnDevNow. Subscribe today and save!
>>      >>>
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>      >>>      _______________________________________________
>>      >>>      Csound-devel mailing list
>>      >>> Csound-devel@lists.sourceforge.net
>>     
>>      >>>      >     >
>>      >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>      >>>
>>      >>>
>>      >>>
>>      >>>
>>      >>>
>>     ------------------------------------------------------------------------------
>>      >>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>>     2012, more!
>>      >>> Discover the easy way to master current and previous Microsoft
>>     technologies
>>      >>> and advance your career. Get an incredible 1,500+ hours of
>>     step-by-step
>>      >>> tutorial videos with LearnDevNow. Subscribe today and save!
>>      >>>
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>      >>>
>>      >>>
>>      >>>
>>      >>> _______________________________________________
>>      >>> Csound-devel mailing list
>>      >>> Csound-devel@lists.sourceforge.net
>>     
>>      >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>      >>>
>>      >>
>>      >>
>>     ------------------------------------------------------------------------------
>>      >> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>     more!
>>      >> Discover the easy way to master current and previous Microsoft
>>     technologies
>>      >> and advance your career. Get an incredible 1,500+ hours of
>>     step-by-step
>>      >> tutorial videos with LearnDevNow. Subscribe today and save!
>>      >>
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>      >> _______________________________________________
>>      >> Csound-devel mailing list
>>      >> Csound-devel@lists.sourceforge.net
>>     
>>      >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>      >
>>      >
>>     ------------------------------------------------------------------------------
>>      > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>     more!
>>      > Discover the easy way to master current and previous Microsoft
>>     technologies
>>      > and advance your career. Get an incredible 1,500+ hours of
>>     step-by-step
>>      > tutorial videos with LearnDevNow. Subscribe today and save!
>>      >
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>      > _______________________________________________
>>      > Csound-devel mailing list
>>      > Csound-devel@lists.sourceforge.net
>>     
>>      > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>      >
>>
>>     ------------------------------------------------------------------------------
>>     Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>     Discover the easy way to master current and previous Microsoft
>>     technologies
>>     and advance your career. Get an incredible 1,500+ hours of step-by-step
>>     tutorial videos with LearnDevNow. Subscribe today and save!
>>     http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>     _______________________________________________
>>     Csound-devel mailing list
>>     Csound-devel@lists.sourceforge.net
>>     
>>     https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>
>>
>>
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-29 08:57
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
i just cleaned up my csoundqt build and tried again. there is always a 
message that makes me wonder if it could be related:

QObject::connect: Cannot queue arguments of type 'QTextCharFormat'
(Make sure 'QTextCharFormat' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCharFormat'
(Make sure 'QTextCharFormat' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)

this is also returned when there is a successful run with 0 errors. 
below is the terminal printout for the run of Examples > Getting Started 
 > Basics > Hello World.

best -

	joachim



jh@lenov:~$ /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6
virtual_keyboard real time MIDI plugin for Csound
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes.
0dBFS level = 32768,0
Csound version 6.00.1 (double samples) Aug 26 2013
libsndfile-1.0.25
Object::connect: No such slot WidgetPanel::dockStateChanged(bool)
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
CsoundEngine::messageListDispatcher()
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
Object::connect: No such signal LiveEventFrame::closed(LiveEventFrame *)
Object::connect:  (sender name:   'LiveEventFrame')
Object::connect:  (receiver name: 'LiveEventControl')
CsoundEngine::messageListDispatcher()
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
DocumentPage::getMacOptions() Option Options:  not found!
DocumentPage::applyMacOptions() no Geometry!
 loaded.
CsoundEngine::messageListDispatcher()
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
DocumentPage::getMacOptions() Option Options:  not found!
DocumentPage::applyMacOptions() no Geometry!
 loaded.
CsoundEngine::messageListDispatcher()
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
WidgetLayout::loadXmlWidgets Older Widget Format version
Object::connect: No such signal FileBEditor::textChanged()
Object::connect:  (sender name:   'FileBEditor')
Object::connect: No such slot DocumentPage::evaluate(QString)
CsoundEngine::messageListDispatcher()
virtual_keyboard real time MIDI plugin for Csound
Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes.
0dBFS level = 32768,0
Csound version 6.00.1 (double samples) Aug 26 2013
libsndfile-1.0.25
csound
-b1024
-B4096
-+rtaudio=alsa
-odac
-+rtmidi=alsaraw
--env:CSNOSTOP=yes
/tmp/csound-tmphXMT5677.csd
csoundDestroyThreadLock: : Erfolg
csoundDestroyThreadLock: : Erfolg
CsoundEngine::stopCsound() joined
QObject::connect: Cannot queue arguments of type 'QTextCharFormat'
(Make sure 'QTextCharFormat' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCharFormat'
(Make sure 'QTextCharFormat' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
messageListDispatcher quit
messageListDispatcher quit
messageListDispatcher quit
messageListDispatcher quit
CsoundQt::changePage index < 0
messageListDispatcher quit
end of score.		   overall amps:      0,0
	   overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 48,837s, CPU: 2,480s
jh@lenov:~$






Am 28.08.2013 22:40, schrieb Steven Yi:
> It might not be a problem with older Csound5/CsoundQT as all functions
> were not protected like cs_strtod is being used in CS6.  In this case,
> because it looks like we only have partial protection (strtod is
> protected but sprintf is not), there's a disagreement there.  I
> imagine with CS5, all the functions behaved the same way, so while
> locale changes may have happened, at least they did for all functions.
>
> I think CS6's direction to use locale agnostic implementations is the
> correct one, but I think we just missed functions like sprintf.
> Hopefully soon this can all be sorted out.
>
> On Wed, Aug 28, 2013 at 4:36 PM, joachim heintz  wrote:
>> yes, thanks. as the qt libraries did not change on my computer, the
>> problem seems to be either in the CsoundPerformanceThread (if it is
>> different to the one in csound5), or in the new way csoundqt is using it.
>>
>>          joachim
>>
>>
>> Am 28.08.2013 22:27, schrieb Michael Gogins:
>>> When you run "in terminal" from CsoundQt, it is really running as if it
>>> just plain old Csound. There is no CsoundPerformanceThread, and the
>>> Csound command sets up the locale etc.
>>>
>>> When you in run "in CsoundQt", CsoundQt runs Csound using the Csound API
>>> and CsoundPerformanceThread. The Qt libraries or CsoundQt may have
>>> something to do with the locale.
>>>
>>> Hope this helps,
>>> Mike
>>>
>>>
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Wed, Aug 28, 2013 at 4:23 PM, joachim heintz >> > wrote:
>>>
>>>      thanks very much, steven. this seems to be the right path!:
>>>
>>>      earlier, i got this:
>>>
>>>        >>
>>>      Stray = '1.2      2+3.45  6.7/-8.09 '
>>>      StrExpr1 = '1.2'
>>>      INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>      ires    strtod    Str
>>>      StrExpr1 = '2+3.45'
>>>      INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>      i2    strtod    S2
>>>      StrExpr1 = '6.7/-8.09'
>>>      INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>      i1    strtod    S1
>>>      INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>      i2    strtod    S2
>>>      ift# = 102, iftlen = 3
>>>      table content = [7,00000, 2,00000, inf]
>>>         - note deleted.  i1 had 4 init errors
>>>              B  0,010
>>>      <<
>>>
>>>      now, with your change:
>>>
>>>        >>
>>>      Stray = '1.2    2+3.45  6.7/-8.09 '
>>>      StrExpr1 = '1.2'
>>>      StrExpr1 = '2+3.45'
>>>      StrExpr1 = '6.7/-8.09'
>>>      ift# = 102, iftlen = 3
>>>      table content = [1,20000, 5,45000, -0,82818]
>>>      <<
>>>
>>>      so, this error has disappeared!
>>>
>>>      but, unfortunately, this is not valuable for all the errors:
>>>
>>>      Stray = '        2^0.6   2^(1/12) 2^(-1/12)     16 32'
>>>      StrExpr1 = '2^0.6'
>>>      StrExpr1 = '1/12'
>>>      StrExpr1 = '2^0,083333'
>>>      INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>      i2      strtod  S2
>>>      StrExpr1 = '-1/12'
>>>      StrExpr1 = '2^-0,083333'
>>>      INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>      i2      strtod  S2
>>>      StrExpr1 = '16'
>>>      StrExpr1 = '32'
>>>      ift# = 104, iftlen = 5
>>>      table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
>>>         - note deleted.  i1 had 2 init errors
>>>
>>>
>>>      in total, i get "8 errors in performance" instead of 10 ... - at least a
>>>      step in the right direction!
>>>
>>>
>>>      i am wondering:
>>>
>>>      1) why is this behaviour different if i
>>>      a) run in csoundqt, or
>>>      b) in terminal?
>>>
>>>      2) why is this behaviour different to csoundqt with csound5 where i
>>>      never had these issues?
>>>
>>>      if there is an answer, it could perhaps be fixed. thanks again, and best
>>>      regards -
>>>
>>>               joachim
>>>
>>>
>>>      Am 28.08.2013 21:27, schrieb Steven Yi:
>>>       > Just to note, earlier this summer we went through issues with Locale
>>>       > and Csound.  I think we ended up with a semi-solution where certain
>>>       > platforms used locale-agnostic functions and others did not.
>>>       >
>>>       > However, I looked through the code and found two instances of strtod
>>>       > still in use, instead of cs_strtod.  One of them was for the strtod
>>>       > opcode.  I've made a couple changes and pushed those to GIT.
>>>        Joachim,
>>>       > could you pull from the develop branch and try recompiling csound and
>>>       > re-testing?
>>>       >
>>>       > My guess is this: strtod will use the locale of the system.
>>>        cs_strtod
>>>       > will always use the "C" locale which uses periods for decimal points.
>>>       > With the csound executable, there's a bit of a hack that sets the C
>>>       > locale then runs csound. When csound is used as a library (i.e.
>>>       > CsoundQT), I don't know if that locale hack is used, or if some other
>>>       > library changes the locale back to the native locale.  Either way,
>>>       > cs_strtod is meant to solve that problem by being locale-agnostic
>>>       > (always uses C Locale).  I think that might explain the issue between
>>>       > running in csound commandline vs. CsoundQT.
>>>       >
>>>       >
>>>       > On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz
>>>      > wrote:
>>>       >> hi andrés -
>>>       >>
>>>       >> i think it could! but how could i / could we change this?
>>>       >> on a way i experienced that it is stupid in many ways not to
>>>      install a
>>>       >> native english os version (for instance because of an absolute
>>>      idotic
>>>       >> bug with jack on the german version of ubuntu studio). on the
>>>      other hand
>>>       >> i suspect i will not the only one who did or will do, as there
>>>      may be
>>>       >> other languages than english in the world ...
>>>       >> so, i am happy to be the guinea pig. what could be the solution?
>>>       >> thanks -
>>>       >>          joachim
>>>       >>
>>>       >>
>>>       >> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>>>       >>> Hi Joachim,
>>>       >>>
>>>       >>> This seems like an issue with locale. Maybe CsoundQt is setting a
>>>       >>> different locale than the command line, and changing the decimal
>>>       >>> separator. Can this explain the problem?
>>>       >>>
>>>       >>> Cheers,
>>>       >>> Andrés
>>>       >>>
>>>       >>>
>>>       >>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz
>>>      
>>>       >>> >> wrote:
>>>       >>>
>>>       >>>      i attached the code which runs fine in plain csound6.
>>>       >>>
>>>       >>>
>>>       >>>      Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>>      
>>>       >>>      >:
>>>       >>>       > The message "strtod: invalid format" means that the
>>>      string not
>>>       >>>      empty after
>>>       >>>       > initial spaces and tabs and a number.  What is the
>>>      argument?
>>>       >>>       > ==John ff
>>>       >>>       >
>>>       >>>       >
>>>       >>>       >
>>>       >>>       >      x = cs_strtod(s, &tmp);
>>>       >>>       >      if (UNLIKELY(*tmp != '\0'))
>>>       >>>       >        return StrOp_ErrMsg(p, "invalid format");
>>>        <==================
>>>       >>>       >      *p->indx = (MYFLT) x;
>>>       >>>       >
>>>       >>>       >
>>>       >>>       >
>>>       >>>       >
>>>       >>>
>>>        ------------------------------------------------------------------------------
>>>       >>>       > Learn the latest--Visual Studio 2012, SharePoint 2013,
>>>      SQL 2012,
>>>       >>>      more!
>>>       >>>       > Discover the easy way to master current and previous
>>>      Microsoft
>>>       >>>      technologies
>>>       >>>       > and advance your career. Get an incredible 1,500+ hours of
>>>       >>>      step-by-step
>>>       >>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >>>       >
>>>       >>>
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       >>>       > _______________________________________________
>>>       >>>       > Csound-devel mailing list
>>>       >>>       > Csound-devel@lists.sourceforge.net
>>>      
>>>       >>>      >>      >
>>>       >>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >>>       >
>>>       >>>
>>>       >>>
>>>        ------------------------------------------------------------------------------
>>>       >>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>>>      2012, more!
>>>       >>>      Discover the easy way to master current and previous Microsoft
>>>       >>>      technologies
>>>       >>>      and advance your career. Get an incredible 1,500+ hours of
>>>      step-by-step
>>>       >>>      tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >>>
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       >>>      _______________________________________________
>>>       >>>      Csound-devel mailing list
>>>       >>> Csound-devel@lists.sourceforge.net
>>>      
>>>       >>>      >>      >
>>>       >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >>>
>>>       >>>
>>>       >>>
>>>       >>>
>>>       >>>
>>>      ------------------------------------------------------------------------------
>>>       >>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>>>      2012, more!
>>>       >>> Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>       >>> and advance your career. Get an incredible 1,500+ hours of
>>>      step-by-step
>>>       >>> tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >>>
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       >>>
>>>       >>>
>>>       >>>
>>>       >>> _______________________________________________
>>>       >>> Csound-devel mailing list
>>>       >>> Csound-devel@lists.sourceforge.net
>>>      
>>>       >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >>>
>>>       >>
>>>       >>
>>>      ------------------------------------------------------------------------------
>>>       >> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>      more!
>>>       >> Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>       >> and advance your career. Get an incredible 1,500+ hours of
>>>      step-by-step
>>>       >> tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >>
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       >> _______________________________________________
>>>       >> Csound-devel mailing list
>>>       >> Csound-devel@lists.sourceforge.net
>>>      
>>>       >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >
>>>       >
>>>      ------------------------------------------------------------------------------
>>>       > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>      more!
>>>       > Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>       > and advance your career. Get an incredible 1,500+ hours of
>>>      step-by-step
>>>       > tutorial videos with LearnDevNow. Subscribe today and save!
>>>       >
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>       > _______________________________________________
>>>       > Csound-devel mailing list
>>>       > Csound-devel@lists.sourceforge.net
>>>      
>>>       > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       >
>>>
>>>      ------------------------------------------------------------------------------
>>>      Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>      Discover the easy way to master current and previous Microsoft
>>>      technologies
>>>      and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>      tutorial videos with LearnDevNow. Subscribe today and save!
>>>      http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>      _______________________________________________
>>>      Csound-devel mailing list
>>>      Csound-devel@lists.sourceforge.net
>>>      
>>>      https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>> Discover the easy way to master current and previous Microsoft technologies
>>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>
>>>
>>>
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/c

Date2013-08-29 09:37
FromVictor Lazzarini
SubjectRe: [Cs-dev] bug with strtod in csoundqt
I think the reason it worked on Csound 5 is that we had a global assignment of
locale to C, which is OK in some circumstances, but not generally. So we needed to
do this new code in Csound 6. I never realised sprintf was affected, but if its, then
it's a chase and replace job.

Victor
On 28 Aug 2013, at 21:40, Steven Yi wrote:

> It might not be a problem with older Csound5/CsoundQT as all functions
> were not protected like cs_strtod is being used in CS6.  In this case,
> because it looks like we only have partial protection (strtod is
> protected but sprintf is not), there's a disagreement there.  I
> imagine with CS5, all the functions behaved the same way, so while
> locale changes may have happened, at least they did for all functions.
> 
> I think CS6's direction to use locale agnostic implementations is the
> correct one, but I think we just missed functions like sprintf.
> Hopefully soon this can all be sorted out.
> 
> On Wed, Aug 28, 2013 at 4:36 PM, joachim heintz  wrote:
>> yes, thanks. as the qt libraries did not change on my computer, the
>> problem seems to be either in the CsoundPerformanceThread (if it is
>> different to the one in csound5), or in the new way csoundqt is using it.
>> 
>>        joachim
>> 
>> 
>> Am 28.08.2013 22:27, schrieb Michael Gogins:
>>> When you run "in terminal" from CsoundQt, it is really running as if it
>>> just plain old Csound. There is no CsoundPerformanceThread, and the
>>> Csound command sets up the locale etc.
>>> 
>>> When you in run "in CsoundQt", CsoundQt runs Csound using the Csound API
>>> and CsoundPerformanceThread. The Qt libraries or CsoundQt may have
>>> something to do with the locale.
>>> 
>>> Hope this helps,
>>> Mike
>>> 
>>> 
>>> ===========================
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Wed, Aug 28, 2013 at 4:23 PM, joachim heintz >> > wrote:
>>> 
>>>    thanks very much, steven. this seems to be the right path!:
>>> 
>>>    earlier, i got this:
>>> 
>>>>> 
>>>    Stray = '1.2      2+3.45  6.7/-8.09 '
>>>    StrExpr1 = '1.2'
>>>    INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>    ires    strtod    Str
>>>    StrExpr1 = '2+3.45'
>>>    INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>    i2    strtod    S2
>>>    StrExpr1 = '6.7/-8.09'
>>>    INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>    i1    strtod    S1
>>>    INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>    i2    strtod    S2
>>>    ift# = 102, iftlen = 3
>>>    table content = [7,00000, 2,00000, inf]
>>>       - note deleted.  i1 had 4 init errors
>>>            B  0,010
>>>    <<
>>> 
>>>    now, with your change:
>>> 
>>>>> 
>>>    Stray = '1.2    2+3.45  6.7/-8.09 '
>>>    StrExpr1 = '1.2'
>>>    StrExpr1 = '2+3.45'
>>>    StrExpr1 = '6.7/-8.09'
>>>    ift# = 102, iftlen = 3
>>>    table content = [1,20000, 5,45000, -0,82818]
>>>    <<
>>> 
>>>    so, this error has disappeared!
>>> 
>>>    but, unfortunately, this is not valuable for all the errors:
>>> 
>>>    Stray = '        2^0.6   2^(1/12) 2^(-1/12)     16 32'
>>>    StrExpr1 = '2^0.6'
>>>    StrExpr1 = '1/12'
>>>    StrExpr1 = '2^0,083333'
>>>    INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>    i2      strtod  S2
>>>    StrExpr1 = '-1/12'
>>>    StrExpr1 = '2^-0,083333'
>>>    INIT ERROR in instr 1 (opcode StrExpr1): strtod: invalid format
>>>    i2      strtod  S2
>>>    StrExpr1 = '16'
>>>    StrExpr1 = '32'
>>>    ift# = 104, iftlen = 5
>>>    table content = [1,51572, 1,00000, 1,00000, 16,00000, 32,00000]
>>>       - note deleted.  i1 had 2 init errors
>>> 
>>> 
>>>    in total, i get "8 errors in performance" instead of 10 ... - at least a
>>>    step in the right direction!
>>> 
>>> 
>>>    i am wondering:
>>> 
>>>    1) why is this behaviour different if i
>>>    a) run in csoundqt, or
>>>    b) in terminal?
>>> 
>>>    2) why is this behaviour different to csoundqt with csound5 where i
>>>    never had these issues?
>>> 
>>>    if there is an answer, it could perhaps be fixed. thanks again, and best
>>>    regards -
>>> 
>>>             joachim
>>> 
>>> 
>>>    Am 28.08.2013 21:27, schrieb Steven Yi:
>>>> Just to note, earlier this summer we went through issues with Locale
>>>> and Csound.  I think we ended up with a semi-solution where certain
>>>> platforms used locale-agnostic functions and others did not.
>>>> 
>>>> However, I looked through the code and found two instances of strtod
>>>> still in use, instead of cs_strtod.  One of them was for the strtod
>>>> opcode.  I've made a couple changes and pushed those to GIT.
>>>      Joachim,
>>>> could you pull from the develop branch and try recompiling csound and
>>>> re-testing?
>>>> 
>>>> My guess is this: strtod will use the locale of the system.
>>>      cs_strtod
>>>> will always use the "C" locale which uses periods for decimal points.
>>>> With the csound executable, there's a bit of a hack that sets the C
>>>> locale then runs csound. When csound is used as a library (i.e.
>>>> CsoundQT), I don't know if that locale hack is used, or if some other
>>>> library changes the locale back to the native locale.  Either way,
>>>> cs_strtod is meant to solve that problem by being locale-agnostic
>>>> (always uses C Locale).  I think that might explain the issue between
>>>> running in csound commandline vs. CsoundQT.
>>>> 
>>>> 
>>>> On Wed, Aug 28, 2013 at 2:43 PM, joachim heintz
>>>    > wrote:
>>>>> hi andrés -
>>>>> 
>>>>> i think it could! but how could i / could we change this?
>>>>> on a way i experienced that it is stupid in many ways not to
>>>    install a
>>>>> native english os version (for instance because of an absolute
>>>    idotic
>>>>> bug with jack on the german version of ubuntu studio). on the
>>>    other hand
>>>>> i suspect i will not the only one who did or will do, as there
>>>    may be
>>>>> other languages than english in the world ...
>>>>> so, i am happy to be the guinea pig. what could be the solution?
>>>>> thanks -
>>>>>         joachim
>>>>> 
>>>>> 
>>>>> Am 28.08.2013 20:06, schrieb Andres Cabrera:
>>>>>> Hi Joachim,
>>>>>> 
>>>>>> This seems like an issue with locale. Maybe CsoundQt is setting a
>>>>>> different locale than the command line, and changing the decimal
>>>>>> separator. Can this explain the problem?
>>>>>> 
>>>>>> Cheers,
>>>>>> Andrés
>>>>>> 
>>>>>> 
>>>>>> On Wed, Aug 28, 2013 at 7:25 AM, joachim heintz
>>>    
>>>>>> >> wrote:
>>>>>> 
>>>>>>     i attached the code which runs fine in plain csound6.
>>>>>> 
>>>>>> 
>>>>>>     Am 28.08.2013 14:54, schrieb jpff@cs.bath.ac.uk
>>>    
>>>>>>     >:
>>>>>>> The message "strtod: invalid format" means that the
>>>    string not
>>>>>>     empty after
>>>>>>> initial spaces and tabs and a number.  What is the
>>>    argument?
>>>>>>> ==John ff
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>     x = cs_strtod(s, &tmp);
>>>>>>>     if (UNLIKELY(*tmp != '\0'))
>>>>>>>       return StrOp_ErrMsg(p, "invalid format");
>>>      <==================
>>>>>>>     *p->indx = (MYFLT) x;
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>      ------------------------------------------------------------------------------
>>>>>>> Learn the latest--Visual Studio 2012, SharePoint 2013,
>>>    SQL 2012,
>>>>>>     more!
>>>>>>> Discover the easy way to master current and previous
>>>    Microsoft
>>>>>>     technologies
>>>>>>> and advance your career. Get an incredible 1,500+ hours of
>>>>>>     step-by-step
>>>>>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>>>>>> 
>>>>>> 
>>>    http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>    
>>>>>>     >>    >
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>> 
>>>>>> 
>>>>>> 
>>>      ------------------------------------------------------------------------------
>>>>>>     Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>>>    2012, more!
>>>>>>     Discover the easy way to master current and previous Microsoft
>>>>>>     technologies
>>>>>>     and advance your career. Get an incredible 1,500+ hours of
>>>    step-by-step
>>>>>>     tutorial videos with LearnDevNow. Subscribe today and save!
>>>>>> 
>>>    http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>>>     _______________________________________________
>>>>>>     Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>    
>>>>>>     >>    >
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>    ------------------------------------------------------------------------------
>>>>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL
>>>    2012, more!
>>>>>> Discover the easy way to master current and previous Microsoft
>>>    technologies
>>>>>> and advance your career. Get an incredible 1,500+ hours of
>>>    step-by-step
>>>>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>>>>> 
>>>    http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>    
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>> 
>>>>> 
>>>>> 
>>>    ------------------------------------------------------------------------------
>>>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>    more!
>>>>> Discover the easy way to master current and previous Microsoft
>>>    technologies
>>>>> and advance your career. Get an incredible 1,500+ hours of
>>>    step-by-step
>>>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>>>> 
>>>    http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>    
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>>    ------------------------------------------------------------------------------
>>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012,
>>>    more!
>>>> Discover the easy way to master current and previous Microsoft
>>>    technologies
>>>> and advance your career. Get an incredible 1,500+ hours of
>>>    step-by-step
>>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>>> 
>>>    http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>    
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>> 
>>>    ------------------------------------------------------------------------------
>>>    Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>>    Discover the easy way to master current and previous Microsoft
>>>    technologies
>>>    and advance your career. Get an incredible 1,500+ hours of step-by-step
>>>    tutorial videos with LearnDevNow. Subscribe today and save!
>>>    http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>>    _______________________________________________
>>>    Csound-devel mailing list
>>>    Csound-devel@lists.sourceforge.net
>>>    
>>>    https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>>> Discover the easy way to master current and previous Microsoft technologies
>>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>>> tutorial videos with LearnDevNow. Subscribe today and save!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>> 
>> ------------------------------------------------------------------------------
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

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




------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-29 09:58
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] bug with strtod in csoundqt
> I think the reason it worked on Csound 5 is that we had a global
> assignment of
> locale to C, which is OK in some circumstances, but not generally. So we
> needed to
> do this new code in Csound 6. I never realised sprintf was affected, but
> if its, then
> it's a chase and replace job.
>
> Victor

There does not seem to be a temporary locale for [sf]printf so it needs to
be wrapped in setlocale calls I suppose.  Seems clumsy




------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-29 12:25
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
AttachmentsNone  None  

There's a sprintf_l here on osx. Not sure if that or something equivalent exists on Linux.

On Aug 29, 2013 4:59 AM, <jpff@cs.bath.ac.uk> wrote:
> I think the reason it worked on Csound 5 is that we had a global
> assignment of
> locale to C, which is OK in some circumstances, but not generally. So we
> needed to
> do this new code in Csound 6. I never realised sprintf was affected, but
> if its, then
> it's a chase and replace job.
>
> Victor

There does not seem to be a temporary locale for [sf]printf so it needs to
be wrapped in setlocale calls I suppose.  Seems clumsy




------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2013-08-29 13:32
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] bug with strtod in csoundqt
No sign of it on this machine (OpenSuSE 12.2; Linux 3.4.47-2.38-desktop)
with gcc 4.7.1


> There's a sprintf_l here on osx. Not sure if that or something equivalent
> exists on Linux.
> On Aug 29, 2013 4:59 AM,  wrote:
>
>> > I think the reason it worked on Csound 5 is that we had a global
>> > assignment of
>> > locale to C, which is OK in some circumstances, but not generally. So
>> we
>> > needed to
>> > do this new code in Csound 6. I never realised sprintf was affected,
>> but
>> > if its, then
>> > it's a chase and replace job.
>> >
>> > Victor
>>
>> There does not seem to be a temporary locale for [sf]printf so it needs
>> to
>> be wrapped in setlocale calls I suppose.  Seems clumsy
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------



------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-29 15:53
FromSteven Yi
SubjectRe: [Cs-dev] bug with strtod in csoundqt
Perhaps we can have an implementation like (pseudo-code):

double cs_sprintf(char *str, const char *format, ...) {
double retVal;
#ifdef HAVE_SPRINTF_L
  retVal = sprintf_l(str, format, csound_c_locale, varArgs...)
#elseif HAVE__SPRINT_L
  /* this would be the case for the Windows locale aware function */
  retVal = _sprintf_l(str, format, csound_c_locale, varArgs...)
#else
locale_t locale = getLocale();
retVal = sprintf(str,format,varargs...)
setLocale(locale);
#endif
   return retVal;
}

(sorry, ugly pseudo code)

The get/setLocale version would not be thread-safe unless we protect
it. I don't imagine implementing our own sprintf would be simple or
worth it.


On Thu, Aug 29, 2013 at 8:32 AM,   wrote:
> No sign of it on this machine (OpenSuSE 12.2; Linux 3.4.47-2.38-desktop)
> with gcc 4.7.1
>
>
>> There's a sprintf_l here on osx. Not sure if that or something equivalent
>> exists on Linux.
>> On Aug 29, 2013 4:59 AM,  wrote:
>>
>>> > I think the reason it worked on Csound 5 is that we had a global
>>> > assignment of
>>> > locale to C, which is OK in some circumstances, but not generally. So
>>> we
>>> > needed to
>>> > do this new code in Csound 6. I never realised sprintf was affected,
>>> but
>>> > if its, then
>>> > it's a chase and replace job.
>>> >
>>> > Victor
>>>
>>> There does not seem to be a temporary locale for [sf]printf so it needs
>>> to
>>> be wrapped in setlocale calls I suppose.  Seems clumsy
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-29 17:52
Fromjpff
SubjectRe: [Cs-dev] bug with strtod in csoundqt
We could cheat....  If the only locale problem is dot v comma we could
just print and fix it up after.  Avoids thread problems.
Alternatively I do have an implementation of printf.....
==John ffitch

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-08-29 18:03
Fromjoachim heintz
SubjectRe: [Cs-dev] bug with strtod in csoundqt
i think dot versus comma is not the only problem. in my example, for 
instance the '^' character was an issue. and for japanese locale it 
might be completely different?!
	joachim


Am 29.08.2013 18:52, schrieb jpff:
> We could cheat....  If the only locale problem is dot v comma we could
> just print and fix it up after.  Avoids thread problems.
> Alternatively I do have an implementation of printf.....
> ==John ffitch
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net