[PD-dev] pyext crash

Thomas Grill gr at grrrr.org
Tue Sep 20 21:47:29 CEST 2005


Hi Georg,
thanks for the report, but that's a really complex thing which needs 
some in-deep analysis
Unfortunately debugging that means that i'll have to build debug 
versions of the modules used, and that's a bit out of scope at the moment.
I'll see what i can do....

all the best,
Thomas

Georg Holzmann schrieb:

> Hallo Thomas, all!
>
> just playing around with pyext to make a simple remote procedure call 
> I have the following problem:
> (python script is attached)
>
> when I try to call the method "trigger" from an other program, PD 
> always is crashing with the following backtrace:
>
> ----------8<----------
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1345365072 (LWP 7095)]
> 0xb6d34602 in pyext::pyext_outlet () from /usr/lib/pd/extra/py.pd_linux
> (gdb) bt
> #0  0xb6d34602 in pyext::pyext_outlet () from 
> /usr/lib/pd/extra/py.pd_linux
> #1  0xb6c57308 in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
> #2  0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> #3  0xb6c8dd4c in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #4  0xb6c91a4a in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
> #5  0xb6c44845 in PyFunction_SetClosure () from 
> /usr/lib/libpython2.3.so.1.0
> #6  0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> #7  0xb6c8f422 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #8  0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #9  0xb6c91a4a in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
> #10 0xb6c90b1f in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #11 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #12 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #13 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #14 0xb6c91a4a in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
> #15 0xb6c44845 in PyFunction_SetClosure () from 
> /usr/lib/libpython2.3.so.1.0
> #16 0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> #17 0xb6c314c3 in PyMethod_New () from /usr/lib/libpython2.3.so.1.0
> #18 0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> #19 0xb6c8b11d in PyEval_CallObjectWithKeywords ()
>    from /usr/lib/libpython2.3.so.1.0
> #20 0xb6c33c0a in PyInstance_New () from /usr/lib/libpython2.3.so.1.0
> #21 0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> ---Type <return> to continue, or q <return> to quit---
> #22 0xb6c8dd4c in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #23 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #24 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #25 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #26 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #27 0xb6c90da5 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
> #28 0xb6c91a4a in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0
> #29 0xb6c44845 in PyFunction_SetClosure () from 
> /usr/lib/libpython2.3.so.1.0
> #30 0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> #31 0xb6c314c3 in PyMethod_New () from /usr/lib/libpython2.3.so.1.0
> #32 0xb6c29f2a in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
> #33 0xb6c8b11d in PyEval_CallObjectWithKeywords ()
>    from /usr/lib/libpython2.3.so.1.0
> #34 0xb6cbdf71 in PyGC_Collect () from /usr/lib/libpython2.3.so.1.0
> #35 0xb7f9fccd in start_thread () from /lib/tls/libpthread.so.0
> #36 0xb7f33b0e in clone () from /lib/tls/libc.so.6
> (gdb)
> -------------8<------------
>
> I gues I am using something in a wrong way, but if I don't try to send 
> the number to the outlet (line 31 in xmlrpc_server.py) there is no 
> crash (e.g. a simple print in python works fine ...)
>
> Thanks for any hint,
> LG
> Georg
>
>------------------------------------------------------------------------
>
># ================================================
># py script for pure data
>#
>"""scripts to get messages from a xmlrpc server"""
>#
># (c) 2005, Georg Holzmann, <grh at mur.at>
># ================================================
>
># ================================================
># imports
>import pyext, SimpleXMLRPCServer, threading
>from SimpleXMLRPCServer import SimpleXMLRPCServer
>
># ================================================
># PDxmlrpc class
>class PDxmlrpc(pyext._class):
>	""" xmlrpc server """
>	
>	# define in, outlets
>	_inlets=1
>	_outlets=1
>	
>	# start server
>	def start_server_1(self, port):
>		s = AsyncServer(port)
>		s.start()
>	
>	# trigger a specific number and
>	# put it out to pd
>	def trigger(self, number):
>		self._outlet(1,number)
>
># ======================================================================
># xmlrpc server
>class AsyncServer(threading.Thread):
>  """Starts the xmlrpc-server asynchron"""
>  def __init__(self, port):
>    threading.Thread.__init__(self)
>    self.port = port
>  def run(self):
>    self.server = SimpleXMLRPCServer(("localhost", self.port))
>    self.server.register_instance(PDxmlrpc())
>    print "xmlrpc server serving on port ", self.port
>    self.server.serve_forever()
>
># EOF
># ======================================================================
>
>------------------------------------------------------------------------
>
>_______________________________________________
>PD-dev mailing list
>PD-dev at iem.at
>http://lists.puredata.info/listinfo/pd-dev
>  
>

-- 
Thomas Grill
http://grrrr.org






More information about the Pd-dev mailing list