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

qmlcachegen occasionally generates an invalid cpp file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • 6.2
    • 6.3.2
    • QML: Compiler
    • None
    • MSVC 19.29.30148

    Description

      Our CI system occasionally fails compilation due to an invalid cpp file that was generated by qmlcachegen. By isolating the QML file and rerunning qmlcachegen hundreds of times on that file only, we were able to consistently reproduce the problem. It is possible that the system needs to be under heavier load to increase the occurrence rate.

      Scenario:

      • Use qmlcachegen to compile Example.qml (See attachment).
      • Compile the cpp file that is generated from qmlcachegen.

      Expected:
      Running qmlcachegen always generates the exact same cpp file that always compiles. (See "OK_Example_qml.cpp" in attachment)

      Actual:
      Running qmlcachegen has a very slim chance (<1%) of generating an invalid cpp file that does not compile. (See "BAD_Example_qml.cpp" in attachment)

      Attachments

        1. BAD_Example_qml.cpp
          9 kB
        2. Example.qml
          0.4 kB
        3. OK_Example_qml.cpp
          9 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
            petar.petrov Petar Petrov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes