[PyQt] SIP default exception handler

Phil Thompson phil at riverbankcomputing.com
Wed Nov 4 18:42:30 GMT 2009


On Tue, 03 Nov 2009 17:04:38 +0100, Sébastien Petitdemange
<sebastien.petitdemange at esrf.fr> wrote:
> Hi,
> 
> We have tested your snapshot code and it works as expected. In fact, we
> had a rather "obscure" problem where our exceptions were thrown in our
> library, but it was not seen by your specific catch route. After a lot
> of research, we saw that the Python (distutils) Makefile hides by
> default the library symbols, except the "init<Module>" function. It
> seems that this filtering also affect weak symbols with default values,
> and we believe that this avoided the try ... catch block to properly
> identify in run-time the good exception type id. The solution we found
> was to specify export_all=True in the Module Makefile.
> 
> However, we have also seen a problem with dynamic parameter allocation.
> In the example below, the /Out/ std::string buffer parameter is created
> by sip. However, inside of our /Default/ exception handler or even the
> catch (...) handler, the object is not deleted.
> 
> Do you have an idea of what could be happening?

Should be fixed in tonight's snapshot.

Phil


More information about the PyQt mailing list