Csound Csound-dev Csound-tekno Search About

[Csnd] pyruni seg fault

Date2011-11-22 23:19
Fromben hackbarth
Subject[Csnd] pyruni seg fault
hello,

i have a fairly large orchestra with several #included files that
contain python code encased in pyruni {{}} opcodes.  csound dies when
any one of these files exceeds ~7,900 characters:

Csound 5.14
orch compiler:
4913 (4914) lines read
extending Floating pool to 512
extending Floating pool to 768
internal error: strsav: string length > STRSPACE
Csound tidy up: Segmentation fault

i can split up an offending file into two smaller includes and this
eliminates the error, but i would be nice not to have to break up my
code arbitrarily.  i assume that its a memory allocation issue and, if
true, is there any way to allocate more memory to STRSPACE via the
command line?  might there be a better way to include python code in
my orchestra?

thanks in advance,
--  ben


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"


Date2011-11-23 07:17
Fromjoachim heintz
SubjectRe: [Csnd] pyruni seg fault
perhaps -+max_str_len=10000 ?
	j


Am 23.11.2011 00:19, schrieb ben hackbarth:
> hello,
> 
> i have a fairly large orchestra with several #included files that
> contain python code encased in pyruni {{}} opcodes.  csound dies when
> any one of these files exceeds ~7,900 characters:
> 
> Csound 5.14
> orch compiler:
> 4913 (4914) lines read
> extending Floating pool to 512
> extending Floating pool to 768
> internal error: strsav: string length > STRSPACE
> Csound tidy up: Segmentation fault
> 
> i can split up an offending file into two smaller includes and this
> eliminates the error, but i would be nice not to have to break up my
> code arbitrarily.  i assume that its a memory allocation issue and, if
> true, is there any way to allocate more memory to STRSPACE via the
> command line?  might there be a better way to include python code in
> my orchestra?
> 
> thanks in advance,
> --  ben
> 
> 
> 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"
> 
> 


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"

Date2011-11-23 08:13
Fromben hackbarth
SubjectRe: [Csnd] pyruni seg fault
thanks for the suggestion joachim, but max_str_len doesn't change the outcome.
--  ben



On Tue, Nov 22, 2011 at 11:17 PM, joachim heintz  wrote:
> perhaps -+max_str_len=10000 ?
>        j
>
>
> Am 23.11.2011 00:19, schrieb ben hackbarth:
>> hello,
>>
>> i have a fairly large orchestra with several #included files that
>> contain python code encased in pyruni {{}} opcodes.  csound dies when
>> any one of these files exceeds ~7,900 characters:
>>
>> Csound 5.14
>> orch compiler:
>> 4913 (4914) lines read
>> extending Floating pool to 512
>> extending Floating pool to 768
>> internal error: strsav: string length > STRSPACE
>> Csound tidy up: Segmentation fault
>>
>> i can split up an offending file into two smaller includes and this
>> eliminates the error, but i would be nice not to have to break up my
>> code arbitrarily.  i assume that its a memory allocation issue and, if
>> true, is there any way to allocate more memory to STRSPACE via the
>> command line?  might there be a better way to include python code in
>> my orchestra?
>>
>> thanks in advance,
>> --  ben
>>
>>
>> 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"
>>
>>
>
>
> 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"
>
>


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"


Date2011-11-23 08:38
FromVictor Lazzarini
SubjectRe: [Csnd] pyruni seg fault
What OS are you using and is this the release binaries or did you build from GIT sources?
On 23 Nov 2011, at 08:13, ben hackbarth wrote:

> thanks for the suggestion joachim, but max_str_len doesn't change the outcome.
> --  ben
> 
> 
> 
> On Tue, Nov 22, 2011 at 11:17 PM, joachim heintz  wrote:
>> perhaps -+max_str_len=10000 ?
>>        j
>> 
>> 
>> Am 23.11.2011 00:19, schrieb ben hackbarth:
>>> hello,
>>> 
>>> i have a fairly large orchestra with several #included files that
>>> contain python code encased in pyruni {{}} opcodes.  csound dies when
>>> any one of these files exceeds ~7,900 characters:
>>> 
>>> Csound 5.14
>>> orch compiler:
>>> 4913 (4914) lines read
>>> extending Floating pool to 512
>>> extending Floating pool to 768
>>> internal error: strsav: string length > STRSPACE
>>> Csound tidy up: Segmentation fault
>>> 
>>> i can split up an offending file into two smaller includes and this
>>> eliminates the error, but i would be nice not to have to break up my
>>> code arbitrarily.  i assume that its a memory allocation issue and, if
>>> true, is there any way to allocate more memory to STRSPACE via the
>>> command line?  might there be a better way to include python code in
>>> my orchestra?
>>> 
>>> thanks in advance,
>>> --  ben
>>> 
>>> 
>>> 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"
>>> 
>>> 
>> 
>> 
>> 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"
>> 
>> 
> 
> 
> 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





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"


Date2011-11-23 12:19
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] pyruni seg fault
There is an absolute limit of 8000 for strings.  This could be extended to
any number but that is just a patch.  the "solution" is to make it
dynamic.  The code is ll Varga code in one file so it may be possib;e.  I
will take a closer look.

If you do not hear about this by the end of the week, complain(!)

==John ff


>>> Am 23.11.2011 00:19, schrieb ben hackbarth:
>>>> hello,
>>>>
>>>> i have a fairly large orchestra with several #included files that
>>>> contain python code encased in pyruni {{}} opcodes.  csound dies when
>>>> any one of these files exceeds ~7,900 characters:
>>>>
>>>> Csound 5.14
>>>> orch compiler:
>>>> 4913 (4914) lines read
>>>> extending Floating pool to 512
>>>> extending Floating pool to 768
>>>> internal error: strsav: string length > STRSPACE
>>>> Csound tidy up: Segmentation fault
>>>>
>>>> i can split up an offending file into two smaller includes and this
>>>> eliminates the error, but i would be nice not to have to break up my
>>>> code arbitrarily.  i assume that its a memory allocation issue and, if
>>>> true, is there any way to allocate more memory to STRSPACE via the
>>>> command line?  might there be a better way to include python code in
>>>> my orchestra?
>>>>
>>>> thanks in advance,
>>>> --  ben
>>>>
>>>>
>>>> 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"
>>>>
>>>>
>>>
>>>
>>> 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"
>>>
>>>
>>
>>
>> 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
>
>
>
>
>
> 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"
>
>
>
>




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"

Date2011-11-23 12:32
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] pyruni seg fault
If you could mail me an example it would be good -- saves me constructing
someting I do not use

==John

PS I think i have a fix

>>
>>>
>>> Am 23.11.2011 00:19, schrieb ben hackbarth:
>>>> hello,
>>>>
>>>> i have a fairly large orchestra with several #included files that
>>>> contain python code encased in pyruni {{}} opcodes.  csound dies when
>>>> any one of these files exceeds ~7,900 characters:
>>>>
>>>> Csound 5.14
>>>> orch compiler:
>>>> 4913 (4914) lines read
>>>> extending Floating pool to 512
>>>> extending Floating pool to 768
>>>> internal error: strsav: string length > STRSPACE
>>>> Csound tidy up: Segmentation fault
>>>>
>>>> i can split up an offending file into two smaller includes and this
>>>> eliminates the error, but i would be nice not to have to break up my
>>>> code arbitrarily.  i assume that its a memory allocation issue and, if
>>>> true, is there any way to allocate more memory to STRSPACE via the
>>>> command line?  might there be a better way to include python code in
>>>> my orchestra?
>>>>
>>>> thanks in advance,
>>>> --  ben
>>>>
>>>>
>>>> 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"
>>>>
>>>>
>>>
>>>
>>> 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"
>>>
>>>
>>
>>
>> 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
>
>
>
>
>
> 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"
>
>
>
>




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"

Date2011-11-23 13:46
FromVictor Lazzarini
SubjectRe: [Csnd] pyruni seg fault
I think that flag is to control sizes of string variables.
On 23 Nov 2011, at 08:13, ben hackbarth wrote:

> thanks for the suggestion joachim, but max_str_len doesn't change the outcome.
> --  ben
> 
> 
> 
> On Tue, Nov 22, 2011 at 11:17 PM, joachim heintz  wrote:
>> perhaps -+max_str_len=10000 ?
>>        j
>> 
>> 
>> Am 23.11.2011 00:19, schrieb ben hackbarth:
>>> hello,
>>> 
>>> i have a fairly large orchestra with several #included files that
>>> contain python code encased in pyruni {{}} opcodes.  csound dies when
>>> any one of these files exceeds ~7,900 characters:
>>> 
>>> Csound 5.14
>>> orch compiler:
>>> 4913 (4914) lines read
>>> extending Floating pool to 512
>>> extending Floating pool to 768
>>> internal error: strsav: string length > STRSPACE
>>> Csound tidy up: Segmentation fault
>>> 
>>> i can split up an offending file into two smaller includes and this
>>> eliminates the error, but i would be nice not to have to break up my
>>> code arbitrarily.  i assume that its a memory allocation issue and, if
>>> true, is there any way to allocate more memory to STRSPACE via the
>>> command line?  might there be a better way to include python code in
>>> my orchestra?
>>> 
>>> thanks in advance,
>>> --  ben
>>> 
>>> 
>>> 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"
>>> 
>>> 
>> 
>> 
>> 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"
>> 
>> 
> 
> 
> 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





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"


Date2011-11-23 18:58
Fromben hackbarth
SubjectRe: [Csnd] pyruni seg fault
victor: i am using Git sources from a couple of weeks ago (Csound
version 5.14 beta (float samples) Nov  4 2011) hand rolled on OSX
10.7.

john: here is a csd which seg faults (for me):
http://pastebin.com/4gDwNXVU

thanks to you both.
--  ben



On Wed, Nov 23, 2011 at 5:46 AM, Victor Lazzarini
 wrote:
> I think that flag is to control sizes of string variables.
> On 23 Nov 2011, at 08:13, ben hackbarth wrote:
>
>> thanks for the suggestion joachim, but max_str_len doesn't change the outcome.
>> --  ben
>>
>>
>>
>> On Tue, Nov 22, 2011 at 11:17 PM, joachim heintz  wrote:
>>> perhaps -+max_str_len=10000 ?
>>>        j
>>>
>>>
>>> Am 23.11.2011 00:19, schrieb ben hackbarth:
>>>> hello,
>>>>
>>>> i have a fairly large orchestra with several #included files that
>>>> contain python code encased in pyruni {{}} opcodes.  csound dies when
>>>> any one of these files exceeds ~7,900 characters:
>>>>
>>>> Csound 5.14
>>>> orch compiler:
>>>> 4913 (4914) lines read
>>>> extending Floating pool to 512
>>>> extending Floating pool to 768
>>>> internal error: strsav: string length > STRSPACE
>>>> Csound tidy up: Segmentation fault
>>>>
>>>> i can split up an offending file into two smaller includes and this
>>>> eliminates the error, but i would be nice not to have to break up my
>>>> code arbitrarily.  i assume that its a memory allocation issue and, if
>>>> true, is there any way to allocate more memory to STRSPACE via the
>>>> command line?  might there be a better way to include python code in
>>>> my orchestra?
>>>>
>>>> thanks in advance,
>>>> --  ben
>>>>
>>>>
>>>> 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"
>>>>
>>>>
>>>
>>>
>>> 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"
>>>
>>>
>>
>>
>> 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
>
>
>
>
>
> 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"
>
>


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"


Date2011-11-23 20:02
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] pyruni seg fault
>
> john: here is a csd which seg faults (for me):
> http://pastebin.com/4gDwNXVU
>
Thanks; I am getting a segfault in PyImport_GetModuleDict ()

whatever that it.  What should it do?
create_instrument: instr num 1
create_opcode: Found node for opcode bamboo
create_opcode: Found node for opcode outs
Instr 0 check on opcode==.r
Instr 0 check on opcode==.r
Instr 0 check on opcode==.r
Instr 0 check on opcode=pyruni
Elapsed time at end of orchestra compile: real: 115.312s, CPU: 0.090s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 115.314s, CPU: 0.090s
Csound version 5.14 beta (double samples) Nov 21 2011
0dBFS level = 32768.0

Program received signal SIGSEGV, Segmentation fault.
0x00007fffed0fb85b in PyImport_GetModuleDict ()
   from /usr/lib64/libpython2.7.so.1.0
(gdb) where
#0  0x00007fffed0fb85b in PyImport_GetModuleDict ()
   from /usr/lib64/libpython2.7.so.1.0
#1  0x00007fffed12f24c in PyImport_AddModule ()
   from /usr/lib64/libpython2.7.so.1.0
#2  0x00007fffed3e3c84 in run_statement_in_given_context (
    csound=, p=0x7fffe937afc8)
    at Opcodes/py/pythonopcodes.c:71
