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

Unused JS conditional var in unused function crashes QQmlEngine

    XMLWordPrintable

Details

    • c4ebe96c34c2179d0ebdc555afdce179e3de52e8 (qtdeclarative)

    Description

      Reproduced on a variety of platforms:

      import QtQuick 2.7
      import QtQuick.Window 2.2
      
      Window {
        id: main
        visible: true
        width: 500
        height: 300
      
        function foo() {
          var c = main.width > 1 ? 27 : -147
        }
      }
      

      The conditional has to be used and the var has to be unused, otherwise it doesn't crash. The function doesn't need to be executed, it crashes during QQmlEngine.load()

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              dgo dgo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes