[PyKDE] Help with SIP

Phil Thompson phil at riverbankcomputing.co.uk
Thu Dec 23 07:53:37 GMT 2004


On Thursday 23 December 2004 1:18 am, Claus, Richard wrote:
> I've built a package using C++ and SIP 4.1.1 (on both Windows XP and Linux)
> that can be imported and used from Python 2.3.4.  In a single threaded
> environment, without PyQt, it works as expected.  In a multi-threaded
> environment with PyQt, I observe the following: 1) When the package is
> built using SIP without the -g option, the program hangs at the point of
> calling the first virtual method resolved by a Python method.  The PyQt GUI
> is no longer updated or redrawn and the program must be killed. 2) When the
> package is built using SIP with -g option, the program appears to run
> correctly, but sooner or later a bomb box (on XP) appears with the Python
> message "this thread state must be current when releasing".
>
> Can someone please offer some suggestions on how to debug this?

Is there any handwritten code in your module? Does the package use threads 
itself? What do you mean by a multi-threaded environment - compiled against 
qt-mt rather that qt, or in an application that starts multiple threads?

Phil




More information about the PyQt mailing list