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

Regression [5.9.1 -> 5.9.2] QQmlApplicationEngine.load() fails silently

    XMLWordPrintable

Details

    Description

      Upgraded my build environment from 5.9.1 -> 5.9.2, and now the application does not start any more. The application is the open source project Subsurface Divelog (https://github.com/Subsurface-divelog/). This is a mix of C, C++, Qt and for the mobile version a QML based UI.

      The mobile version (that can be build and run on desktop as well) does load a main.qml file in its very early stages of execution:

      QQmlApplicationEngine engine;
      engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
      

      The engine.load() call does not produce any output, but fails silently, without any valid result.

      Before this load() call, there are numerous qmlRegisterType() calls, and maximum 2 qmlRegisterSingletonType() calls. Temporarily disabling the qmlRegisterSingletonType() calls restores the engine.load() call, in such a way that numerous QML errors are reported. Obliviously, that version does not run at all due to the disabled singletons, but the engine.load() returns with a valid response. My suspicion went towards singleton handling in QML/C++ context.

      I found commit 98358715930739ca8de172d88c5ce6941c275ff3 (https://codereview.qt-project.org/#/c/205260/) in qtdeclarative. Reverted that, and the application is running again, but now with 5.9.2 instead of 5.9.1. Revering it, is obviously no valid solution, but shows the strong relation to the problem at hand.

       

      Attachments

        1. testcase.tar.gz
          0.9 kB
        2. testcase.tar.gz
          10 kB

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              jlm Jan Mulder
              Votes:
              11 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes