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

Crash in QQuickWebEngineViewPrivate::iconChanged when destroying web surfaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.10.1
    • Quick: Other, WebEngine
    • None
    • Windows 10

      Qt 5.10.1

      nVidia GTX 1070 GPU, with 388.20 drivers

       

       

      My application relies on the QQuickRender control to render QML and Web content to offscreen GL surfaces for composition into a 3D scene.  There can be an arbitrary number of these surfaces created.  The surface lifetimes depend mainly on user actions and can be arbitrarily short.

      I'm seeing intermittent crashes from deep inside the QQuickWebEngineView class when destroying web surfaces.  The crash seems to be related to website favicon management, and is inside `QQuickWebEngineViewPrivate::iconChanged` in this code block:

      if (!faviconProvider) {
        QQmlEngine *engine = qmlEngine(q);
        Q_ASSERT(engine);
        faviconProvider = static_cast<QQuickWebEngineFaviconProvider *>(
        engine->imageProvider(QQuickWebEngineFaviconProvider::identifier()));
        Q_ASSERT(faviconProvider);
      }

      Specifically, the engine pointer is null, and the subsequent call into engine->imageProvider(...) triggers an invalid memory read.

      I've attached a screenshot of the full stack trace as visible inside Visual Studio, along with a small test project I've created to reproduce the problem.  It creates and destroys a large number of offscreen surfaces rendering web content, each with a lifetime between 2 and 7 seconds.  With these parameters the crash usually happens within the first 30 seconds of running the application at least on my machine.  

        1. stacktrace.png
          stacktrace.png
          207 kB
        2. WebEngineCrash.zip
          23 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            w00t Robin Burchell
            jherico Bradley Austin Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes