Csound Csound-dev Csound-tekno Search About

[Csnd] tvar init - crash when instrument is called many times

Date2013-03-26 12:40
FromTarmo Johannes
Subject[Csnd] tvar init - crash when instrument is called many times
Hello,

can you test - is it a bug or my build -

calling an instrument with tvar init many times crashes csound:



-odac



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

instr 1
	prints "START"
	t1 init 10
endin




i 1 0 0.1
i 1 0.5 0.1
i 1 1 0.1




(Csound 5.19 from git, opensuse 12.1)

Output:
----------------------
Csound version 5.19.00 beta (double samples) Jan  7 2013
UnifiedCSD: /home/tarmo/tarmo/csound/proov/t-init-test.csd
Skipping 
Creating orchestra
Creating score
graph init 
Parsing successful!
Elapsed time at end of orchestra compile: real: 0.005s, CPU: 0.000s
Sorting score
Elapsed time at end of score sort: real: 0.005s, CPU: 0.000s
0dBFS level = 1.0
orch now loaded
audio buffered in 1024 sample-frame blocks
reading 2048-byte blks of shorts from adc:system:capture_ (RAW)
writing 1024 sample blks of 64-bit floats to dac:system:playback_ 
SECTION 1:
new alloc for instr 1:
STARTB  0.000 ..  0.500 T  0.500 TT  0.500 M:  0.00000
STARTinactive allocs returned to freespace
end of score.              overall amps:  0.00000
           overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.816s, CPU: 0.030s
WARNING: rtjack: xrun in real time audio
22 1024 sample blks of 64-bit floats written to dac:system:playback_
Csound tidy up: Segmentation fault

Press return to continue
-----------------

tarmo


Date2013-03-26 12:59
FromVictor Lazzarini
SubjectRe: [Csnd] tvar init - crash when instrument is called many times
looks like a bug.

Victor
On 26 Mar 2013, at 12:40, Tarmo Johannes wrote:

> Hello,
> 
> can you test - is it a bug or my build -
> 
> calling an instrument with tvar init many times crashes csound:
> 
> 
> 
> -odac
> 
> 
> 
> sr = 44100
> ksmps = 32
> nchnls = 1
> 0dbfs = 1
> 
> instr 1
> 	prints "START"
> 	t1 init 10
> endin
> 
> 
> 
> 
> i 1 0 0.1
> i 1 0.5 0.1
> i 1 1 0.1
> 
> 
> 
> 
> (Csound 5.19 from git, opensuse 12.1)
> 
> Output:
> ----------------------
> Csound version 5.19.00 beta (double samples) Jan  7 2013
> UnifiedCSD: /home/tarmo/tarmo/csound/proov/t-init-test.csd
> Skipping 
> Creating orchestra
> Creating score
> graph init 
> Parsing successful!
> Elapsed time at end of orchestra compile: real: 0.005s, CPU: 0.000s
> Sorting score
> Elapsed time at end of score sort: real: 0.005s, CPU: 0.000s
> 0dBFS level = 1.0
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> reading 2048-byte blks of shorts from adc:system:capture_ (RAW)
> writing 1024 sample blks of 64-bit floats to dac:system:playback_ 
> SECTION 1:
> new alloc for instr 1:
> STARTB  0.000 ..  0.500 T  0.500 TT  0.500 M:  0.00000
> STARTinactive allocs returned to freespace
> end of score.              overall amps:  0.00000
>           overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.816s, CPU: 0.030s
> WARNING: rtjack: xrun in real time audio
> 22 1024 sample blks of 64-bit floats written to dac:system:playback_
> Csound tidy up: Segmentation fault
> 
> Press return to continue
> -----------------
> 
> tarmo
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

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





Date2013-03-26 15:20
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] tvar init - crash when instrument is called many times
Works for me no crash or anything

