[PyKDE] Crashes with emit() in 3.2 (thread related?)

Phil Thompson phil at river-bank.demon.co.uk
Thu May 9 06:06:00 BST 2002


Andreas Gerstlauer wrote:
> 
> Hi!
> 
> I just installed the latest PyQt 3.2 together with Qt 3.0.4 and
> Python 2.2.1 under X11. However, my application doesn't work any more,
> I get hard crashes (segfaults).
> 
> I managed to isolate the problem and it seems
> that emitting a Qt signal (via SIGNAL(), i.e. not a PYSIGNAL)
> doesn't work any more. I created a little test program, see
> below. The output I get here is:
> 
> % python test.py
> Emitting signal...
> My Slot
> <qt.QListViewItem instance at 0x1b0be8>
> 0
> test
> Fatal Python error: PyThreadState_Get: no current thread
> Abort
> 
> In some other cases in my application I also get different
> error messages (or no message at all, just a segfault),
> all when trying to call emit(SIGNAL(...), (..)).

You are absolutely right - calls to emit are not properly protected as
far as threads are concerned. Unfortunately this is a code generation
bug, not particularly suitable for a patch.

> I don't know, I am not aware of doing anything wrong or
> unusual, esp. since it used to work with the previous PyQt
> version 3.1, patch 1. Looks like a bug to me...
> 
> Any ideas? For now I am converting everything to PYSIGNALS
> instead, I guess.

Looks like I'll bring v3.2.2 forward to this weekend.

Phil




More information about the PyQt mailing list