Csound Csound-dev Csound-tekno Search About

[Csnd] understanding or debugging csound

Date2014-01-05 09:23
Fromfrancesco
Subject[Csnd] understanding or debugging csound
Hello All,
mainly developers and expert. I am exploring cabbage examples and i come to
a 
end point! Testing GEN02.csd by McCurdy cabbage exit so i decided to try in 
command line csound getting a segmentation fault. So, like a pro, i used -v
flags 
to see what's going on. But unlike a pro i cannot understand what messages
means ...

So:
is there some documentations about understanding those messages?
is this the right and only way to debugging a csd?

If need You will find csd and -v log attached.

Thanks,
ciao,
francesco.

GEN02.csd   
cs_logGEN02.txt
  




--
View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-01-05 09:34
FromRory Walsh
SubjectRe: [Csnd] understanding or debugging csound
You're on Linux right? I'm trying that example here and I get no
problems? If it does crash I imagine it's a problem with Cabbage and
not Iain's Csound code. Can you make it crash on purpose? if so what
steps do you take?

On 5 January 2014 09:23, francesco  wrote:
> Hello All,
> mainly developers and expert. I am exploring cabbage examples and i come to
> a
> end point! Testing GEN02.csd by McCurdy cabbage exit so i decided to try in
> command line csound getting a segmentation fault. So, like a pro, i used -v
> flags
> to see what's going on. But unlike a pro i cannot understand what messages
> means ...
>
> So:
> is there some documentations about understanding those messages?
> is this the right and only way to debugging a csd?
>
> If need You will find csd and -v log attached.
>
> Thanks,
> ciao,
> francesco.
>
> GEN02.csd 
> cs_logGEN02.txt
> 
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2014-01-05 09:48
Fromfrancesco
Subject[Csnd] Re: understanding or debugging csound
Hello Rory,
sorry, yes i am linux.
Simply when i try to open the file Cabbage close itself.
But i try the csd in terminal (i guess it should work) 
and i have a segmentation fault.
Weird, in score there are 2 activated instruments and 
i get segmentation fault only when both instruments are activated.

Maybe You are right and could be something in my setup.

Could You try the example in terminal too?

Thank You,
ciao,
francesco.






--
View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731239.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-01-05 10:26
FromRory Walsh
SubjectRe: [Csnd] Re: understanding or debugging csound
When I run in the terminal I get a segfault too, but not when running
in Cabbage? Strange. I'm using Csound 6.01.0?

On 5 January 2014 09:48, francesco  wrote:
> Hello Rory,
> sorry, yes i am linux.
> Simply when i try to open the file Cabbage close itself.
> But i try the csd in terminal (i guess it should work)
> and i have a segmentation fault.
> Weird, in score there are 2 activated instruments and
> i get segmentation fault only when both instruments are activated.
>
> Maybe You are right and could be something in my setup.
>
> Could You try the example in terminal too?
>
> Thank You,
> ciao,
> francesco.
>
>
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731239.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2014-01-05 10:40
Fromfrancesco
Subject[Csnd] Re: understanding or debugging csound
i have Csound version 6.02.0 (double samples) Jan  3 2014,
and cabbage rebuild this morning.

ciao,
francesco.

linux Ubuntustudio 12.04 32 bit, with KXStudio.




--
View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731242.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-01-05 10:46
FromRory Walsh
SubjectRe: [Csnd] Re: understanding or debugging csound
I'll update my Cound build now and let you know.

On 5 January 2014 10:40, francesco  wrote:
> i have Csound version 6.02.0 (double samples) Jan  3 2014,
> and cabbage rebuild this morning.
>
> ciao,
> francesco.
>
> linux Ubuntustudio 12.04 32 bit, with KXStudio.
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731242.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2014-01-05 11:26
Fromjpff
SubjectRe: [Csnd] Re: understanding or debugging csound
On linux when I get a segfault that I do not immediately understad I use 
gdb wgch stops at the point of error, and the where command (to gdb) tells 
ne what it is obeying and then I have clues.

Your experience may vary of course



Date2014-01-05 11:47
FromRory Walsh
SubjectRe: [Csnd] Re: understanding or debugging csound
Hi John, running this through gdb gives the following backtrace:

0dBFS level = 1.0
WARNING: real time midi input disabled, using dummy functions
orch now loaded
audio buffered in 256 sample-frame blocks
not writing to sound disk
SECTION 1:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79a57f8 in deltapi () from /usr/local/lib/libcsound64.so.6.0
(gdb) bt
#0  0x00007ffff79a57f8 in deltapi () from /usr/local/lib/libcsound64.so.6.0
#1  0x00007ffff7a69325 in kperf () from /usr/local/lib/libcsound64.so.6.0
#2  0x00007ffff7a69d27 in csoundPerform ()
   from /usr/local/lib/libcsound64.so.6.0
#3  0x00000000004015a5 in main ()

I get no segfault when running the instrument in Cabbage. Note that I
don't interface to any audio or MIDI devices when running it in
Cabbage.
I wonder if Francesco gets the same backtrace from gdb?

