dafx / pyo

Automatically exported from code.google.com/p/pyo
GNU General Public License v3.0
0 stars 0 forks source link

pyo doesn't work under 64 bit Ububtu #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
15:48 tito@ashaka examples $ gdb --args python xnoise_example.py
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show 
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols 
found)...done.
(gdb) r
Starting program: /usr/bin/python xnoise_example.py
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff41f7710 (LWP 30355)]
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
[New Thread 0x7fffec4bf710 (LWP 30356)]
[Thread 0x7fffec4bf710 (LWP 30356) exited]
[New Thread 0x7fffec4bf710 (LWP 30357)]
[Thread 0x7fffec4bf710 (LWP 30357) exited]
[New Thread 0x7fffec4bf710 (LWP 30358)]
[Thread 0x7fffec4bf710 (LWP 30358) exited]
[New Thread 0x7fffec4bf710 (LWP 30359)]
[Thread 0x7fffec4bf710 (LWP 30359) exited]
[New Thread 0x7fffec4bf710 (LWP 30360)]
[Thread 0x7fffec4bf710 (LWP 30360) exited]
[New Thread 0x7fffec4bf710 (LWP 30361)]
PortMidi initialized.
Something wrong with midi device!
Portmidi closed

Program received signal SIGSEGV, Segmentation fault.
0x00000000004bacda in PyArg_ParseTupleAndKeywords ()
(gdb) bt
#0  0x00000000004bacda in PyArg_ParseTupleAndKeywords ()
#1  0x00007ffff3748b20 in Osc_out (self=0x7ffff1a02460, 
args=0x7ffff7f59c50, kwds=0x7ffff3748af0) at 
src/objects/oscilmodule.c:1244
#2  0x00000000004a7c5e in PyEval_EvalFrameEx ()
#3  0x00000000004a9671 in PyEval_EvalCodeEx ()
#4  0x00000000004a7809 in PyEval_EvalFrameEx ()
#5  0x00000000004a9671 in PyEval_EvalCodeEx ()
#6  0x00000000004a9742 in PyEval_EvalCode ()
#7  0x00000000004c9a0e in PyRun_FileExFlags ()
#8  0x00000000004c9c24 in PyRun_SimpleFileExFlags ()
#9  0x000000000041a7ff in Py_Main ()
#10 0x00007ffff69dec4d in __libc_start_main (main=<value optimized 
out>, argc=<value optimized out>, ubp_av=<value optimized out>,
    init=<value optimized out>, fini=<value optimized out>, 
rtld_fini=<value optimized out>, stack_end=0x7fffffffddd8) at libc-
start.c:226
#11 0x00000000004199f9 in _start ()
(gdb) up 1
#1  0x00007ffff3748b20 in Osc_out (self=0x7ffff1a02460, 
args=0x7ffff7f59c50, kwds=0x7ffff3748af0) at 
src/objects/oscilmodule.c:1244
1244    static PyObject * Osc_out(Osc *self, PyObject *args, PyObject *kwds) 
{ OUT };
(gdb) p self
$1 = (Osc *) 0x7ffff1a02460
(gdb) p *self
$2 = {ob_refcnt = 5, ob_type = 0x7ffff39dd5a0, server = 0xb10f30, 
stream = 0xb620a0, mode_func_ptr = 0x7ffff3740cd0 
<Osc_setProcMode>, 
  proc_func_ptr = 0x7ffff3753140 <Osc_readframes_ai>, muladd_func_ptr 
= 0x7ffff374e1a0 <Osc_postprocessing_ai>, mul = 0x7ffff69afb30, 
  mul_stream = 0x7ffff1a2d7a0, add = 0xc053e8, add_stream = 0x0, 
bufsize = 1024, nchnls = 2, sr = 44100, data = 0xc19540, table = 
0x7ffff7f50150, 
  freq = 0xbfa030, freq_stream = 0x7ffff1a2de30, phase = 0xc05418, 
phase_stream = 0x0, modebuffer = {1, 0, 1, 0}, pointerPos = 0}
(gdb) p *args
$3 = {ob_refcnt = 1, ob_type = 0x82df40}
(gdb) p *kwds
$4 = {ob_refcnt = 11639052361877587, ob_type = 0x8948f78948fb8948}
(gdb) l
1239    static PyObject * Osc_setAdd(Osc *self, PyObject *arg) { SET_ADD };     
1240    static PyObject * Osc_setSub(Osc *self, PyObject *arg) { SET_SUB };     
1241    static PyObject * Osc_setDiv(Osc *self, PyObject *arg) { SET_DIV };     
1242    
1243    static PyObject * Osc_play(Osc *self) { PLAY };
1244    static PyObject * Osc_out(Osc *self, PyObject *args, PyObject *kwds) 
{ OUT };
1245    static PyObject * Osc_stop(Osc *self) { STOP };
1246    
1247    static PyObject * Osc_multiply(Osc *self, PyObject *arg) { MULTIPLY 
};
1248    static PyObject * Osc_inplace_multiply(Osc *self, PyObject *arg) { 
INPLACE_MULTIPLY };
(gdb) 

Original issue reported on code.google.com by leca...@gmail.com on 25 Mar 2010 at 3:41

GoogleCodeExporter commented 9 years ago
I got the same issue, and found a solution !
If you use the third parameters of Python function, you must declare the 
function
with METH_VARARGS|METH_KEYWORDS, and not only METH_VARARGS. Otherwise, the third
parameters will be invalid.

Here is a patch that can be applied on the latest svn (r259 right now)

Original comment by txprog on 25 Mar 2010 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
I'll check this out tonight. Thanks!

Original comment by belan...@gmail.com on 25 Mar 2010 at 8:42

GoogleCodeExporter commented 9 years ago
The patch is applied (r260). No changes on my 32bits computer, I will test it on
64bits (OS X) tomorrow. Check it out on your side... Thanks again! 

Original comment by belan...@gmail.com on 26 Mar 2010 at 1:33

GoogleCodeExporter commented 9 years ago
Works well on OS X (64 bits), hope it's the same on linux!

Original comment by belan...@gmail.com on 26 Mar 2010 at 7:48

GoogleCodeExporter commented 9 years ago
Cool ! Thanks for integrating it :)

Original comment by txprog on 30 Mar 2010 at 8:07