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

qmlcachegen crashes in QQmlJSScope::filePath

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • 6.9
    • 6.9
    • QML: Compiler
    • None

    Description

      Consider the following QML code

      import QtQuick
      import QtQuick.Controls
      
      Item {
          Item {
              ListView {
                  delegate: Item {
                      required property int index
                  }
              }
              ListView {
                  delegate: ItemDelegate {
                      required property int index
                  }
                  ScrollIndicator.vertical: ScrollIndicator {}
              }
          }
      }
      

      When compiling it qmlcachegen crashes with

      #0  0x00007ffff7c94684 in QArrayDataPointer<char16_t>::QArrayDataPointer (this=0x7fffffffa110, other=...)
      
          at /home/nico/workspace/qt6/qtbase/src/corelib/tools/qarraydatapointer.h:38
      
      #1  0x00007ffff7ce8838 in QString::QString (this=0x7fffffffa110, other=<optimized out>) at /home/nico/workspace/qt6/qtbase/src/corelib/text/qstring.h:1340
      
      #2  QQmlJSScope::filePath (this=<optimized out>) at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljsscope_p.h:254
      
      #3  operator() (__closure=__closure@entry=0x7fffffffa510, prevRequiredScope=..., propName=..., defScope=..., requiredScope=..., descendant=...)
      
          at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljsimportvisitor.cpp:1047
      
      #4  0x00007ffff7d03c3d in QQmlJSImportVisitor::checkRequiredProperties (this=this@entry=0x7fffffffacb0)
      
          at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljsimportvisitor.cpp:1107
      
      #5  0x00007ffff7d0421f in QQmlJSImportVisitor::endVisit (this=0x7fffffffacb0) at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljsimportvisitor.cpp:542
      
      #6  0x00007ffff7dc8350 in QQmlJS::AST::Node::accept (this=0x5555555b01c0, visitor=0x7fffffffacb0)
      
          at /home/nico/workspace/qt6/qtdeclarative/src/qml/parser/qqmljsast_p.h:272
      
      #7  QQmlJSTypeResolver::init (this=0x7fffffffc5b0, visitor=0x7fffffffacb0, program=0x5555555b01c0)
      
          at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:191
      
      #8  0x00007ffff7ca9896 in QQmlJSAotCompiler::setDocument (this=0x7fffffffc5a0, codegen=<optimized out>, irDocument=0x7fffffffbcc0)
      
          at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:643
      
      #9  0x00007ffff7ca4bfe in qCompileQmlFile
      
          (irDocument=..., inputFileName=..., saveFunction=..., aotCompiler=aotCompiler@entry=0x7fffffffc5a0, error=error@entry=0x7fffffffc340, storeSourceLocation=<optimized
       out>, interface=<optimized out>, fileContents=<optimized out>) at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:230
      
      #10 0x00007ffff7ca7224 in qCompileQmlFile
      
          (inputFileName=..., saveFunction=..., aotCompiler=aotCompiler@entry=0x7fffffffc5a0, error=error@entry=0x7fffffffc340, storeSourceLocation=storeSourceLocation@entry=
      true, interface=0x555555566008 <QV4::Compiler::defaultCodegenWarningInterface()::iface>, fileContents=0x0)
      
          at /home/nico/workspace/qt6/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:189
      
      #11 0x000055555555a12a in main (argc=<optimized out>, argv=<optimized out>) at /home/nico/workspace/qt6/qtdeclarative/tools/qmlcachegen/qmlcachegen.cpp:305
      

      Qt is built from 6.9 branch, qtdeclarative at 8e5b6753ad4b1b24d125800152dfa610ffa16251

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              nicolasfella Nicolas Fella
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes