Problems with Open-Source Downloads read and

QT webkit Access Violation Could not initialize egl display: error 12289 when invoked in service or IIS on one website

  • I build a console app with QT 5.1, msvc 64 bit, console app. It is invoked from website or a windows service (running as admin) on windows 8 64 bit version.

    EDIT: checking the source, the error 12289 is EGL_NOT_INITIALIZED, looks like the display render initialization failed. Anyone got any quick pointers?

    All it does is load up some webpage, and it works fine on all webpages except one.

    On that page it exits with -1073741819 (access violation) and stderr has this:
    class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(void): Could not initialize egl display: error 12289

    It runs fine when I run it in console. when it is invoked via IIS or service, it runs fine on all other websites except the one mentioned above.

    Code is attached:

    @#ifndef HEADER1_H
    #define HEADER1_H

    #include <QtWebKit>
    #include <QtCore>
    #include <QWebPage>
    #include <QAtomicInt>
    #include <QAuthenticator>
    #include <QFile>
    #include <QFileInfo>
    #include <QNetworkAccessManager>
    #include <QNetworkCookieJar>
    #include <QNetworkReply>
    #include <QWebFrame>
    #include <QProxyStyle>
    #include <QApplication>

    class DManager: public QObject {
    QNetworkAccessManager networkAccessManager;
    QWebPage webPage;
    public slots:
    void load();
    void loadProgress(int progress);

    void warning(const QString & str);
    void error(const QString & str);
    void loadFinished(bool ok);


    class MyProxyStyle : public QProxyStyle
    int styleHint(StyleHint hint, const QStyleOption *option = 0,
    const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const
    if (hint == QStyle::SH_UnderlineShortcut)
    return 0;
    return QProxyStyle::styleHint(hint, option, widget, returnData);

    #endif // HEADER1_H

    @#include <QApplication>
    #include <QProxyStyle>
    #include <QPrintEngine>
    #include <QLocalSocket>
    #include "header.h"

    DManager::DManager() :networkAccessManager(this)
    connect(&webPage, SIGNAL(loadProgress(int)), this, SLOT(loadProgress(int)));
    connect(&webPage, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool)));



    void DManager::load(){
    QNetworkRequest r = QNetworkRequest(QString(""));


    void DManager::loadFinished(bool ok) {

    void DManager::loadProgress(int p) {
    printf("load prog %i\n", p);
    FILE * fp = fopen("c:\temp\fopen.txt","a");
    fprintf(fp,"load prog %i\n",p);

    void DManager::warning(const QString & str) {
    FILE * fp = fopen("c:\temp\fopen.txt","a");
    fprintf(fp,"error %s", (const char*)str.toLatin1()) ;

    void DManager::error(const QString & str) {
    FILE * fp = fopen("c:\temp\fopen.txt","a");
    fprintf(fp,"error %s", (const char*)str.toLatin1()) ;

    int main(int argc, char *argv[])
    FILE * fp = fopen("c:\temp\fopen.txt","w");
    fprintf(fp, "start v0.6\n");
    QApplication a(argc, argv);
    a.setStyle(new MyProxyStyle());

    DManager *res = new DManager();
    int result = a.exec&#40;&#41;;    
    return result;


    QT += core network webkit webkitwidgets concurrent

    QT += gui

    TARGET = test
    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    SOURCES += main.cpp

    HEADERS += header.h

    Code (in c#) to invoke the app (must run under iis or service)
    var name = @"c:\temp\qtweb\release\test.exe";
    var proc = Process.Start(new ProcessStartInfo(name)
    UseShellExecute = false,
    WindowStyle = ProcessWindowStyle.Hidden,
    RedirectStandardError = true,
    RedirectStandardOutput = true,
    CreateNoWindow = true,
    var stdout = proc.StandardOutput.ReadToEndAsync();
    var stderr = proc.StandardError.ReadToEndAsync().Result;

                bool ext = proc.WaitForExit(30000);
                File.WriteAllText(@"c:\temp\test.txt", stderr + "\r\n stdout=" + stdout.Result + "\r\n" + proc.ExitCode + "\r\n"+ext);


    Other steps:

    The website/service are running as admin account. I copied all dlls under [QT]\Qt5.1.0\5.1.0\msvc2012_64\bin
    to the app directory, and copied everything under [QT]\Qt5.1.0\5.1.0\msvc2012_64\plugins\platforms to platforms in app directory (structure:


    By default all output went to c:\temp folder.
    Please help.

  • You say that's console app yet you include
    QApplication instead of QCoreApplication

    That doesn't look like console application to me
    any of these could attempt to create a widget that will lead to... oh actually it is Webkit complaining: "QT webkit Access Violation"
    so either use networkAccessManager only and forget about WebKit
    or make it a GUI application.

    You can not create GUI components aka widgets in a windowless aka console application - you have to provide graphical interface somehow:
    on linux you could do this "how to use Qt webkit in command line interface":

  • It works on all other cases, except the one website. So all my methods are fine (it is a windows app with a console). I am trying to build libglesv2 and debug it, running into many issues right now and will post back if I find anything.

  • Well your other option is:

    ..and read carefully deployment section(s)

  • I compiled with that this morning and the same thing. I am going to try to force software on d3d.

Log in to reply