QtCreator crashing when a particular file is saved



  • I have a fairly big QtQuick project, and I'm trying to work on in with QtCreator (Qt Creator 4.4.1 based on Qt 5.9.2, on Ubuntu 16.04)
    On saving one of the files in the project (or sometimes just editing it...) QtCreator crashes completely, and this is fairly consistent.
    Running from the command line, I get to see an error dumped to the console as it crashes: here it is in all it's unfathomable glory:

    Exception: "InvalidModelNodeException"
    Function:  "selectedNodes"
    File:      "/work/build/qt-creator/src/plugins/qmldesigner/designercore/model/model.cpp"
    Line:      1452
    "file: /work/build/qt-creator/src/plugins/qmldesigner/designercore/model/model.cpp, function: selectedNodes, line: 1452"
    "
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugin/libQmlDesigner.so(_ZN11QmlDesigner9ExceptionC2EiRK10QByteArrayS3_+0xc8) [0x7f613f9c0698]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner25InvalidModelNodeExceptionC1EiRK10QByteArrayS3_+0xe) [0x7f613f9c13ae]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x16089b) [0x7f613f9a589b]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZNK11QmlDesigner12AbstractView26hasSingleSelectedModelNodeEv+0x17) [0x7f613f971827]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x2bddc4) [0x7f613fb02dc4]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner14AbstractAction13updateContextEv+0x3c) [0x7f613fa351bc]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1efc69) [0x7f613fa34c69]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x15ea58) [0x7f613f9a3a58]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x165c34) [0x7f613f9aac34]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner15VariantProperty26setDynamicTypeNameAndValueERK10QByteArrayRK8QVariant+0x26d) [0x7f613f9c417d]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1911fe) [0x7f613f9d61fe]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1940f3) [0x7f613f9d90f3]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19ad48) [0x7f613f9dfd48]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19d7c8) [0x7f613f9e27c8]
    /home/pete/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner12RewriterView12amendQmlTextEv+0x4e) [0x7f613f974a7e]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x986) [0x7f615dbbbb96]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN6QTimer7timeoutENS_14QPrivateSignalE+0x27) [0x7f615dbc8057]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN6QTimer10timerEventEP11QTimerEvent+0x28) [0x7f615dbc8328]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN7QObject5eventEP6QEvent+0x7b) [0x7f615dbbc77b]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9c) [0x7f615eeed5ec]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x227) [0x7f615eef4a17]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x108) [0x7f615db912b8]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN14QTimerInfoList14activateTimersEv+0x46e) [0x7f615dbe308e]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(+0x2cb8a9) [0x7f615dbe38a9]
    /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7f6159709197]
    /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a3f0) [0x7f61597093f0]
    /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f615970949c]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f) [0x7f615dbe3baf]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xea) [0x7f615db8f8aa]
    /home/pete/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x84) [0x7f615db98134]
    /home/pete/Qt/Tools/QtCreator/bin/qtcreator() [0x409aa7]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f615c83e830]
    /home/pete/Qt/Tools/QtCreator/bin/qtcreator() [0x40a401]
    "
    terminate called after throwing an instance of 'QmlDesigner::InvalidModelNodeException*'
    Aborted
    

    The file in question is pretty small - it's meant to be displaying dynamic components with a title bar and a Flickable holding a ColumnLayout to which the dynamic stuff will be added

    import QtQuick 2.7
    import QtQuick.Layouts 1.3
    import QtQuick.Controls 2.2
    
    ColumnLayout {
        property variant data
        property alias clData: clData
        Text {
            text: qsTr("Public Data")
            anchors.fill: parent
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignHCenter
            font.pixelSize: 32
            font.bold: true
        }
    
        Flickable {
            id: flickable
            Layout.fillHeight: true
            Layout.fillWidth: true
            clip: true
            contentHeight: clData.height
            ColumnLayout {
                id: clData
                property int leftWidth: parent.width * 0.25
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.top: parent.top
                anchors.topMargin: 0
                StartupPublicDataRow {
                    title: qsTr("Project Start")
                    value: "today"
                    lhsplit: 25
                    anchors.fill: parent
                }
            }
        }
    }
    

    and the referenced StartupPublicDataRow.qml is like this:

    import QtQuick 2.7
    import QtQuick.Layouts 1.3
    
    RowLayout {
        property string title: 'Title'
        property string value: 'Value'
        property double lhsplit: 25
        Layout.fillWidth: true
        Text {
            text: title
            font.bold: true
            font.pointSize: 10
            wrapMode: Text.WordWrap
            Layout.maximumWidth: parent.width * lhsplit / 100
        }
        Text {
            text: value
            Layout.fillWidth: true
            font.pointSize: 10
            wrapMode: Text.WordWrap
        }
    }
    

  • Qt Champions 2017

    @peteispo: Please file a bug report on bugreports.qt.io

    Even if you had done something wrong, QtCreator should not crash.



  • @aha_1980 I thought so too, but I wanted to check that it wasn't an obvious mistake...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.