On Sat, Jun 13, 2009 at 8:06 PM, Phil Thompson <span dir="ltr">&lt;<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sat, 13 Jun 2009 19:46:07 +0200, Arve Knudsen &lt;<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>&gt;<br>
wrote:<br>
<div><div></div><div class="h5">&gt; Sorry to bother you again, Phil :) I think I may have stumbled onto<br>
another<br>
&gt; SIP bug, however, as I got a crash in a debug-built Python 2.6, due to a<br>
&gt; negative reference count for my extension module. According to the Python<br>
&gt; documentation, objects returned from Py_InitModule are borrowed, so one<br>
&gt; should increment their reference count. So I patched sip to do just that,<br>
&gt; and the problem went away.<br>
<br>
</div></div>You don&#39;t need to take a reference. However Py_DECREFs in the error<br>
handling code are all wrong (they should only be done for Python v3). Are<br>
any of the error paths being executed in your case?<em></em></blockquote></div><br><br>Oh, I see your point now, and that the DECREFs shouldn&#39;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.<br>
<br>Arve<br>