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

PyQt /Windows: QtWebEngineWidgets fail to run with ANGLE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P4: Low P4: Low
    • None
    • 5.5.0 Beta
    • WebEngine
    • None
    • msvc2013/Visual Studio 2013
      Windows 8.1 SDK
      PyQt 5.4.2
      Python 2.7.10

      We're attempting to use QtWebEngineWidgets on the Desktop, but we're hitting the following error at runtime:

      DXGI ERROR: CreateDXGIFactory cannot be called from DllMain. [ MISCELLANEOUS ERROR #76: ]
      DXGI ERROR: CreateDXGIFactory cannot be called from DllMain. [ MISCELLANEOUS ERROR #76: ]
      class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3003
      

      The window hosting the widget then appears to be blank, or fails to appear at all. It appears that since, for QtWebEngineWidgets, the module's initialization method calls QtWebEngine::initialize(), this triggers the use of some of ANGLE's own initialization, which itself calls CreateDXGIFactory. However, according to Microsoft, this is illegal if called from DllMain: https://msdn.microsoft.com/en-us/library/windows/desktop/bb204862(v=vs.85).aspx

      We believe this happens because PyQt dynamically loads QtWebEngine (likely through LoadLibrary). Is there a way to trigger QtWebEngine::initialize() at a later time?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            albisser Zeno Albisser
            maxbelanger Max Belanger
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes