Csound Csound-dev Csound-tekno Search About

[Cs-dev] [ csound-Bugs-2959788 ] STKShakers not stable in real time on UBUNTU

Date2010-08-30 20:57
From"SourceForge.net"
Subject[Cs-dev] [ csound-Bugs-2959788 ] STKShakers not stable in real time on UBUNTU
Bugs item #2959788, was opened at 2010-02-26 19:54
Message generated for change (Comment added) made by rene-djack
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=2959788&group_id=81968

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: csound
Group: csound5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Rene Djack (rene-djack)
Assigned to: Michael Gogins (gogins)
Summary: STKShakers not stable in real time on UBUNTU

Initial Comment:
Below csd give seg fault on Ubuntu 32b when playing in RT with midi.
Problem occurs when playing around midi keys 57 to 61. 

(all other STK opcodes are OK in real time)



-fdhnm0 -odac:plughw -b16 -B512 --expression-opt -+rtaudio=alsa -+rtmidi=alsa -Mhw:1,0 --midi-key=4



; MESSAGE : not stable; seg fault with midi-key 57 to 61

sr	= 44100
ksmps	= 16
nchnls	= 1
0dbfs	= 2.0

instr	1	; STK Shakers

		print p4
iHz		= cpsmidinn(p4)

asig		STKShakers	iHz, 1.0, 1071, 22, 11, 1, 128, 100, 1, 30
		out		asig
endin


f 0 300



----------------------------------------------------------------------

Comment By: Rene Djack (rene-djack)
Date: 2010-08-30 21:57

Message:
Have tested with gdb, here the result:


	gdb csound
 
	(gdb) r "/home/moi/csd/0_Files/Bugs/STK_Shakers_score.csd"
	Starting program: /home/moi/csound5-f-debug/csound
"/home/moi/csd/0_Files/Bugs/STK_Shakers_score.csd"
	[Thread debugging using libthread_db enabled]
	time resolution is 0.416 ns
	virtual_keyboard real time MIDI plugin for Csound
	0dBFS level = 32768.0
	Csound version 5.12 beta (float samples) Aug 30 2010
	libsndfile-1.0.21
	UnifiedCSD:  /home/moi/csd/0_Files/Bugs/STK_Shakers_score.csd
	STARTING FILE
	Creating options
	Creating orchestra
	Creating score
	orchname:  /tmp/csound-UG7iFe.orc
	scorename: /tmp/csound-0DEwzU.sco
	RAWWAVE_PATH: /home/moi/csound5-f-debug/Opcodes/stk/rawwaves/
	orch compiler:
	11 (12) lines read
		instr	1	
	Elapsed time at end of orchestra compile: real: 0.002s, CPU: 0.000s
	sorting score ...
		... done
	Elapsed time at end of score sort: real: 0.003s, CPU: 0.000s
	Csound version 5.12 beta (float samples) Aug 30 2010
	displays suppressed
	0dBFS level = 32768.0
	orch now loaded
	audio buffered in 256 sample-frame blocks
	writing 1024-byte blks of floats to /home/moi/Tempo/test.wav (WAV)
	SECTION 1:
	new alloc for instr 1:
	B  0.000 ..  0.300 T  0.300 TT  0.300 M:   5494.4
	new alloc for instr 1:
	B  0.300 ..  0.700 T  0.700 TT  0.700 M:   6186.5
	B  0.700 ..  1.100 T  1.100 TT  1.100 M:   5512.2
	B  1.100 ..  1.500 T  1.500 TT  1.500 M:   6164.7

	Program received signal SIGSEGV, Segmentation fault.
	0x0065a944 in insert (csound=0x804dbc0, insno=1, newevtp=0x8050240)
	    at Engine/insert.c:126
	126	      if (ip->actflg && ip->offtim < 0.0 && ip->p1 == newevtp->p[1])
{
	(gdb) 

	(gdb) where
	#0  0x0065a944 in insert (csound=0x804dbc0, insno=1, newevtp=0x8050240)
	    at Engine/insert.c:126
	#1  0x00666abc in process_score_event (csound=0x804dbc0, evt=0x8050240, 
	    rtEvt=0) at Engine/musmon.c:689
	#2  0x00667440 in sensevents (csound=0x804dbc0) at Engine/musmon.c:874
	#3  0x006eebab in csoundPerform (csound=0x804dbc0) at Top/csound.c:1459
	#4  0x08049ac1 in main (argc=2, argv=0xbffff444)
	    at frontends/csound/csound_main.c:136
	(gdb) 

All other STK opcodes works well.
My system is ubuntu 10.04, csound cvs float and double.
But i  have seen this "problem" since about 2 years (file CsoundVST.csd in
csound examples).

First time i use gdb, hope this help.

Cheers,
René



----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2010-08-30 19:49

Message:
I have managed to build STK and it runs with no errors on my Linux system
Suggested that this is an Ubuntu error.  From whence came your system?

----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2010-08-30 19:02

Message:
 Is thi sin Csound or in the STK system?  Can you run under gdb and then
with the where command isolate the function involved?  I still do not seem
to be able to build the STK code due to many C++ errors, and my knowledge
of C++ is insufficient to understand it

----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2010-03-05 19:31

Message:
I am having trouble building the STK code, so it may be a while before I
can help

----------------------------------------------------------------------

Comment By: Rene Djack (rene-djack)
Date: 2010-03-05 18:49

Message:
I'have done:
rt-midi play -> midi record -> midi file -> score file --->score
instrument 

and isolate a faulty section as below, i have changed the frequency to the
same values.



-Wfd -+rtaudio=null -+rtmidi=null --expression-opt


sr	= 44100
ksmps	= 16

instr	1	; STK Shakers

asig		STKShakers	p4, 1.0, 1071, 22, 11, 1, 128, 100, 1, 30
		out		asig*100000
endin


i 1	10.0	0.45	261.626
i 1	10.3	0.29	261.626
i 1	10.7	0.48	261.626
i 1	11.1	0.27	261.626
i 1	11.5	0.63	261.626



This give seg fault every time i run it.




----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-03-04 17:49

Message:
I have tried with score activated (without midi), but i don't success to
have any seg fault.

Seg fault appears if i play "fast" on my midi keyboard.
Below midi note 57 no problem
Higher midi note 61 no problem
Between 57 and 61 seg fault
Note 57 and 59 played at the same time give seg fault, most of the time
but not always!!!

I will record a midi file to test with score.
Thanks
René 




  

----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2010-03-04 17:05

Message:
Does this fail without MIDI?  That is, is it the high frequency?

----------------------------------------------------------------------

Comment By: John ffitch (jpff)
Date: 2010-02-28 18:30

Message:
This is Michael's code; referred to him

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=2959788&group_id=81968

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-