Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-19352

Typing 'delegate' into a 'ListView' item causes immediate crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • Qt Creator 4.5.0
    • Qt Creator 4.4.1
    • Quick / QML Support
    • None
    • KUbuntu 16.04, x86_64 architecture.

    Description

      When attempting to add a delegate property by typing "delegate:" into a 'ListView' in the designer view code editor, the application crashes immediately. This crash is effective when the QML is coded in the following way:

      import QtQuick 2.6
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          width: 640
          height: 480
      
          MouseArea {
              anchors.fill: parent
      
              Row {
                  id: naturalKeyLayout
                  spacing: 2
                  //Natural keys
                  Repeater {
                      model: 12
                      Rectangle { width: 40; height: 200; border.width: 1; color: "#fff"; }
                  }
              }
              Flow {
                  id: sharpKeyLayout
                  spacing: 15
                  anchors.fill: parent
                  anchors.leftMargin: 32
                  ListView {
                      model: [1,1,0]
                      Rectangle {
                          anchors.rightMargin: -15;
                          anchors.leftMargin: -15;
                          width: 20; height: 125;
                          color: "#000"
                          border.width: 1;
                      }
                  }
              }
      
          }
      }
      

      The output from the GNU Debugger program at the time of the crash is the following:

      Exception: "InvalidModelNodeException"
      Function:  "metaInfo"
      File:      "/work/build/qt-creator/src/plugins/qmldesigner/designercore/model/modelnode.cpp"
      Line:      833
      "file: /work/build/qt-creator/src/plugins/qmldesigner/designercore/model/modelnode.cpp, function: metaInfo, line: 833""/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner9ExceptionC2EiRK10QByteArrayS3_+0xc8) [0x7fffdc1b0698]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner25InvalidModelNodeExceptionC1EiRK10QByteArrayS3_+0xe) [0x7fffdc1b13ae]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZNK11QmlDesigner9ModelNode8metaInfoEv+0x102) [0x7fffdc1a01a2]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZNK11QmlDesigner9ModelNode11isComponentEv+0x17a) [0x7fffdc1a464a]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1f07d8) [0x7fffdc2257d8]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner14AbstractAction13updateContextEv+0x3c) [0x7fffdc2251bc]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1efc69) [0x7fffdc224c69]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x15adfd) [0x7fffdc18fdfd]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1625ae) [0x7fffdc1975ae]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner12NodeProperty12setModelNodeERKNS_9ModelNodeE+0x2d3) [0x7fffdc1c1e63]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19c05d) [0x7fffdc1d105d]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19b75f) [0x7fffdc1d075f]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19a78f) [0x7fffdc1cf78f]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19b911) [0x7fffdc1d0911]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19a6f9) [0x7fffdc1cf6f9]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19b911) [0x7fffdc1d0911]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19a6f9) [0x7fffdc1cf6f9]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19b911) [0x7fffdc1d0911]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19a6f9) [0x7fffdc1cf6f9]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x19d7c8) [0x7fffdc1d27c8]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner12RewriterView12amendQmlTextEv+0x4e) [0x7fffdc164a7e]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x986) [0x7ffff5ba2b96]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN6QTimer7timeoutENS_14QPrivateSignalE+0x27) [0x7ffff5baf057]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN6QTimer10timerEventEP11QTimerEvent+0x28) [0x7ffff5baf328]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN7QObject5eventEP6QEvent+0x7b) [0x7ffff5ba377b]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9c) [0x7ffff6ed45ec]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x227) [0x7ffff6edba17]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x108) [0x7ffff5b782b8]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN14QTimerInfoList14activateTimersEv+0x46e) [0x7ffff5bca08e]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(+0x2cb8a9) [0x7ffff5bca8a9]\n/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7ffff1620197]\n/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a3f0) [0x7ffff16203f0]\n/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7ffff162049c]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f) [0x7ffff5bcabaf]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xea) [0x7ffff5b768aa]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x84) [0x7ffff5b7f134]\n/home/ben/Qt/Tools/QtCreator/bin/qtcreator() [0x409aa7]\n/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ffff4755830]\n/home/ben/Qt/Tools/QtCreator/bin/qtcreator() [0x40a401]\n"
      *** An exception occurred while reading the QML file: "Internal error \"/work/build/qt-creator/src/plugins/qmldesigner/designercore/model/modelnode.cpp\" line 833file: /work/build/qt-creator/src/plugins/qmldesigner/designercore/model/modelnode.cpp, function: metaInfo, line: 833"
      Exception: "InvalidModelNodeException"
      Function:  "metaInfo"
      File:      "/work/build/qt-creator/src/plugins/qmldesigner/designercore/model/modelnode.cpp"
      Line:      833
      "file: /work/build/qt-creator/src/plugins/qmldesigner/designercore/model/modelnode.cpp, function: metaInfo, line: 833""/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner9ExceptionC2EiRK10QByteArrayS3_+0xc8) [0x7fffdc1b0698]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner25InvalidModelNodeExceptionC1EiRK10QByteArrayS3_+0xe) [0x7fffdc1b13ae]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZNK11QmlDesigner9ModelNode8metaInfoEv+0x102) [0x7fffdc1a01a2]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZNK11QmlDesigner9ModelNode11isComponentEv+0x17a) [0x7fffdc1a464a]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1f07d8) [0x7fffdc2257d8]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner14AbstractAction13updateContextEv+0x3c) [0x7fffdc2251bc]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x1efc69) [0x7fffdc224c69]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0x16035e) [0x7fffdc19535e]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(_ZN11QmlDesigner16NodeInstanceView13valuesChangedERKNS_20ValuesChangedCommandE+0x33e) [0x7fffdc12045e]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0xd8bd8) [0x7fffdc10dbd8]\n/home/ben/Qt/Tools/QtCreator/lib/qtcreator/plugins/libQmlDesigner.so(+0xd9d92) [0x7fffdc10ed92]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x986) [0x7ffff5ba2b96]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x659) [0x7ffff5ba2869]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Network.so.5(+0xe5413) [0x7ffff611f413]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Network.so.5(+0xe54cc) [0x7ffff611f4cc]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Network.so.5(+0xf51a1) [0x7ffff612f1a1]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9c) [0x7ffff6ed45ec]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x227) [0x7ffff6edba17]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x108) [0x7ffff5b782b8]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(+0x2cc7dd) [0x7ffff5bcb7dd]\n/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7ffff1620197]\n/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a3f0) [0x7ffff16203f0]\n/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7ffff162049c]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f) [0x7ffff5bcabaf]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xea) [0x7ffff5b768aa]\n/home/ben/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x84) [0x7ffff5b7f134]\n/home/ben/Qt/Tools/QtCreator/bin/qtcreator() [0x409aa7]\n/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ffff4755830]\n/home/ben/Qt/Tools/QtCreator/bin/qtcreator() [0x40a401]\n"
      terminate called after throwing an instance of 'QmlDesigner::InvalidModelNodeException'
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thohartm Thomas Hartmann
            ben.cottrell Ben Cottrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes