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

QML sometimes silently fails to load

    XMLWordPrintable

Details

    • 5af5015b0c600bd49eecd0782193974ad9405107 (qt/qtdeclarative/5.15)

    Description

      Pretty vague title, but I'm not sure how else to describe this.

      I have an application where the window just suddenly and occasionally stopped showing up on startup. From what I can see, the following line is hit as a result of calling QQmlApplicationEngine::load():

      https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qml/qml/qqmlcomponent.cpp?h=5.14&id=4c5ed04e64ea9ac0038ae30e1189cfe745b29bd9#n712

      It appears that the loading just silently fails. I haven't been able to get any more useful information than that since there don't appear to be any logging categories for this stuff.

      I've attached a stripped-down copy of the application. I've verified that the problem is randomly encountered on both Windows and macOS. It may take a couple of runs (in a debug build) to see the problem. Debugging the application with Creator will not reproduce the problem, though I have been able to attach a debugger to the application with Creator and still reproduce it.

      Reducing the example further in certain ways (e.g. commenting out the cheats.js import in ProgressCaptureDialog.qml or removing the qtquickcontrols2.conf and hence the custom Qt Quick Controls 2 style) results in the problem disappearing, but since I don't see any flaws in the parts being removed, I don't believe the issue lies there.

      Attachments

        For Gerrit Dashboard: QTBUG-81678
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes