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

QML Engine does not run AOT code or bytecode created by qmlcachegen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • 6.11
    • 6.7.2
    • QML: Compiler
    • None
    • Linux, NixOS unstable (commit d0e1602ddde669d5beb01aec49d71a51937ed7be)

    Description

      The QML engine will not run AOT compiled code or bytecode generated by qmlcachegen.

       

      My steps:

      1. compile the attached test
      2. edit <builddir>/.rcc/qmlcache/cachegen_test_qmlcache_loader.cpp
        1. add 'qCritical() << ":: REGISTRY INIT";' on the first line of "Registry"'s constructor.
        2. Add 'qCritical() << ":: lookupCachedUnit" << url;' on the opening line of 'Registry::lookupCachedUnit'
      3. edit <builddir>/.rcc/qmlcache/cachegen_test_test_qml.cpp
        1. Add 'qCritical() << ":: AOT EXPRESSION EVALUATED";' following the comment that starts with '// expression for onCompleted'
      4. recompile the test, ensuring the edited files are rebuilt

      You will see the following:

      > ./build/cachegen_test
      :: REGISTRY INIT
      qml: Component.onComplete called

      The only thing happening with the generated cache is initialization of its registry. It is never used to load a compilation unit, and the AOT compilation does not run.

      Logs with QML_IMPORT_TRACE=1 and QT_LOGGING_RULES="qt*=true" are attached.

      Attachments

        1. full_log.txt
          116 kB
        2. qml_import_trace.txt
          4 kB
        3. test.zip
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            outfoxxed outfoxxed -
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes