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

Qt Webengine crash if the OpenGL requirements are not met

    XMLWordPrintable

Details

    • Linux/X11

    Description

      Introduction

      In this ticket https://bugreports.qt.io/browse/QTBUG-77851 I noticed that with Xming and accelerated OpenGL the resulting OpenGL version was only 1.4.

      Now I use the tool X2Go from Window 10 to Ubuntu 18.04. The problem here is, that the glx version is only 1.2 (Please refer the qtdiag.txt and glxinfo.txt).

      Description of the Problem

      I try to run the Qt example webenginewidgets/stylesheetbrowser, but it crashes with the following console output:

      [51934:51972:0829/085831.127065:ERROR:gl_surface_glx_qt.cpp(141)] GLX 1.3 or later is required.
      [51934:51972:0829/085831.127095:ERROR:gl_ozone_glx_qt.cpp(57)] GLSurfaceGLXQt::InitializeOneOff failed.

      I attached stylesheetbrowser_tla.zip where I extend a little bit. In the following table I checked the Qt versions 5.12.2

      and 5.12.4. I switched Software Rendering on and off, with this code

      QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);

      And I introduced two methods which returns different Url's. The method getUrlOne() returns Qt's webpage (http://qt.io) and

      getUrlTwo() returns a file called basic.html which contains simple html code. One surprise is that the rendering of http://qt.io is broken with softwareRendering and Qt 5.12.2. With Qt 5.12.4 the rendering ist working. 

      It seems that the software rendering in Qt 5.12.4 seems to be working better than 5.12.2.

       

      Qt Version Use Software Rendering Url method Behavior
      5.12.2 No getUrlOne() Crash
      5.12.2 Yes getUrlOne() No crash, but rendering is broken = blank web page
      5.12.4 No getUrlOne() Crash
      5.12.4 Yes getUrlOne() It seems ok. Web page is visible
      5.12.2 No getUrlTwo() Crash
      5.12.2 Yes getUrlTwo() It seems ok. Web page is visible.
      5.12.4 No getUrlTwo() Crash
      5.12.4 Yes getUrlTwo() It seems ok. Web page is visible.

       

      Wishes and expectations

      It is clear that I'm responsible to provide a correct OpenGL environment.

      But it would be wonderful if I could read the OpenGL requirements for the WebEngine.

      At least the OpenGL and the glx version (e.g. for linux).

      Or on the otherhand, if the Webengine module already know that the OpenGL requirements are not fullfied, why doesn't stop Webengine the rendering process and provide a error message/handling?

      I'm working for a company which uses the Webengine. The company supports Windows, Linux and MacOS. If our customers uses Xming and X2Go our application will crash because of the not fullfield OpenGl requirements for the WebEngine.

      If there is no way to check the OpenGl requirements for the WebEngine I have to prove the source code of the WebEngine.

      Right now I know that the WebEngine needs at least OpenGL version 2.0 from this page https://doc-snapshots.qt.io/qt5-5.12/qtwebengine-overview.html.

      And of course I can look into the webengine code (-> qtwebengine\src\core\ozone\gl_surface_glx_qt.cpp) and I will find which glx version is required.

      But this is not a comfortable way! If we upgrade to a new Qt version I have to remember to check the source code for the OpenGL/GLX requirements again. 

      Attachments

        1. glxinfo.txt
          9 kB
        2. qtdiag.txt
          5 kB
        3. stylesheetbrowser_tla.zip
          82 kB
        4. WebEngineCrash.gif
          WebEngineCrash.gif
          5.48 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            michal Michal Klocek
            lamb Thomas Lämmlein
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes