Boost logo

Boost :

From: John Barnard (barnard_at_[hidden])
Date: 2001-01-29 22:03:36


I'm trying to debug a BPL-wrapped C++ module in VC++ SP4 (under MSWin
98SE). I've successfully built and run my module in debug mode with
python.exe (i.e., a debug version of my module loaded into the
nondebug version of python). However, I can't get it to work with the
debug version of python, python_d.exe. I've added the macro flag
BOOST_DEBUG_PYTHON to both the BPL project and mine as instructed in
wrap_python.hpp. Under this config, I can compile everything and load
my module (into python_d.exe), however, when I try to create any
BPL-wrapped class I get the message:

  "RuntimeError: unidentifiable C++ exception"

The call stack is

_Py_ForgetReference(_object * 0x007a0ca0) line 955 + 15 bytes
_Py_Dealloc(_object * 0x007a0ca0) line 977 + 9 bytes
boost::python::reference<_object>::~reference<_object>() line 115 + 72 bytes
GRID_D! DisableThreadLibraryCalls_at_4 + 35030 bytes
boost::python::class_t<boost::python::detail::extension_instance>::call(_object * 0x0077d92c, _object * 0x00000000) line 236 + 25 bytes
boost::python::detail::callable<boost::python::detail::getattrable<boost::python::detail::setattrable<boost::python::detail::type_object<boost::python::class_t<boost::python::detail::extension_instance> > > > >::instance_call(_object * 0x00772724, _object * 0x0077d92c, _object * 0x00000000) line 236
boost::python::`anonymous namespace'::call(_object * 0x00772724, _object * (_object *, _object *, _object *)* 0x10021580 `vcall'(_object *, _object *, _object *), _object * 0x0077d92c, _object * 0x00000000) line 95 + 53 bytes
do_instance_call(_object * 0x00772724, _object * 0x0077d92c, _object * 0x00000000) line 179 + 39 bytes
PyEval_CallObjectWithKeywords(_object * 0x00772724, _object * 0x0077d92c, _object * 0x00000000) line 2614 + 15 bytes
eval_code2(PyCodeObject * 0x007a7370, _object * 0x0076e09c, _object * 0x0076e09c, _object * * 0x00000000, int 0, _object * * 0x00000000, int 0, _object * * 0x00000000, int 0, _object * 0x00000000) line 1953 + 26 bytes
PyEval_EvalCode(PyCodeObject * 0x007a7370, _object * 0x0076e09c, _object * 0x0076e09c) line 324 + 31 bytes
run_node(_node * 0x007a58a0, char * 0x1e1e69f4, _object * 0x0076e09c, _object * 0x0076e09c) line 886 + 17 bytes
PyRun_InteractiveOne(_iobuf * 0x10261828 __iob, char * 0x1e1e69f4) line 532 + 21 bytes
PyRun_InteractiveLoop(_iobuf * 0x10261828 __iob, char * 0x1e1e69f4) line 478 + 13 bytes
PyRun_AnyFileEx(_iobuf * 0x10261828 __iob, char * 0x1e1e69f4, int 0) line 453 + 13 bytes
PyRun_AnyFile(_iobuf * 0x10261828 __iob, char * 0x1e1e69f4) line 444 + 15 bytes
Py_Main(int 3, char * * 0x00760670) line 297 + 16 bytes
main(int 3, char * * 0x00760670) line 10 + 13 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! bff8b560()
KERNEL32! bff8b412()
KERNEL32! bff89dd5()

Has anyone used the debug version of BPL with the debug version of
Python with VC++? I haven't yet tried this with gcc on Linux. I hope
to this week.

Thanks,

John

-- 
John Barnard
Assistant Professor
Department of Statistics
Harvard University
Phone: (617) 495-1603
Fax:   (617) 496-8057
Email: barnard_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk