[cable] generated python wrapper signals EXC_BAD_ACCESS on MacOSX
Brad King
brad.king at kitware.com
Mon Feb 9 17:57:33 EST 2004
Kaben Nanlohy wrote:
> Running python2.3 from gdb (this may not be a good way to debug -- I am no
> python expert), I see:
>
>
>
>>>>b=bar()
>
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> PyErr_Occurred () at Python/errors.c:81
> 81 Python/errors.c: No such file or directory.
> in Python/errors.c
> (gdb) bt
> #0 PyErr_Occurred () at Python/errors.c:81
> #1 0x013497f4 in PyObject_Call (func=0x1442af0, arg=0x0, kw=0x13497f4) at Objects/abstract.c:1756
> #2 0x013b2358 in PyEval_CallObjectWithKeywords (func=0x614cb0, arg=0x706030, kw=0x0) at Python/ceval.c:3346
> #3 0x005516b0 in SWIG_NewPointerObj (ptr=0x0, type=0x0, own=0) at /Users/kaben/Projects/software/avida/branch.kaben/build/cableswig_example/SwigRuntime/swigrunPython.cc:589
> #4 0x005204c8 in _wrap_new_bar__SWIG_1(_object*, _object*) (self=0x0, args=0x31e030) at /Users/kaben/Projects/software/avida/branch.kaben/build/cableswig_example/Module/barPython.cc:760
> #5 0x005205a4 in _wrap_new_bar(_object*, _object*) (self=0x0, args=0x31e030) at /Users/kaben/Projects/software/avida/branch.kaben/build/cableswig_example/Module/barPython.cc:778
> #6 0x0002235c in PyObject_Call (func=0x1442af0, arg=0x0, kw=0x13497f4) at Objects/abstract.c:1755
> .
> .
> .
> #30 0x000039d4 in start ()
I have not seen this error before. There are a few things to do for
starters. Please obtain the python2.3 source (I think fink puts it
somewhere like /sw/sources on your disk) and extract it. Then use
symlinks in your build tree to help it find the debugging symbols.
Hopefully this will reveal what is going wrong inside PyErr_Occurred().
You might also want to use gdb to step through the object construction
in the swig-only version you report that works. Then you can compare
the call to PyObject_CallObjectWithKeywords side-by-side between the two
examples.
-Brad
More information about the cable
mailing list