#3  pyruni_irate (csound=, p=0x7fffe937afc8)
    at Opcodes/py/pyx.auto.c:134
#4  0x0000000000435761 in init0 (csound=0x7ffff7efb0a0) at Engine/insert.c:55
#5  0x0000000000442e5b in oload (p=)
    at Engine/otran.c:1451
#6  0x000000000043c142 in musmon (csound=0x7ffff7efb0a0) at
Engine/musmon.c:210
#7  0x0000000000414956 in csoundCompile (csound=0x7ffff7efb0a0,
    argc=, argv=0x7fffffffe088) at Top/main.c:453
#8  0x000000000040a769 in main (argc=3, argv=0x7fffffffe088)
    at frontends/csound/csound_main.c:136




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"

Date2011-11-23 21:53
FromTito Latini
SubjectRe: [Csnd] pyruni seg fault
AttachmentsNone  

Date2011-11-30 07:19
Fromben hackbarth
SubjectRe: [Csnd] pyruni seg fault
bump in hopes of finding a solution.  i myself cannot offer any
insight into the python error, unfortunately.

might there be a more elegant way of feeding python code into the
orchestra than using pyrun?

thanks in advance,
--  ben



On Wed, Nov 23, 2011 at 1:53 PM, Tito Latini  wrote:
> From python-2.7.2 source file:
>
> `PyImport_GetModuleDict' call `PyThreadState_GET()->interp'
>
> PyThreadState_GET() is a macro in pystate.h:
>
> #ifdef Py_DEBUG
> #define PyThreadState_GET() PyThreadState_Get()
> #else
> #define PyThreadState_GET() (_PyThreadState_Current)
> #endif
>
> the PyThreadState_Get() function:
>
> PyThreadState *
> PyThreadState_Get(void)
> {
>    if (_PyThreadState_Current == NULL)
>        Py_FatalError("PyThreadState_Get: no current thread");
>
>    return _PyThreadState_Current;
> }
>
> Probably _PyThreadState_Current is NULL
>
> tito
>
> On Wed, Nov 23, 2011 at 08:02:49PM -0000, jpff@cs.bath.ac.uk wrote:
>> >
>> > john: here is a csd which seg faults (for me):
>> > http://pastebin.com/4gDwNXVU
>> >
>> Thanks; I am getting a segfault in PyImport_GetModuleDict ()
>>
>> whatever that it.  What should it do?
>> create_instrument: instr num 1
>> create_opcode: Found node for opcode bamboo
>> create_opcode: Found node for opcode outs
>> Instr 0 check on opcode==.r
>> Instr 0 check on opcode==.r
>> Instr 0 check on opcode==.r
>> Instr 0 check on opcode=pyruni
>> Elapsed time at end of orchestra compile: real: 115.312s, CPU: 0.090s
>> sorting score ...
>>         ... done
>> Elapsed time at end of score sort: real: 115.314s, CPU: 0.090s
>> Csound version 5.14 beta (double samples) Nov 21 2011
>> 0dBFS level = 32768.0
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007fffed0fb85b in PyImport_GetModuleDict ()
>>    from /usr/lib64/libpython2.7.so.1.0
>> (gdb) where
>> #0  0x00007fffed0fb85b in PyImport_GetModuleDict ()
>>    from /usr/lib64/libpython2.7.so.1.0
>> #1  0x00007fffed12f24c in PyImport_AddModule ()
>>    from /usr/lib64/libpython2.7.so.1.0
>> #2  0x00007fffed3e3c84 in run_statement_in_given_context (
>>     csound=, p=0x7fffe937afc8)
>>     at Opcodes/py/pythonopcodes.c:71
>> #3  pyruni_irate (csound=, p=0x7fffe937afc8)
>>     at Opcodes/py/pyx.auto.c:134
>> #4  0x0000000000435761 in init0 (csound=0x7ffff7efb0a0) at Engine/insert.c:55
>> #5  0x0000000000442e5b in oload (p=)
>>     at Engine/otran.c:1451
>> #6  0x000000000043c142 in musmon (csound=0x7ffff7efb0a0) at
>> Engine/musmon.c:210
>> #7  0x0000000000414956 in csoundCompile (csound=0x7ffff7efb0a0,
>>     argc=, argv=0x7fffffffe088) at Top/main.c:453
>> #8  0x000000000040a769 in main (argc=3, argv=0x7fffffffe088)
>>     at frontends/csound/csound_main.c:136
>>
>>
>>
>>
>> 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"
>
>
> 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"
>
>


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"


Date2011-11-30 09:16
FromVictor Lazzarini
SubjectRe: [Csnd] pyruni seg fault
OK, could you do two things for me? One: post the offending CSD; Two: move this discussion to the developer's list.

On 30 Nov 2011, at 07:19, ben hackbarth wrote:

> bump in hopes of finding a solution.  i myself cannot offer any
> insight into the python error, unfortunately.
> 
> might there be a more elegant way of feeding python code into the
> orchestra than using pyrun?
> 
> thanks in advance,
> --  ben
> 
> 
> 
> On Wed, Nov 23, 2011 at 1:53 PM, Tito Latini  wrote:
>> From python-2.7.2 source file:
>> 
>> `PyImport_GetModuleDict' call `PyThreadState_GET()->interp'
>> 
>> PyThreadState_GET() is a macro in pystate.h:
>> 
>> #ifdef Py_DEBUG
>> #define PyThreadState_GET() PyThreadState_Get()
>> #else
>> #define PyThreadState_GET() (_PyThreadState_Current)
>> #endif
>> 
>> the PyThreadState_Get() function:
>> 
>> PyThreadState *
>> PyThreadState_Get(void)
>> {
>>    if (_PyThreadState_Current == NULL)
>>        Py_FatalError("PyThreadState_Get: no current thread");
>> 
>>    return _PyThreadState_Current;
>> }
>> 
>> Probably _PyThreadState_Current is NULL
>> 
>> tito
>> 
>> On Wed, Nov 23, 2011 at 08:02:49PM -0000, jpff@cs.bath.ac.uk wrote:
>>>> 
>>>> john: here is a csd which seg faults (for me):
>>>> http://pastebin.com/4gDwNXVU
>>>> 
>>> Thanks; I am getting a segfault in PyImport_GetModuleDict ()
>>> 
>>> whatever that it.  What should it do?
>>> create_instrument: instr num 1
>>> create_opcode: Found node for opcode bamboo
>>> create_opcode: Found node for opcode outs
>>> Instr 0 check on opcode==.r
>>> Instr 0 check on opcode==.r
>>> Instr 0 check on opcode==.r
>>> Instr 0 check on opcode=pyruni
>>> Elapsed time at end of orchestra compile: real: 115.312s, CPU: 0.090s
>>> sorting score ...
>>>         ... done
>>> Elapsed time at end of score sort: real: 115.314s, CPU: 0.090s
>>> Csound version 5.14 beta (double samples) Nov 21 2011
>>> 0dBFS level = 32768.0
>>> 
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x00007fffed0fb85b in PyImport_GetModuleDict ()
>>>    from /usr/lib64/libpython2.7.so.1.0
>>> (gdb) where
>>> #0  0x00007fffed0fb85b in PyImport_GetModuleDict ()
>>>    from /usr/lib64/libpython2.7.so.1.0
>>> #1  0x00007fffed12f24c in PyImport_AddModule ()
>>>    from /usr/lib64/libpython2.7.so.1.0
>>> #2  0x00007fffed3e3c84 in run_statement_in_given_context (
>>>     csound=, p=0x7fffe937afc8)
>>>     at Opcodes/py/pythonopcodes.c:71
>>> #3  pyruni_irate (csound=, p=0x7fffe937afc8)
>>>     at Opcodes/py/pyx.auto.c:134
>>> #4  0x0000000000435761 in init0 (csound=0x7ffff7efb0a0) at Engine/insert.c:55
>>> #5  0x0000000000442e5b in oload (p=)
>>>     at Engine/otran.c:1451
>>> #6  0x000000000043c142 in musmon (csound=0x7ffff7efb0a0) at
>>> Engine/musmon.c:210
>>> #7  0x0000000000414956 in csoundCompile (csound=0x7ffff7efb0a0,
>>>     argc=, argv=0x7fffffffe088) at Top/main.c:453
>>> #8  0x000000000040a769 in main (argc=3, argv=0x7fffffffe088)
>>>     at frontends/csound/csound_main.c:136
>>> 
>>> 
>>> 
>>> 
>>> 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"
>> 
>> 
>> 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"
>> 
>> 
> 
> 
> 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





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"


Date2011-12-01 08:18
FromTito Latini
SubjectRe: [Csnd] pyruni seg fault
AttachmentsNone