From: Barry S. <ba...@ba...> - 2007-03-17 10:13:08
|
On Mar 15, 2007, at 13:41, Gregor Mirai wrote: > Hello, There is a PyCXX mailing list that we can use for this. I've CC'ed to get this useful info onto the list. > > I have traced the problem down to the GCC compiler. > > For instance using more than one shared object file from python > works ok when > they are compiled on Solaris machine. > > The cause of the problem (when compiling with GCC) are multiple > exception > typeinfos that have different addresses which does not match well > when python > tries to catch exceptions. In effect python doesn't catch them and the > program terminates. > > It seems this is a well known bug, that will be fixed in upcoming > version 4.2. > of GCC compiler. > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 That's nasty. > > I am not sure if there is any workaround for this issue. The > intermediate > solution would be to catch all exceptions in python extension > libraries and > return some sort of exception info to the caller. THe code does catch all exceptions and return to python. I guess that the compiler bug is preventing C++ exceptions from working. And that means that the translation from C++ to Python exceptions is broken. Barry |