[C++-sig] trouble with virtual methods

Hugo van der Merwe s13361562 at bach.sun.ac.za
Sun Feb 3 23:40:54 CET 2002

> Looking at the Boost.Python code, it seems to me that either of these
> mistakes should cause a C++ exception to be thrown. There are only two
> explanations I can think of for your crash:
> 1. The code surrounding your use of callback<>...::call(...) isn't
> exception-safe.
> 2. Your compiler's exception-handling implementation has a bug.
> If you raise a Python exception from within your Python GetTexture method
> you should see a similar crash. If you care about robustness, it would be
> worth your while to track this down.
> -Dave

Yes, error reporting in my current project (not really *my* project,
it's team effort and all, I'm just lending a hand) seems really abysmal
at this point. (Getting just "Aborted", most of the time.) For one the
C++ exceptions are not derived from std::exception yet, so C++
exceptions are not reaching Python. This is next on my TODO list, just
after finishing implementing what I'm currently implementing. (Which is
just redoing some algorithms in the lib, doesn't have anything to do
with Python and exceptions.)

The compiler I'm currently using:

$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011006 (Debian prerelease)

I will write back again when I've put some effort into sorting out the
exception stuff. This might be a while though, a busy week or two coming
up, may keep me away from this project for a while.

Thanks a lot,

More information about the Cplusplus-sig mailing list