On 5 January 2014 11:26, jpff  wrote:
> On linux when I get a segfault that I do not immediately understad I use gdb
> wgch stops at the point of error, and the where command (to gdb) tells ne
> what it is obeying and then I have clues.
>
> Your experience may vary of course
>
>
>
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>

Date2014-01-05 11:48
Fromfrancesco
Subject[Csnd] Re: understanding or debugging csound
Thanks Mr. Ffitch,
so i used gdb (although i will not able to understand it!).

So i get:

Program received signal SIGSEGV, Segmentation fault.
0xb7d27f97 in insert () from /home/fra/csound6/build/libcsound64.so.6.0

then with command backtrace (or where command like You suggested) i get:

#0  0xb7d27f97 in insert () from /home/fra/csound6/build/libcsound64.so.6.0
#1  0xb7d3583d in process_score_event ()
   from /home/fra/csound6/build/libcsound64.so.6.0
#2  0xb7d35db0 in process_rt_event ()
   from /home/fra/csound6/build/libcsound64.so.6.0
#3  0xb7d36c59 in sensevents () from
/home/fra/csound6/build/libcsound64.so.6.0
#4  0xb7e77b13 in csoundPerform ()
   from /home/fra/csound6/build/libcsound64.so.6.0
#5  0x0804901b in main ()

in my understanding there is a problem in scheduling some event but then?
What that means insert()?

Ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731246.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-01-05 12:01
FromRory Walsh
SubjectRe: [Csnd] Re: understanding or debugging csound
They seem to be two different problems. Are you using the very latest
Csound source? I just did a rebuild about 20 minutes ago.

On 5 January 2014 11:48, francesco  wrote:
> Thanks Mr. Ffitch,
> so i used gdb (although i will not able to understand it!).
>
> So i get:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7d27f97 in insert () from /home/fra/csound6/build/libcsound64.so.6.0
>
> then with command backtrace (or where command like You suggested) i get:
>
> #0  0xb7d27f97 in insert () from /home/fra/csound6/build/libcsound64.so.6.0
> #1  0xb7d3583d in process_score_event ()
>    from /home/fra/csound6/build/libcsound64.so.6.0
> #2  0xb7d35db0 in process_rt_event ()
>    from /home/fra/csound6/build/libcsound64.so.6.0
> #3  0xb7d36c59 in sensevents () from
> /home/fra/csound6/build/libcsound64.so.6.0
> #4  0xb7e77b13 in csoundPerform ()
>    from /home/fra/csound6/build/libcsound64.so.6.0
> #5  0x0804901b in main ()
>
> in my understanding there is a problem in scheduling some event but then?
> What that means insert()?
>
> Ciao,
> francesco.
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731246.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2014-01-05 12:23
Fromfrancesco
Subject[Csnd] Re: understanding or debugging csound
Ok, i was in csound develop branch.
Switched to master branch and rebuild csound.
Now compilation also with gdb is right!
Now i will rebuild cabbage and try with it.

ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731249.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-01-05 12:28
FromVictor Lazzarini
SubjectRe: [Csnd] Re: understanding or debugging csound
Ok, this was crashing at  insert() because evtblk->pinstance needed to be initialised to NULL at all times,
except when used. I fixed that (in git develop) . But now there is a crash in deltapi.

Can we move this thread to csound developers'?

Victor
On 5 Jan 2014, at 11:48, francesco  wrote:

> Thanks Mr. Ffitch,
> so i used gdb (although i will not able to understand it!).
> 
> So i get:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7d27f97 in insert () from /home/fra/csound6/build/libcsound64.so.6.0
> 
> then with command backtrace (or where command like You suggested) i get:
> 
> #0  0xb7d27f97 in insert () from /home/fra/csound6/build/libcsound64.so.6.0
> #1  0xb7d3583d in process_score_event ()
>   from /home/fra/csound6/build/libcsound64.so.6.0
> #2  0xb7d35db0 in process_rt_event ()
>   from /home/fra/csound6/build/libcsound64.so.6.0
> #3  0xb7d36c59 in sensevents () from
> /home/fra/csound6/build/libcsound64.so.6.0
> #4  0xb7e77b13 in csoundPerform ()
>   from /home/fra/csound6/build/libcsound64.so.6.0
> #5  0x0804901b in main ()
> 
> in my understanding there is a problem in scheduling some event but then?
> What that means insert()?
> 
> Ciao,
> francesco.
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731246.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 



Date2014-01-05 12:29
FromVictor Lazzarini
SubjectRe: [Csnd] Re: understanding or debugging csound
The master branch is old code. What matters is in develop now.

Victor
On 5 Jan 2014, at 12:23, francesco  wrote:

> Ok, i was in csound develop branch.
> Switched to master branch and rebuild csound.
> Now compilation also with gdb is right!
> Now i will rebuild cabbage and try with it.
> 
> ciao,
> francesco.
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/understanding-or-debugging-csound-tp5731236p5731249.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
>