Results 1 to 5 of 5

Thread: Qt 5.13.0 Basic Shapes C++ example fails with MSVC 2017 (x86)

  1. #1
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Qt 5.13.0 Basic Shapes C++ example fails with MSVC 2017 (x86)

    Having had to replace a failing hard disk, I reinstalled Qt 5.13.0 on Windows 7 (from qt-opensource-windows-x86-5.13.0.exe), and installed VS 2017 Community. I am using a 32-bit kit: compiler MSVC 15.0 (x86), Qt version Qt 5.13.0 MSVC2017 32bit.
    The basicshapes-cpp example fails with a great number of errors, starting like this:

    QWindowsEGLStaticContext::create: Could not initialize EGL display: error 0x3001
    QWindowsEGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available
    Attempted to use GDI functions with a non-opengl32.dll library
    QWindowsGLContext::QWindowsGLContext: Unable find a suitable pixel format.
    Qt3D.Renderer.Backend: void __thiscall Qt3DRender::Render::Renderer::initialize(void) OpenGL context creation failed
    Attempted to use GDI functions with a non-opengl32.dll library
    QWindowsGLContext::QWindowsGLContext: Unable find a suitable pixel format.
    Attempted to use GDI functions with a non-opengl32.dll library
    QWindowsGLContext::QWindowsGLContext: Unable find a suitable pixel format.
    CommandThread: Failed to create local context
    Qt3D.Renderer.Backend: bool __thiscall Qt3DRender::Render::GraphicsContext::makeCurrent(c lass QSurface *) makeCurrent failed
    Qt3D.Renderer.Backend: bool __thiscall Qt3DRender::Render::GraphicsContext::makeCurrent(c lass QSurface *) makeCurrent failed
    Qt3D.Renderer.Backend: bool __thiscall Qt3DRender::Render::GraphicsContext::makeCurrent(c lass QSurface *) makeCurrent failed
    ...

    I'm guessing that the errors are a consequence of the subject of a popup when Qt Creator starts up, with the title "Plugin Loader Messages".
    "The following plugins have errors and cannot be loaded:
    QmlDesigner
    QmlProfiler

    Details:
    Plugin initialization failed: Cannot create OpenGL context."

    This seems to imply that the Qt installation from qt-opensource-windows-x86-5.13.0.exe is faulty. I chose the 32bit version because some other parts of my project are built 32bit, and to get 64bit capability will cost $. Does Qml require the 64bit Qt version? If not, what else could be the cause of this problem?

    (I tried to force use of desktop OpenGL with this:
    QCoreApplication::setAttribute(Qt::AA_UseDesktopOp enGL);
    but that generated a different set of errors.)

  2. #2
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qt 5.13.0 Basic Shapes C++ example fails with MSVC 2017 (x86)

    I've now confirmed that all three MSVC compiler options available with this installation fail to build a working executable for this example:
    MSVC2015 64bit
    MSVC2017 32bit
    MSVC2017 64bit

    This indicates that the problem is not related to the bitness, but rather that the installation provided by
    qt-opensource-windows-x86-5.13.0.exe is deficient where qt3d is concerned.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt 5.13.0 Basic Shapes C++ example fails with MSVC 2017 (x86)

    Quote Originally Posted by gib View Post
    The basicshapes-cpp example fails with a great number of errors, starting like this:

    QWindowsEGLStaticContext::create: Could not initialize EGL display: error 0x3001
    QWindowsEGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available
    Attempted to use GDI functions with a non-opengl32.dll library
    QWindowsGLContext::QWindowsGLContext: Unable find a suitable pixel format.
    Qt3D.Renderer.Backend: void __thiscall Qt3DRender::Render::Renderer::initialize(void) OpenGL context creation failed
    Attempted to use GDI functions with a non-opengl32.dll library
    ANGLE provides an OpenGL interface to Qt and uses the DirectX interface on the machine to do the rendering.
    What video card is in your machine, what card drivers, and what version of the DirectX libraries have you installed?
    Does DxDiag report any issues?
    This may be useful: https://support.microsoft.com/en-us/...ion-of-directx

    Does d3dcompiler_4x.dll exist on the PATH anywhere?

  4. #4
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qt 5.13.0 Basic Shapes C++ example fails with MSVC 2017 (x86)

    DxDiag finds no problems. DirectX 11. On the Display page the acceleration features are all Not Available.

    The video card is an ATI Radeon, but currently the display adapter in use is Standard VGA Graphics Adapter. After reinstalling W7 I suffered many days of BSODs, with much checking of everything and multiple system restores. I finally discovered that some recent update was making the system unstable (the machine would crash at night, presumably when an update was done), so I installed almost all the important updates, none of the optional updates, and turned of automatic updates. It now has survived for 2 days, so I think that was the cause of the BSODs. The problem is I still don't know which update is the culprit, and I haven't run the update for the video card driver in case that's the source of the crashes. I may have to bite the bullet and install the driver from the original CD.

    d3dcompiler_47.dll exists in many places, in the install directories of VS2015 and VS2017, and in the various Qt directories. These are not in the PATH I see in a command window, but one is in the augmented path that Qt Creator sets up for a build. I assume that this path is used when I run the example within Qt Creator.


    Added after 46 minutes:


    I just installed the driver for the Radeon HD 5400, and now the example runs without errors.
    Thanks!
    Last edited by gib; 8th September 2019 at 05:58.

  5. #5
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qt 5.13.0 Basic Shapes C++ example fails with MSVC 2017 (x86)

    Update: Installing the display adapter driver fixed the software problem, but overnight the machine crashed again. I uninstalled the driver (reverting to standard VGA) and this morning the machine is still running (oddly, automatic updates are turned off, so I don't know what event in the night causes the crash.) In any case, it seems that I can have a stable system with basic VGA, without Qt3d capability, or an unstable system with Qt3d capability.

    I am going to get install a different video card (just bought a used GeForce GTX 460) to test replacing the Radeon, which might be damaged.

Similar Threads

  1. Migration from Qt 4.8 to Qt 5.12 Msvc 2017
    By aymenbest2 in forum Newbie
    Replies: 4
    Last Post: 18th June 2019, 10:04
  2. Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017
    By ForestDweller2 in forum Installation and Deployment
    Replies: 3
    Last Post: 19th March 2019, 18:22
  3. Qt 5.9.2 WebEngine build fails with Visual Studio 2017
    By gvanvoor in forum Installation and Deployment
    Replies: 0
    Last Post: 9th November 2017, 13:12
  4. Replies: 1
    Last Post: 29th September 2011, 12:14
  5. Problem with compiling Qt 4.6 via MSVC 2010 Beta2 (win32-msvc specs)
    By Erik-Moscow in forum Installation and Deployment
    Replies: 2
    Last Post: 17th December 2009, 19:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.