Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngine is crashing without Qt::AA_UseSoftwareOpenGL attribute
Forum Updated to NodeBB v4.3 + New Features

QWebEngine is crashing without Qt::AA_UseSoftwareOpenGL attribute

Scheduled Pinned Locked Moved Solved QtWebEngine
2 Posts 1 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Holiday
    wrote on 28 Aug 2021, 15:36 last edited by
    #1

    Hi community.
    I faced with the problem, that the simple QWebEngineWidget application is crashing on my custom Qt build (5.14.1). If I'll set QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); - everything woks fine. Setting Qt::AA_ShareOpenGLContexts or Qt::AA_UseOpenGLES - causes crash
    I tested the same example on Qt 5.15.4 binaries from Qt installer - test example was working without Qt::AA_UseSoftwareOpenGL.

    I am building Qt with params:

    set "QTMODULES=-skip qt3d -skip qtandroidextras -skip qtconnectivity -skip qtdatavis3d -skip qtgamepad -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtwebchannel -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras"
    
    call ../configure -debug-and-release -force-debug-info -no-build-qtpdf -no-webengine-webrtc -no-webengine-spellchecker -no-webengine-printing-and-pdf -no-webengine-pepper-plugins -commercial -confirm-license -shared -optimized-tools -mp -ltcg -no-icu -opengl es2 -angle -combined-angle-lib -openssl-linked -I "%OpenSSL_Output%\include" -L "%OpenSSL_Output%\lib" OPENSSL_LIBS="-llibssl -llibcrypto -lUser32 -lGdi32 -lWs2_32 -lAdvapi32 -lCrypt32" -make tools -nomake examples %QTSIMD% %QTMODULES% %QTMKSPEC% -make-tool "%localdir%jom.exe" -prefix "%~1"
    
    1. With which parameters does usually Qt build from installer?
    2. How can I build QWebEngineCore.dll to work without Qt::AA_UseSoftwareOpenGL attribute?

    Additionally I tried to build Qt5.14.1 with the latest QWebEngine 5.15.6 - but the problem still present

    Application example (taken from webenginewidget qt examples)

    #include <QApplication>
    #include <QWebEngineView>
    
    QUrl commandLineUrlArgument()
    {
        const QStringList args = QCoreApplication::arguments();
        for (const QString &arg : args.mid(1)) {
            if (!arg.startsWith(QLatin1Char('-')))
                return QUrl::fromUserInput(arg);
        }
        return QUrl(QStringLiteral("https://www.qt.io"));
    }
    
    int main(int argc, char *argv[])
    {
        QCoreApplication::setOrganizationName("QtExamples");
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
        QApplication app(argc, argv);
    
        QWebEngineView view;
        view.setUrl(commandLineUrlArgument());
        view.resize(1024, 750);
        view.show();
    
        return app.exec();
    }
    
    1 Reply Last reply
    0
    • H Offline
      H Offline
      Holiday
      wrote on 1 Sept 2021, 11:19 last edited by
      #2

      Issue solved by removing -combined-angle-lib param from configure.
      If we'll build Qt with -opengl es2 -angle -combined-angle-lib options, it will create QtAngle.dll and no libEGL.dll and libGLESv2.dll will be created (which is OK due -combined-angle-lib) but in this case QtWebengineCore.dll will crash.
      Removing -combined-angle-lib will not create QtAngle.dll and application will use libEGL.dll and libGLESv2.dll instead which doesn't cause crash for the QtWebengineCore.dll
      I just wonder is it expected behavior?

      1 Reply Last reply
      0

      1/2

      28 Aug 2021, 15:36

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved