[PyQt] core dump in pyqt application

Andreas Pakulat apaku at gmx.de
Sun Jul 6 10:01:39 BST 2008


On 06.07.08 13:16:09, Iván García wrote:
> One of my users just reported this bug:
>
> ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread f74470. Receiver 'MainWindow' (of type 'QMainWindow') was created in thread 9a7fc0", file kernel/qcoreapplication.cpp, line 269
> Cancelado (core dumped)
>
> How to avoid this problem? Is there a way to fix the problem within the  
> application code?

Yes, don't use sendEvent across threads, use postEvent. This is not 100%
clear in the documentation, except that sendEvent is explained to use
notify() directly. And obviously notify shouldn't be called from a
different thread.

Andreas

-- 
You may get an opportunity for advancement today.  Watch it!


More information about the PyQt mailing list