Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.1
-
None
Description
In some cases when loading a QML Image with a remote source, the QNetworkAccessManager tries to create an object across threads, leading to a runtime warning, and a failed assert when the application closes. (Note: The resource still loads, and the application looks fine)
This is easily tested by referencing images using trolltech.com (bad) and qt.nokia.com(fine). Might be related to the cname redirection. (trolltech.com and qt.nokia.com resolve to the same IP address).
Probably a bug in QNAM, compounded by the async loading in the pixmap cache.
Probably related to QTBUG-7515 and/or QTBUG-8232
Command line output:
> qml cname_error.qml
created new network access manager for QObject(0x819cae0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QNetworkAccessManager(0x819d968), parent's thread is QDeclarativePixmapReader(0x819a768), current thread is QThread(0x80a6df0)
QSocketNotifier: socket notifiers cannot be disabled from another thread
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 819a768. Receiver '' (of type 'QNativeSocketEngine') was created in thread 80a6df0", file src/corelib/kernel/qcoreapplication.cpp, line 349