PortAudio: selected output device 'default'
writing 256 sample blks of 64-bit floats to dac
SECTION 1:
new alloc for instr 1:
STARTB  0.000 ..  0.500 T  0.500 TT  0.500 M:  0.00000
STARTinactive allocs returned to freespace
end of score.              overall amps:  0.00000
           overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 0.773s, CPU: 0.050s
87 256 sample blks of 64-bit floats written to dac

Last START stuck as no newline to flush it?  Or is it the early stop that
is the problem

I am using doubles on OpenSuSE12.2 x86_64

....but running under valgrind I see a memory problem
"Source and destination overlap in memcpy"
Will check


==John

> Hello,
>
> can you test - is it a bug or my build -
>
> calling an instrument with tvar init many times crashes csound:
>
> 
> 
> -odac
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 1
> 0dbfs = 1
>
> instr 1
> 	prints "START"
> 	t1 init 10
> endin
>
>
> 
> 
> i 1 0 0.1
> i 1 0.5 0.1
> i 1 1 0.1
> 
> 
>
>
> (Csound 5.19 from git, opensuse 12.1)
>
> Output:
> ----------------------
> Csound version 5.19.00 beta (double samples) Jan  7 2013
> UnifiedCSD: /home/tarmo/tarmo/csound/proov/t-init-test.csd
> Skipping 
> Creating orchestra
> Creating score
> graph init
> Parsing successful!
> Elapsed time at end of orchestra compile: real: 0.005s, CPU: 0.000s
> Sorting score
> Elapsed time at end of score sort: real: 0.005s, CPU: 0.000s
> 0dBFS level = 1.0
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> reading 2048-byte blks of shorts from adc:system:capture_ (RAW)
> writing 1024 sample blks of 64-bit floats to dac:system:playback_
> SECTION 1:
> new alloc for instr 1:
> STARTB  0.000 ..  0.500 T  0.500 TT  0.500 M:  0.00000
> STARTinactive allocs returned to freespace
> end of score.              overall amps:  0.00000
>            overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.816s, CPU: 0.030s
> WARNING: rtjack: xrun in real time audio
> 22 1024 sample blks of 64-bit floats written to dac:system:playback_
> Csound tidy up: Segmentation fault
>
> Press return to continue
> -----------------
>
> tarmo
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>



Date2013-03-26 17:09
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] tvar init - crash when instrument is called many times
Mea culpa; fixed in GIT for cs5

Not done like this in cs6 I think so should be OK
==John ff



 Hello,
>
> can you test - is it a bug or my build -
>
> calling an instrument with tvar init many times crashes csound:
>
> 
> 
> -odac
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 1
> 0dbfs = 1
>
> instr 1
> 	prints "START"
> 	t1 init 10
> endin
>
>
> 
> 
> i 1 0 0.1
> i 1 0.5 0.1
> i 1 1 0.1
> 
> 
>
>
> (Csound 5.19 from git, opensuse 12.1)
>
> Output:
> ----------------------
> Csound version 5.19.00 beta (double samples) Jan  7 2013
> UnifiedCSD: /home/tarmo/tarmo/csound/proov/t-init-test.csd
> Skipping 
> Creating orchestra
> Creating score
> graph init
> Parsing successful!
> Elapsed time at end of orchestra compile: real: 0.005s, CPU: 0.000s
> Sorting score
> Elapsed time at end of score sort: real: 0.005s, CPU: 0.000s
> 0dBFS level = 1.0
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> reading 2048-byte blks of shorts from adc:system:capture_ (RAW)
> writing 1024 sample blks of 64-bit floats to dac:system:playback_
> SECTION 1:
> new alloc for instr 1:
> STARTB  0.000 ..  0.500 T  0.500 TT  0.500 M:  0.00000
> STARTinactive allocs returned to freespace
> end of score.              overall amps:  0.00000
>            overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.816s, CPU: 0.030s
> WARNING: rtjack: xrun in real time audio
> 22 1024 sample blks of 64-bit floats written to dac:system:playback_
> Csound tidy up: Segmentation fault
>
> Press return to continue
> -----------------
>
> tarmo
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>