Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0 Beta
-
None
-
Mac OS X 10.11, clang
-
5537027094d26e517fc4ad3173ea84d254dd3013
Description
When hitting some Qml breakpoint the debugged application suddenly ASSERTs with this message:
QQmlEngine: Illegal attempt to connect to QQuickAnchors(0x156b1efa0) that is in a different thread than the QML engine QQmlEngine(0x105f5cf10.
Backtrace:
1 __pthread_kill 0x7fff93f77002 2 pthread_kill 0x7fff99cf45c5 3 abort 0x7fff91eab6e7 4 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) qlogging.cpp 1610 0x1026dbb68 5 QMessageLogger::fatal(const char *, ...) const qlogging.cpp 784 0x1026dde8e 6 QQmlNotifierEndpoint::connect(QObject *, int, QQmlEngine *) qqmlnotifier.cpp 123 0x1055190e8 7 QQmlPropertyCapture::captureProperty(QObject *, int, int) qqmljavascriptexpression.cpp 283 0x10553ed2f 8 QV4::QObjectWrapper::getProperty(QV4::ExecutionEngine *, QObject *, QQmlPropertyData *, bool) qv4qobjectwrapper.cpp 369 0x10543f852 9 QV4::QObjectWrapper::getQmlProperty(QQmlContextData *, QV4::String *, QV4::QObjectWrapper::RevisionMode, bool *, bool) const qv4qobjectwrapper.cpp 318 0x10543f34e 10 QV4::QObjectWrapper::get(QV4::Managed const *, QV4::String *, bool *) qv4qobjectwrapper.cpp 681 0x105443531 11 QV4::Object::get(QV4::String *, bool *) const qv4object_p.h 298 0x1052cd2a1 12 QV4::QObjectWrapper::advanceIterator(QV4::Managed *, QV4::ObjectIterator *, QV4::Value *, unsigned int *, QV4::Property *, QV4::PropertyAttributes *) qv4qobjectwrapper.cpp 743 0x105443b1d 13 QV4::Object::advanceIterator(QV4::ObjectIterator *, QV4::Value *, unsigned int *, QV4::Property *, QV4::PropertyAttributes *) qv4object_p.h 318 0x1053f140c 14 QV4::ObjectIterator::next(QV4::Value *, unsigned int *, QV4::Property *, QV4::PropertyAttributes *) qv4objectiterator.cpp 100 0x1053f0a0d 15 collectProperty(QV4::ScopedValue const&, QV4::ExecutionEngine *, QJsonObject&) qv4datacollector.cpp 148 0x11341a8db 16 QV4DataCollector::collectAsJson(QString const&, QV4::ScopedValue const&) qv4datacollector.cpp 323 0x11341c058 17 QV4DataCollector::collectProperties(QV4::Object const *) qv4datacollector.cpp 305 0x11341b281 18 QV4DataCollector::lookupRef(unsigned int) qv4datacollector.cpp 180 0x11341ae66 19 (anonymous namespace)::V8EvaluateRequest::handleRequest() qv4debugservice.cpp 570 0x11340ec78 20 V8CommandHandler::handle(QJsonObject const&, QV4DebugServiceImpl *) qv4debugservice.cpp 89 0x11340f989 21 QV4DebugServiceImpl::handleV8Request(QByteArray const&) qv4debugservice.cpp 758 0x113408c63 22 QV4DebugServiceImpl::messageReceived(QByteArray const&) qv4debugservice.cpp 728 0x113408791 23 QQmlDebugServerImpl::receiveMessage() qqmldebugserver.cpp 482 0x1133acd57 24 QQmlDebugServerImpl::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) qqmldebugserver.moc 106 0x1133ae2cd 25 QMetaObject::activate(QObject *, int, int, void * *) qobject.cpp 3730 0x102a0f88b 26 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 3595 0x102a0eced 27 QPacketProtocol::readyRead() moc_qpacketprotocol.cpp 146 0x1133b9792 28 QPacketProtocol::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) moc_qpacketprotocol.cpp 77 0x1133b962a 29 QMetaObject::activate(QObject *, int, int, void * *) qobject.cpp 3730 0x102a0f88b 30 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 3595 0x102a0eced 31 QPacketProtocolPrivate::readyRead() qpacketprotocol.moc 162 0x1133b6de2 32 QPacketProtocolPrivate::readyToRead() qpacketprotocol.cpp 196 0x1133b771a 33 QPacketProtocolPrivate::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) qpacketprotocol.moc 96 0x1133b6c7c 34 QMetaObject::activate(QObject *, int, int, void * *) qobject.cpp 3730 0x102a0f88b 35 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 3595 0x102a0eced 36 QIODevice::readyRead() moc_qiodevice.cpp 156 0x102af54b2 37 QAbstractSocketPrivate::canReadNotification() qabstractsocket.cpp 736 0x10432df9e 38 QAbstractSocketPrivate::readNotification() qabstractsocket_p.h 69 0x104334875 39 non-virtual thunk to QAbstractSocketPrivate::readNotification() qabstractsocket_p.h 69 0x10433492c 40 QAbstractSocketEngine::readNotification() qabstractsocketengine.cpp 152 0x10431e0cb 41 QReadNotifier::event(QEvent *) qnativesocketengine.cpp 1195 0x10433f55c 42 QApplicationPrivate::notify_helper(QObject *, QEvent *) qapplication.cpp 3712 0x10334041e 43 QApplication::notify(QObject *, QEvent *) qapplication.cpp 3155 0x1033422d9 44 QCoreApplication::notifyInternal2(QObject *, QEvent *) qcoreapplication.cpp 1013 0x1029be5d8 45 QCoreApplication::sendEvent(QObject *, QEvent *) qcoreapplication.h 227 0x1029c346c 46 QEventDispatcherUNIX::activateSocketNotifiers() qeventdispatcher_unix.cpp 565 0x102a56a8f 47 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec *) qeventdispatcher_unix.cpp 264 0x102a564b5 48 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventdispatcher_unix.cpp 607 0x102a57b94 49 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp 128 0x1029b954a 50 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp 204 0x1029b9766 51 QThread::exec() qthread.cpp 503 0x1026f5fe5 52 QQmlDebugServerThread::run() qqmldebugserver.cpp 242 0x1133ab426 53 QThreadPrivate::start(void *) qthread_unix.cpp 340 0x1027000b1 54 _pthread_body 0x7fff99cf2c13 55 _pthread_start 0x7fff99cf2b90 56 thread_start 0x7fff99cf0375
To find the creator of that anchor I've added an ASSERT like this:
QQuickAnchors::QQuickAnchors(QQuickItem *item, QObject *parent) : QObject(*new QQuickAnchorsPrivate(item), parent) { const bool isGuiThread = QThread::currentThread() == QCoreApplication::instance()->thread(); Q_ASSERT(isGuiThread); }
It seems like the Qml Debugger itself creates that anchor indirectly by querying it. Backtrace:
1 __pthread_kill 0x7fff93f77002 2 pthread_kill 0x7fff99cf45c5 3 __abort 0x7fff91eab787 4 abort 0x7fff91eab6f6 5 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) qlogging.cpp 1610 0x1026dbb68 6 QMessageLogger::fatal(const char *, ...) const qlogging.cpp 784 0x1026dde8e 7 qt_assert(const char *, const char *, int) qglobal.cpp 3044 0x1026d3e72 8 QQuickAnchors::QQuickAnchors(QQuickItem *, QObject *) qquickanchors.cpp 147 0x1047ed5f5 9 QQuickAnchors::QQuickAnchors(QQuickItem *, QObject *) qquickanchors.cpp 143 0x1047ed625 10 QQuickItemPrivate::anchors() const qquickitem.cpp 3542 0x10480038f 11 QQuickItem::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) moc_qquickitem.cpp 843 0x10480c28d 12 QQuickItem::qt_metacall(QMetaObject::Call, int, void * *) moc_qquickitem.cpp 951 0x10480d028 13 QQuickFocusScope::qt_metacall(QMetaObject::Call, int, void * *) moc_qquickfocusscope_p.cpp 84 0x104a00624 14 ReadAccessor::Direct(QObject *, QQmlPropertyData const&, void *, QQmlNotifier * *) qv4qobjectwrapper.cpp 129 0x10544c67d 15 unsigned long long LoadProperty<&(ReadAccessor::Direct(QObject *, QQmlPropertyData const&, void *, QQmlNotifier * *))>(QV4::ExecutionEngine *, QObject *, QQmlPropertyData const&, QQmlNotifier * *) qv4qobjectwrapper.cpp 154 0x105440497 16 QV4::QObjectWrapper::getProperty(QV4::ExecutionEngine *, QObject *, QQmlPropertyData *, bool) qv4qobjectwrapper.cpp 376 0x10543f8f3 17 QV4::QObjectWrapper::getQmlProperty(QQmlContextData *, QV4::String *, QV4::QObjectWrapper::RevisionMode, bool *, bool) const qv4qobjectwrapper.cpp 318 0x10543f34e 18 QV4::QObjectWrapper::get(QV4::Managed const *, QV4::String *, bool *) qv4qobjectwrapper.cpp 681 0x105443531 19 QV4::Object::get(QV4::String *, bool *) const qv4object_p.h 298 0x1052cd2a1 20 QV4::QObjectWrapper::advanceIterator(QV4::Managed *, QV4::ObjectIterator *, QV4::Value *, unsigned int *, QV4::Property *, QV4::PropertyAttributes *) qv4qobjectwrapper.cpp 743 0x105443b1d 21 QV4::Object::advanceIterator(QV4::ObjectIterator *, QV4::Value *, unsigned int *, QV4::Property *, QV4::PropertyAttributes *) qv4object_p.h 318 0x1053f140c 22 QV4::ObjectIterator::next(QV4::Value *, unsigned int *, QV4::Property *, QV4::PropertyAttributes *) qv4objectiterator.cpp 100 0x1053f0a0d 23 collectProperty(QV4::ScopedValue const&, QV4::ExecutionEngine *, QJsonObject&) qv4datacollector.cpp 148 0x112e318db 24 QV4DataCollector::lookupRef(unsigned int) qv4datacollector.cpp 179 0x112e31e2d 25 (anonymous namespace)::V8EvaluateRequest::handleRequest() qv4debugservice.cpp 570 0x112e25c78 26 V8CommandHandler::handle(QJsonObject const&, QV4DebugServiceImpl *) qv4debugservice.cpp 89 0x112e26989 27 QV4DebugServiceImpl::handleV8Request(QByteArray const&) qv4debugservice.cpp 758 0x112e1fc63 28 QV4DebugServiceImpl::messageReceived(QByteArray const&) qv4debugservice.cpp 728 0x112e1f791 29 QQmlDebugServerImpl::receiveMessage() qqmldebugserver.cpp 482 0x112ca0d57 30 QQmlDebugServerImpl::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) qqmldebugserver.moc 106 0x112ca22cd 31 QMetaObject::activate(QObject *, int, int, void * *) qobject.cpp 3730 0x102a0f88b 32 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 3595 0x102a0eced 33 QPacketProtocol::readyRead() moc_qpacketprotocol.cpp 146 0x112cad792 34 QPacketProtocol::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) moc_qpacketprotocol.cpp 77 0x112cad62a 35 QMetaObject::activate(QObject *, int, int, void * *) qobject.cpp 3730 0x102a0f88b 36 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 3595 0x102a0eced 37 QPacketProtocolPrivate::readyRead() qpacketprotocol.moc 162 0x112caade2 38 QPacketProtocolPrivate::readyToRead() qpacketprotocol.cpp 196 0x112cab71a 39 QPacketProtocolPrivate::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) qpacketprotocol.moc 96 0x112caac7c 40 QMetaObject::activate(QObject *, int, int, void * *) qobject.cpp 3730 0x102a0f88b 41 QMetaObject::activate(QObject *, QMetaObject const *, int, void * *) qobject.cpp 3595 0x102a0eced 42 QIODevice::readyRead() moc_qiodevice.cpp 156 0x102af54b2 43 QAbstractSocketPrivate::canReadNotification() qabstractsocket.cpp 736 0x10432df9e 44 QAbstractSocketPrivate::readNotification() qabstractsocket_p.h 69 0x104334875 45 non-virtual thunk to QAbstractSocketPrivate::readNotification() qabstractsocket_p.h 69 0x10433492c 46 QAbstractSocketEngine::readNotification() qabstractsocketengine.cpp 152 0x10431e0cb 47 QReadNotifier::event(QEvent *) qnativesocketengine.cpp 1195 0x10433f55c 48 QApplicationPrivate::notify_helper(QObject *, QEvent *) qapplication.cpp 3712 0x10334041e 49 QApplication::notify(QObject *, QEvent *) qapplication.cpp 3155 0x1033422d9 50 QCoreApplication::notifyInternal2(QObject *, QEvent *) qcoreapplication.cpp 1013 0x1029be5d8 51 QCoreApplication::sendEvent(QObject *, QEvent *) qcoreapplication.h 227 0x1029c346c 52 QEventDispatcherUNIX::activateSocketNotifiers() qeventdispatcher_unix.cpp 565 0x102a56a8f 53 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec *) qeventdispatcher_unix.cpp 264 0x102a564b5 54 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventdispatcher_unix.cpp 607 0x102a57b94 55 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp 128 0x1029b954a 56 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) qeventloop.cpp 204 0x1029b9766 57 QThread::exec() qthread.cpp 503 0x1026f5fe5 58 QQmlDebugServerThread::run() qqmldebugserver.cpp 242 0x112c9f426 59 QThreadPrivate::start(void *) qthread_unix.cpp 340 0x1027000b1 60 _pthread_body 0x7fff99cf2c13 61 _pthread_start 0x7fff99cf2b90 62 thread_start 0x7fff99cf0375
Attachments
Issue Links
- is duplicated by
-
QTBUG-50585 assert when placing a breakpoint at TextField.inputMethodHints
- Closed