[C++-sig] Re: boost::python and exceptions, seg fault

David Abrahams dave at boost-consulting.com
Wed Jun 4 22:33:23 CEST 2003

"Jacques A. Vidrine" <nectar at celabo.org> writes:

> Hello,
> I've pulled some of my hair out over this.  I can't seem to get
> Boost.Python (from Boost 1.29.0) to handle exceptions.  Instead, they
> seem to cause the python interpreter to abort.
> A very simple example is below, along with a backtrace.
> cd .../boost_1_29_0/libs/python/test && bjam ... exception_translator.run
> runs to completion.
> Any clues would be much appreciated!

1. What happens if you build and test your example under bjam?

2. Suppose you add a simple function which doesn't throw to your
   module and try calling that first, from Python.  Does it work?

3. Can you slowly mutate the exception_translator example into your
   example and find out when it breaks?

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list