Csound Csound-dev Csound-tekno Search About

[Csnd] OSX csnd.CppSound.compile() error

Date2009-04-04 20:51
FromChuckk Hubbard
Subject[Csnd] OSX csnd.CppSound.compile() error
Attachmentsdactester.py  
I get this:
Fatal Python error: PyThreadState_Get: no current thread
Csound tidy up: Abort trap

on OSX if I follow CppSound.setPythonMessageCallback() with
CppSound.compile().  Python exits.  I do not get this error if I don't
setPythonMessageCallback(), but this is the script with which I test
which DACs are available for a given module, and I need to parse the
Csound error message to find the list.  I also don't get this error if
I run the Compile() method, but, of course, I get another error, as it
is a different method.  On Windows and Linux, I don't have to actually
use a performance thread nor perform the csd, I get the error message
(the good one, I mean, with the list of DACs) right after
CppSound.compile().

The attached script should exit with pleasant, small-town realtime
errors on Windows and Linux, and with a downright uncivilized Abort
trap error on OSX.

I've seen two references to this exact error (the bad one, the "Abort
trap" one) in the mailing list archive, but it looks unresolved, no?
Could I possibly get the desired results using the Compile() method,
calling it some other way?  I haven't had much luck with it.

Thanks yet again,
Chuckk

-- 
http://www.badmuthahubbard.com

Date2009-04-05 01:40
Fromvictor
Subject[Csnd] Re: OSX csnd.CppSound.compile() error
There is something to be fixed in the callback wrappers for OSX, which
could not be fixed before, because it depended on Python2.5.
Now that we have moved from 2.3 to 2.5, I think everything
should work, but I need to fix it first. It is a known issue, thanks
for reminding me. I'll try to do it as soon as I can and it will be
there in the next release.

Victor
----- Original Message ----- 
From: "Chuckk Hubbard" 
To: "Csound List" 
Sent: Saturday, April 04, 2009 8:51 PM
Subject: [Csnd] OSX csnd.CppSound.compile() error


>I get this:
> Fatal Python error: PyThreadState_Get: no current thread
> Csound tidy up: Abort trap
>
> on OSX if I follow CppSound.setPythonMessageCallback() with
> CppSound.compile().  Python exits.  I do not get this error if I don't
> setPythonMessageCallback(), but this is the script with which I test
> which DACs are available for a given module, and I need to parse the
> Csound error message to find the list.  I also don't get this error if
> I run the Compile() method, but, of course, I get another error, as it
> is a different method.  On Windows and Linux, I don't have to actually
> use a performance thread nor perform the csd, I get the error message
> (the good one, I mean, with the list of DACs) right after
> CppSound.compile().
>
> The attached script should exit with pleasant, small-town realtime
> errors on Windows and Linux, and with a downright uncivilized Abort
> trap error on OSX.
>
> I've seen two references to this exact error (the bad one, the "Abort
> trap" one) in the mailing list archive, but it looks unresolved, no?
> Could I possibly get the desired results using the Compile() method,
> calling it some other way?  I haven't had much luck with it.
>
> Thanks yet again,
> Chuckk
>
> -- 
> http://www.badmuthahubbard.com
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2009-04-05 09:56
FromChuckk Hubbard
Subject[Csnd] Re: Re: OSX csnd.CppSound.compile() error
OK, thanks Victor.
Any chance you could let me know if you happen to fix it in CVS, so I
can set up a py2app version of my app in the meantime?  I'm just about
at the end of my Mac to-do list.
I even came up with a menu-based Maximize function to replace the
non-functioning "+" button that Tk doesn't know how to use.  My
Digital Performer-using former colleagues will chuckle
condescendingly, but they're 5,000 miles away, so the only way I'll
hear them laughing is through their little iSight camera microphones.

-Chuckk

On Sun, Apr 5, 2009 at 3:40 AM, victor  wrote:
> There is something to be fixed in the callback wrappers for OSX, which
> could not be fixed before, because it depended on Python2.5.
> Now that we have moved from 2.3 to 2.5, I think everything
> should work, but I need to fix it first. It is a known issue, thanks
> for reminding me. I'll try to do it as soon as I can and it will be
> there in the next release.
>
> Victor
> ----- Original Message ----- From: "Chuckk Hubbard"
> 
> To: "Csound List" 
> Sent: Saturday, April 04, 2009 8:51 PM
> Subject: [Csnd] OSX csnd.CppSound.compile() error
>
>
>> I get this:
>> Fatal Python error: PyThreadState_Get: no current thread
>> Csound tidy up: Abort trap
>>
>> on OSX if I follow CppSound.setPythonMessageCallback() with
>> CppSound.compile().  Python exits.  I do not get this error if I don't
>> setPythonMessageCallback(), but this is the script with which I test
>> which DACs are available for a given module, and I need to parse the
>> Csound error message to find the list.  I also don't get this error if
>> I run the Compile() method, but, of course, I get another error, as it
>> is a different method.  On Windows and Linux, I don't have to actually
>> use a performance thread nor perform the csd, I get the error message
>> (the good one, I mean, with the list of DACs) right after
>> CppSound.compile().
>>
>> The attached script should exit with pleasant, small-town realtime
>> errors on Windows and Linux, and with a downright uncivilized Abort
>> trap error on OSX.
>>
>> I've seen two references to this exact error (the bad one, the "Abort
>> trap" one) in the mailing list archive, but it looks unresolved, no?
>> Could I possibly get the desired results using the Compile() method,
>> calling it some other way?  I haven't had much luck with it.
>>
>> Thanks yet again,
>> Chuckk
>>
>> --
>> http://www.badmuthahubbard.com
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



-- 
http://www.badmuthahubbard.com


Date2009-04-09 17:14
FromChuckk Hubbard
Subject[Csnd] Re: OSX csnd.CppSound.compile() error
Hi again.
There are two parts of my program that require parsing Csound output,
which I've been doing with separate Python scripts, but now I see the
Python message callback wrapper has some OSX issues; and it occurred
to me that maybe I could code them in C (both have extremely simple
Csound code which just needs to be run, not manipulated too much).  I
see now there are multiple ways to do this: I can run functions from a
.dll straight from Python, or compile standalone C/C++ programs to be
called as subprocesses, and I think a couple other ways I haven't
worked out yet.  If the message readout can be parsed by a C program
and the result given as its output, I can read that from Python.
Any suggestions as to the best way?  The python versions of these two
scripts are really simple, around 75 lines.

-Chuckk

On Sat, Apr 4, 2009 at 10:51 PM, Chuckk Hubbard
 wrote:
> I get this:
> Fatal Python error: PyThreadState_Get: no current thread
> Csound tidy up: Abort trap
>
> on OSX if I follow CppSound.setPythonMessageCallback() with
> CppSound.compile().  Python exits.  I do not get this error if I don't
> setPythonMessageCallback(), but this is the script with which I test
> which DACs are available for a given module, and I need to parse the
> Csound error message to find the list.  I also don't get this error if
> I run the Compile() method, but, of course, I get another error, as it
> is a different method.  On Windows and Linux, I don't have to actually
> use a performance thread nor perform the csd, I get the error message
> (the good one, I mean, with the list of DACs) right after
> CppSound.compile().
>
> The attached script should exit with pleasant, small-town realtime
> errors on Windows and Linux, and with a downright uncivilized Abort
> trap error on OSX.
>
> I've seen two references to this exact error (the bad one, the "Abort
> trap" one) in the mailing list archive, but it looks unresolved, no?
> Could I possibly get the desired results using the Compile() method,
> calling it some other way?  I haven't had much luck with it.
>
> Thanks yet again,
> Chuckk
>
> --
> http://www.badmuthahubbard.com
>



-- 
http://www.badmuthahubbard.com


Date2009-04-09 18:00
Fromvictor
Subject[Csnd] Re: Re: OSX csnd.CppSound.compile() error
If you doing that, I'd suggest writing functions in C and then using
SWIG to wrap them.

Victor
----- Original Message ----- 
From: "Chuckk Hubbard" 
To: "Csound List" 
Sent: Thursday, April 09, 2009 5:14 PM
Subject: [Csnd] Re: OSX csnd.CppSound.compile() error


Hi again.
There are two parts of my program that require parsing Csound output,
which I've been doing with separate Python scripts, but now I see the
Python message callback wrapper has some OSX issues; and it occurred
to me that maybe I could code them in C (both have extremely simple
Csound code which just needs to be run, not manipulated too much).  I
see now there are multiple ways to do this: I can run functions from a
.dll straight from Python, or compile standalone C/C++ programs to be
called as subprocesses, and I think a couple other ways I haven't
worked out yet.  If the message readout can be parsed by a C program
and the result given as its output, I can read that from Python.
Any suggestions as to the best way?  The python versions of these two
scripts are really simple, around 75 lines.

-Chuckk

On Sat, Apr 4, 2009 at 10:51 PM, Chuckk Hubbard
 wrote:
> I get this:
> Fatal Python error: PyThreadState_Get: no current thread
> Csound tidy up: Abort trap
>
> on OSX if I follow CppSound.setPythonMessageCallback() with
> CppSound.compile(). Python exits. I do not get this error if I don't
> setPythonMessageCallback(), but this is the script with which I test
> which DACs are available for a given module, and I need to parse the
> Csound error message to find the list. I also don't get this error if
> I run the Compile() method, but, of course, I get another error, as it
> is a different method. On Windows and Linux, I don't have to actually
> use a performance thread nor perform the csd, I get the error message
> (the good one, I mean, with the list of DACs) right after
> CppSound.compile().
>
> The attached script should exit with pleasant, small-town realtime
> errors on Windows and Linux, and with a downright uncivilized Abort
> trap error on OSX.
>
> I've seen two references to this exact error (the bad one, the "Abort
> trap" one) in the mailing list archive, but it looks unresolved, no?
> Could I possibly get the desired results using the Compile() method,
> calling it some other way? I haven't had much luck with it.
>
> Thanks yet again,
> Chuckk
>
> --
> http://www.badmuthahubbard.com
>



-- 
http://www.badmuthahubbard.com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"= 


Date2009-04-09 23:20
FromDavidW
Subject[Csnd] Re: Re: Re: OSX csnd.CppSound.compile() error
or use (now a standard library module)  ctypes:
assistance?:
http://www.python.org/doc/2.5.2/lib/ctypes-ctypes-tutorial.html
http://eli.thegreenplace.net/2008/08/31/ctypes-calling-cc-code-from-python/

D.

On 10/04/2009, at 3:00 AM, victor wrote:

> If you doing that, I'd suggest writing functions in C and then using
> SWIG to wrap them.
>
> Victor
> ----- Original Message ----- From: "Chuckk Hubbard"  >
> To: "Csound List" 
> Sent: Thursday, April 09, 2009 5:14 PM
> Subject: [Csnd] Re: OSX csnd.CppSound.compile() error
>
>
> Hi again.
> There are two parts of my program that require parsing Csound output,
> which I've been doing with separate Python scripts, but now I see the
> Python message callback wrapper has some OSX issues; and it occurred
> to me that maybe I could code them in C (both have extremely simple
> Csound code which just needs to be run, not manipulated too much).  I
> see now there are multiple ways to do this: I can run functions from a
> .dll straight from Python, or compile standalone C/C++ programs to be
> called as subprocesses, and I think a couple other ways I haven't
> worked out yet.  If the message readout can be parsed by a C program
> and the result given as its output, I can read that from Python.
> Any suggestions as to the best way?  The python versions of these two
> scripts are really simple, around 75 lines.
>
> -Chuckk
>
> On Sat, Apr 4, 2009 at 10:51 PM, Chuckk Hubbard
>  wrote:
>> I get this:
>> Fatal Python error: PyThreadState_Get: no current thread
>> Csound tidy up: Abort trap
>>
>> on OSX if I follow CppSound.setPythonMessageCallback() with
>> CppSound.compile(). Python exits. I do not get this error if I don't
>> setPythonMessageCallback(), but this is the script with which I test
>> which DACs are available for a given module, and I need to parse the
>> Csound error message to find the list. I also don't get this error if
>> I run the Compile() method, but, of course, I get another error, as  
>> it
>> is a different method. On Windows and Linux, I don't have to actually
>> use a performance thread nor perform the csd, I get the error message
>> (the good one, I mean, with the list of DACs) right after
>> CppSound.compile().
>>
>> The attached script should exit with pleasant, small-town realtime
>> errors on Windows and Linux, and with a downright uncivilized Abort
>> trap error on OSX.
>>
>> I've seen two references to this exact error (the bad one, the "Abort
>> trap" one) in the mailing list archive, but it looks unresolved, no?
>> Could I possibly get the desired results using the Compile() method,
>> calling it some other way? I haven't had much luck with it.
>>
>> Thanks yet again,
>> Chuckk
>>
>> --
>> http://www.badmuthahubbard.com
>>
>
>
>
> -- 
> http://www.badmuthahubbard.com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"=
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>

________________________________________________
David Worrall.
- Experimental Polymedia:	www.avatar.com.au
- Education for Financial Independence: www.mindthemarkets.com.au
Australian research affiliations:
- Capital Markets Cooperative Research Centre: www.cmcrc.com
- Sonic Communications Research Group:	creative.canberra.edu.au/scrg
- MARCS Auditory Laboratories: marcs.uws.edu.au




Date2009-04-10 11:26
FromChuckk Hubbard
Subject[Csnd] Re: Re: Re: Re: OSX csnd.CppSound.compile() error
Thanks for the suggestions, Victor and David.
For now it looks like the first step will be creating C code that will
compile at all.  I'll get there though.

-Chuckk

On Fri, Apr 10, 2009 at 1:20 AM, DavidW  wrote:
> or use (now a standard library module)  ctypes:
> assistance?:
> http://www.python.org/doc/2.5.2/lib/ctypes-ctypes-tutorial.html
> http://eli.thegreenplace.net/2008/08/31/ctypes-calling-cc-code-from-python/
>
> D.
>
> On 10/04/2009, at 3:00 AM, victor wrote:
>
>> If you doing that, I'd suggest writing functions in C and then using
>> SWIG to wrap them.
>>
>> Victor
>> ----- Original Message ----- From: "Chuckk Hubbard"
>> 
>> To: "Csound List" 
>> Sent: Thursday, April 09, 2009 5:14 PM
>> Subject: [Csnd] Re: OSX csnd.CppSound.compile() error
>>
>>
>> Hi again.
>> There are two parts of my program that require parsing Csound output,
>> which I've been doing with separate Python scripts, but now I see the
>> Python message callback wrapper has some OSX issues; and it occurred
>> to me that maybe I could code them in C (both have extremely simple
>> Csound code which just needs to be run, not manipulated too much).  I
>> see now there are multiple ways to do this: I can run functions from a
>> .dll straight from Python, or compile standalone C/C++ programs to be
>> called as subprocesses, and I think a couple other ways I haven't
>> worked out yet.  If the message readout can be parsed by a C program
>> and the result given as its output, I can read that from Python.
>> Any suggestions as to the best way?  The python versions of these two
>> scripts are really simple, around 75 lines.
>>
>> -Chuckk
>>
>> On Sat, Apr 4, 2009 at 10:51 PM, Chuckk Hubbard
>>  wrote:
>>>
>>> I get this:
>>> Fatal Python error: PyThreadState_Get: no current thread
>>> Csound tidy up: Abort trap
>>>
>>> on OSX if I follow CppSound.setPythonMessageCallback() with
>>> CppSound.compile(). Python exits. I do not get this error if I don't
>>> setPythonMessageCallback(), but this is the script with which I test
>>> which DACs are available for a given module, and I need to parse the
>>> Csound error message to find the list. I also don't get this error if
>>> I run the Compile() method, but, of course, I get another error, as it
>>> is a different method. On Windows and Linux, I don't have to actually
>>> use a performance thread nor perform the csd, I get the error message
>>> (the good one, I mean, with the list of DACs) right after
>>> CppSound.compile().
>>>
>>> The attached script should exit with pleasant, small-town realtime
>>> errors on Windows and Linux, and with a downright uncivilized Abort
>>> trap error on OSX.
>>>
>>> I've seen two references to this exact error (the bad one, the "Abort
>>> trap" one) in the mailing list archive, but it looks unresolved, no?
>>> Could I possibly get the desired results using the Compile() method,
>>> calling it some other way? I haven't had much luck with it.
>>>
>>> Thanks yet again,
>>> Chuckk
>>>
>>> --
>>> http://www.badmuthahubbard.com
>>>
>>
>>
>>
>> --
>> http://www.badmuthahubbard.com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"=
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
> ________________________________________________
> David Worrall.
> - Experimental Polymedia:       www.avatar.com.au
> - Education for Financial Independence: www.mindthemarkets.com.au
> Australian research affiliations:
> - Capital Markets Cooperative Research Centre: www.cmcrc.com
> - Sonic Communications Research Group:  creative.canberra.edu.au/scrg
> - MARCS Auditory Laboratories: marcs.uws.edu.au
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>



-- 
http://www.badmuthahubbard.com


Date2009-04-12 22:54
FromDavidW
Subject[Csnd] Re: Re: OSX csnd.CppSound.compile() error
Hi Chuck,
You could generate the c code through python....
see
http://docs.cython.org/

there's also a package called Pytrex. see
http://docs.cython.org/docs/pyrex_differences.html#pyrex-differences

D.

On 10/04/2009, at 8:26 PM, Chuckk Hubbard wrote:

> Thanks for the suggestions, Victor and David.
> For now it looks like the first step will be creating C code that will
> compile at all.  I'll get there though.
>
> -Chuckk
>
> On Fri, Apr 10, 2009 at 1:20 AM, DavidW  wrote:
>> or use (now a standard library module)  ctypes:
>> assistance?:
>> http://www.python.org/doc/2.5.2/lib/ctypes-ctypes-tutorial.html
>> http://eli.thegreenplace.net/2008/08/31/ctypes-calling-cc-code-from-python/
>>
>> D.
>>
>> On 10/04/2009, at 3:00 AM, victor wrote:
>>
>>> If you doing that, I'd suggest writing functions in C and then using
>>> SWIG to wrap them.
>>>
>>> Victor
>>> ----- Original Message ----- From: "Chuckk Hubbard"
>>> 
>>> To: "Csound List" 
>>> Sent: Thursday, April 09, 2009 5:14 PM
>>> Subject: [Csnd] Re: OSX csnd.CppSound.compile() error
>>>
>>>
>>> Hi again.
>>> There are two parts of my program that require parsing Csound  
>>> output,
>>> which I've been doing with separate Python scripts, but now I see  
>>> the
>>> Python message callback wrapper has some OSX issues; and it occurred
>>> to me that maybe I could code them in C (both have extremely simple
>>> Csound code which just needs to be run, not manipulated too  
>>> much).  I
>>> see now there are multiple ways to do this: I can run functions  
>>> from a
>>> .dll straight from Python, or compile standalone C/C++ programs to  
>>> be
>>> called as subprocesses, and I think a couple other ways I haven't
>>> worked out yet.  If the message readout can be parsed by a C program
>>> and the result given as its output, I can read that from Python.
>>> Any suggestions as to the best way?  The python versions of these  
>>> two
>>> scripts are really simple, around 75 lines.
>>>
>>> -Chuckk
>>>
>>> On Sat, Apr 4, 2009 at 10:51 PM, Chuckk Hubbard
>>>  wrote:
>>>>
>>>> I get this:
>>>> Fatal Python error: PyThreadState_Get: no current thread
>>>> Csound tidy up: Abort trap
>>>>
>>>> on OSX if I follow CppSound.setPythonMessageCallback() with
>>>> CppSound.compile(). Python exits. I do not get this error if I  
>>>> don't
>>>> setPythonMessageCallback(), but this is the script with which I  
>>>> test
>>>> which DACs are available for a given module, and I need to parse  
>>>> the
>>>> Csound error message to find the list. I also don't get this  
>>>> error if
>>>> I run the Compile() method, but, of course, I get another error,  
>>>> as it
>>>> is a different method. On Windows and Linux, I don't have to  
>>>> actually
>>>> use a performance thread nor perform the csd, I get the error  
>>>> message
>>>> (the good one, I mean, with the list of DACs) right after
>>>> CppSound.compile().
>>>>
>>>> The attached script should exit with pleasant, small-town realtime
>>>> errors on Windows and Linux, and with a downright uncivilized Abort
>>>> trap error on OSX.
>>>>
>>>> I've seen two references to this exact error (the bad one, the  
>>>> "Abort
>>>> trap" one) in the mailing list archive, but it looks unresolved,  
>>>> no?
>>>> Could I possibly get the desired results using the Compile()  
>>>> method,
>>>> calling it some other way? I haven't had much luck with it.
>>>>
>>>> Thanks yet again,
>>>> Chuckk
>>>>
>>>> --
>>>> http://www.badmuthahubbard.com
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.badmuthahubbard.com
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"=
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>>
>>
>> ________________________________________________
>> David Worrall.
>> - Experimental Polymedia:       www.avatar.com.au
>> - Education for Financial Independence: www.mindthemarkets.com.au
>> Australian research affiliations:
>> - Capital Markets Cooperative Research Centre: www.cmcrc.com
>> - Sonic Communications Research Group:  creative.canberra.edu.au/scrg
>> - MARCS Auditory Laboratories: marcs.uws.edu.au
>>
>>
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>>
>
>
>
> -- 
> http://www.badmuthahubbard.com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>

________________________________________________
David Worrall.
- Experimental Polymedia:	www.avatar.com.au
- Education for Financial Independence: www.mindthemarkets.com.au
Australian research affiliations:
- Capital Markets Cooperative Research Centre: www.cmcrc.com
- Sonic Communications Research Group:	creative.canberra.edu.au/scrg
- MARCS Auditory Laboratories: marcs.uws.edu.au