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

qmlcachegen asserts in QQmlJSRegisterContentPool::adjustType

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.10, 6.11.0 FF
    • 6.9.2, 6.10.0 Beta4
    • QML: Compiler
    • None
    • e467e5c6a (6.10), 044d3d2cd (dev)

      When compiling the following code

       

      import QtQuick
      
      Item {
          id: mainRow
          
          function foo(column) : void {    }
          
          Item {
              id: sideBar
              Keys.onPressed: event => {
                  let forwardArrowKey = (event.key === Qt.Key_Right && !mainRow.LayoutMirroring.enabled)
                  if (2 > 1) {
                      mainRow.foo(runnerColumns.visibleChildren.length)
                  }
                  if (forwardArrowKey) {
                      runnerColumns.visibleChildren
                  }
              }
          }
          Item {
              id: runnerColumns
          }
      } 

       

      Crashes with 

      #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
      
      #1  0x00007ffff389de53 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
      
      #2  0x00007ffff38427b6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      
      #3  0x00007ffff382934b in __GI_abort () at abort.c:73
      
      #4  0x00007ffff41bcef5 in qAbort () at /home/nico/workspace/qt6-dev/qtbase/src/corelib/global/qassert.cpp:46
      
      #5  0x00007ffff4217c3a in qt_maybe_message_fatal<QString&> (msgType=msgType@entry=QtFatalMsg, context=..., message=...) at /home/nico/workspace/qt6-dev/qtbase/src/corelib/global/qlogging.cpp:2168
      
      #6  0x00007ffff4217da5 in qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *)
      
          (msgType=msgType@entry=QtFatalMsg, context=..., msg=msg@entry=0x7ffff4d90000 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7bfff022cc20) at /home/nico/workspace/qt6-dev/qtbase/src/corelib/global/qlogging.cpp:412
      
      #7  0x00007ffff4228b7a in QMessageLogger::fatal (this=this@entry=0x7bfff003db20, msg=msg@entry=0x7ffff4d90000 "ASSERT: \"%s\" in file %s, line %d") at /home/nico/workspace/qt6-dev/qtbase/src/corelib/global/qlogging.cpp:901
      
      #8  0x00007ffff41bd05b in qt_assert (assertion=assertion@entry=0x7ffff766b040 "d->m_original.isNull()", file=file@entry=0x7ffff7669b60 "/home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljsregistercontent.cpp", line=line@entry=664)
      
          at /home/nico/workspace/qt6-dev/qtbase/src/corelib/global/qassert.cpp:117
      
      #9  0x00007ffff746daa9 in QQmlJSRegisterContentPool::adjustType (this=<optimized out>, content=..., adjusted=...) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljsregistercontent.cpp:664
      
      #10 0x00007ffff7571b0e in QQmlJSTypeResolver::adjustTrackedType (this=0x7bfff0702cf0, tracked=..., conversion=...) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:561
      
      #11 0x00007ffff74468b5 in QQmlJSOptimizations::adjustTypes (this=this@entry=0x7bfff0534660) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljsoptimizations.cpp:488
      
      #12 0x00007ffff7447913 in QQmlJSOptimizations::run (this=this@entry=0x7bfff0534660, function=function@entry=0x7bfff039bee0) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljsoptimizations.cpp:20
      
      #13 0x00007ffff71d2b96 in QQmlJSAotCompiler::doCompile (this=this@entry=0x7bfff0702ce0, context=<optimized out>, function=function@entry=0x7bfff039bee0) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:777
      
      #14 0x00007ffff71d3ce7 in QQmlJSAotCompiler::doCompileAndRecordAotStats (this=this@entry=0x7bfff0702ce0, context=context@entry=0x7d3ff13e8040, function=function@entry=0x7bfff039bee0, name=..., location=...)
      
          at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:808
      
      #15 0x00007ffff71d4e89 in QQmlJSAotCompiler::compileBinding (this=0x7bfff0702ce0, context=<optimized out>, irBinding=<optimized out>, astNode=<optimized out>) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:683
      
      #16 0x00007ffff71d72eb in operator() (__closure=__closure@entry=0x7bfff01e5170, bindingOrFunction=...) at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:307
      
      #17 0x00007ffff71d9dfb in std::for_each<__gnu_cxx::__normal_iterator<BindingOrFunction*, std::vector<BindingOrFunction> >, qCompileQmlFile(QmlIR::Document&, const QString&, const QQmlJSSaveFunction&, QQmlJSAotCompiler*, QQmlJSCompileError*, bool, QV4::Compiler::CodegenW
      arningInterface*, const QString*)::<lambda(const BindingOrFunction&)> >(__gnu_cxx::__normal_iterator<BindingOrFunction*, std::vector<BindingOrFunction, std::allocator<BindingOrFunction> > >, __gnu_cxx::__normal_iterator<BindingOrFunction*, std::vector<BindingOrFunction,
       std::allocator<BindingOrFunction> > >, struct {...}) (__first=Python Exception <class 'gdb.error'>: value has been optimized out
      
      , __last=Python Exception <class 'gdb.error'>: value has been optimized out
      
      , __f=...) at /usr/include/c++/15/bits/stl_algo.h:3798
      
      #18 0x00007ffff71dc8d4 in qCompileQmlFile
      
          (irDocument=..., inputFileName=..., saveFunction=..., aotCompiler=aotCompiler@entry=0x7bfff0702ce0, error=error@entry=0x7bfff0702290, storeSourceLocation=storeSourceLocation@entry=true, wInterface=<optimized out>, fileContents=<optimized out>)
      
          at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:263
      
      #19 0x00007ffff71dd34e in qCompileQmlFile (inputFileName=..., saveFunction=..., aotCompiler=aotCompiler@entry=0x7bfff0702ce0, error=error@entry=0x7bfff0702290, storeSourceLocation=storeSourceLocation@entry=true, wInterface=<optimized out>, fileContents=<optimized out>)
      
          at /home/nico/workspace/qt6-dev/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:179
      
      #20 0x000055555556472d in main (argc=<optimized out>, argv=<optimized out>) at /home/nico/workspace/qt6-dev/qtdeclarative/tools/qmlcachegen/qmlcachegen.cpp:305
      

       

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

            ulherman Ulf Hermann
            nicolasfella Nicolas Fella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes