Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141537

Crash on qml/javascript QVariantMap access

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • 6.10.1
    • 6.9.3, 6.10.0
    • QML: Compiler
    • None
    • f5e34266ea15c6e44e9816f01f4e627d5f038f0c

      The following example crashes the application when the qml compiler is used.

      The "workaround" actually disables c++ compilation (reason: "Cannot generate efficient code for StoreElement with non-list base type or non-numeric arguments", whatever that means).

      import QtQuick
      
      Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
      
        Component.onCompleted: {
          let bar = {};
      
          // => crash in generated c++ code
          bar["foo"] = 42;
      
          // => "workaround"
          // const key = "foo";
          // bar[key] = 42;
        }
      }
      

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

            qtqmlteam Qt Qml Team User
            njeisecke_qtc Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes