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

WebEngine does not load page

    XMLWordPrintable

Details

    • Windows

    Description

      In a case where a Web Application that is hosted by a webserver on localhost and is displayed by QWebEngineView, the webpage is not always loaded in certain cases. This error occurs more often the more load on the CPU is.

      Even if the application is started with a simple HTML-page there was not a significant difference in the start-up behavior.

      delay 0 msec: WEB-application does not start
      delay 200 msec: WEB-application does not start
      delay 500 msec: WEB-application starts in about 80%
      delay 3000 msec: WEB-application starts almost, but also here failed sometime the start-up

      It looks like the WEB-application is loaded too early and the QWebEngine is not ready to accept the WEB-application.

      The QWebEngineView and the HTTP-server runs in the same EXE.
      The MainWindow is visible but the content of the QWebEngineView is empty - see start_up.jpg.
      After clicking "Reload" the QWebEngineView start loading the WEB-application.

      On the next attempt starts the application correct and the QWebEngineView loads the WEB-application immediately. But a few attempts later failed the loading of the WEB-application again.

      The only difference in the NOK attempt is, that the SLOT finishLoading will be not called.
      Time traces for OK and NOK attempt are attached and also the whole debug output from Visual Studio.

      The start-up sequence looks like follow:

      create QApplication and show splash screen
      QApplication()
      QSplashScreen::show();

      start HTTP server
      QTcpServer::listen()

      create and show QMainWindow
      QMainWindow()
      ui->setupUi(this);
      connect(QWebEngineView, SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool)));
      QMainWindow::show()

      start WEB socket server
      QWebSocketServer::start();

      start laoding HTML page (index.html)
      QWebEngineView::load()

      start main loop
      QApplication::exec()

      SLOT finishLoading:
      QSplashScreen::finish();|

      The patch https://codereview.qt-project.org/c/qt/qtwebengine/+/340965 did not help

      Attachments

        1. configure_VC16_win32.cfg
          0.9 kB
        2. debug_NetworkServiceInProcess_NOK.txt
          3 kB
        3. debug_single-process_OK.txt
          10 kB
        4. index.html
          0.3 kB
        5. index.png
          index.png
          14 kB
        6. main.cpp
          13 kB
        7. main.pro
          0.1 kB
        8. qwebenige_exception.jpg
          qwebenige_exception.jpg
          339 kB
        9. sicdm_trace_5.15.3_nok.txt
          2 kB
        10. sicdm_trace_Qt5.15.6_nok.txt
          2 kB
        11. sicdm_trace_Qt5.15.6_ok.txt
          54 kB
        12. sicdm_trace5.15.5_nok.txt
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kiburtse Kirill Burtsev
            michaelwinkelmann Michael Winkelmann
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes