[PyQt] Possible SIP bug

Arve Knudsen arve.knudsen at gmail.com
Sat Jun 13 19:33:58 BST 2009

On Sat, Jun 13, 2009 at 8:06 PM, Phil Thompson
<phil at riverbankcomputing.com>wrote:

> On Sat, 13 Jun 2009 19:46:07 +0200, Arve Knudsen <arve.knudsen at gmail.com>
> wrote:
> > Sorry to bother you again, Phil :) I think I may have stumbled onto
> another
> > SIP bug, however, as I got a crash in a debug-built Python 2.6, due to a
> > negative reference count for my extension module. According to the Python
> > documentation, objects returned from Py_InitModule are borrowed, so one
> > should increment their reference count. So I patched sip to do just that,
> > and the problem went away.
> You don't need to take a reference. However Py_DECREFs in the error
> handling code are all wrong (they should only be done for Python v3). Are
> any of the error paths being executed in your case?**

Oh, I see your point now, and that the DECREFs shouldn't be there :) I am no
longer able to reproduce the problem however :/ Anyway, if you remove those
DECREFs there should be one less source of errors at least.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090613/16d4dd2c/attachment.html

More information about the PyQt mailing list