[PyQt] Segfault: QGraphicsView, cyclic references, and threads

Phil Thompson phil at riverbankcomputing.com
Mon Mar 28 22:58:40 BST 2011

On Mon, 28 Mar 2011 22:36:02 +0200, Erik Janssens
<Erik.Janssens at conceptive.be> wrote:
> I can confirm the issue in pyqt 4.8.3 / qt 4.7.2
> it segfaults, but with the following assert statement :
> .QObject::killTimers: timers cannot be stopped from another thread
> ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to
> objects owned by a different thread. Current thread b6b08490. Receiver
> 'qt_scrollarea_hcontainer' (of type 'QWidget') was created in thread
> 94eeee8", file kernel/qcoreapplication.cpp, line 349
> Phil,
> does this mean that a QGraphicsScene is only garbage collected
> when the QApplication has been garbage collected, thus creating
> a memory leak ?


It just means that any QGraphicsScene instances that haven't been garbage
collected are guaranteed to be destroyed before the QApplication.


More information about the PyQt mailing list