PDA

View Full Version : ASSERT(Failed assertion in Qt == Qt bug)



0xBulbizarre
20th March 2006, 18:49
This is a general question, as it's the 2nd time it happens to me. I've got a failed assertion in Qt 4.1.1:


ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 80651a8. Receiver '' (of type 'MyTestClass') was created in thread 80dee80", file kernel/qcoreapplication.cpp, line 291


does a failled assertion in Qt imply a Qt bug?

jacek
20th March 2006, 19:06
Not necessarily. If you use threads, make sure that you create all QObject instances* in run() and that the thread object isn't their parent. Also make sure you don't pass QObjects between threads without invoking QObject::moveToThread().

* Including instances of all classes derived from QObject, for example QSocket.