Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to trace QML where error occurs



  • I have several messages in the Debugger Console:

    QQmlEngine: Illegal attempt to connect to ListModel(0x78c66a0) that is in a different thread than the QML engine QQmlEngine(0x39e1428.    qml\qqmlnotifier.cpp    135
    ASSERT: "engine->jsStackTop >= mark" in file c:\users\qt\work\qt\qtdeclarative\src\qml\jsruntime\qv4scopedvalue_p.h, line 90   global\qglobal.cpp   3070
    ASSERT: "f" in file qml\qqmlbinding.cpp, line 187   global\qglobal.cpp   3070
    

    I'm trying to identify where in the QML these messages originate from, I've searched the Application for ListModel and there are a lot of usages, is there any way I can narrow it down?

    This application was developed a long time ago for Qt4.8 and I have the task of making it work with Qt5.8, the version to be used is not my choice.



  • @SPlatten
    I would start the project with Debug-Version Qt Dlls, search in Qt source code where "Illegal attempt to connect to ListModel" occurs, set a breakpoint and see how and when it is hit.



  • @Asperamanca I don't have the debug symbols so all I get is assembler.


  • Lifetime Qt Champion

    @SPlatten You can install debug symbols...



  • Yes, it's just another package in the online installer. Or if you compile Qt yourself, there is probably an option to build them, too.

    In general, I can highly recommend debugging into Qt code in order to understand how things work.



  • @Asperamanca , I've installed the debug symbols on my development system, although it appears or I'm told that not everything is debuggable, for example I want to drill down into the QTcpSocket write function, I can't.


  • Moderators

    @SPlatten I posted this earlier this month, but no harm in posting it again.

    Make sure you "link map" against the QtSources in QtCreator

    4ba4e870-38a3-45b4-bdfb-684b7295ff2a-image.png


Log in to reply