Important: Please read the Qt Code of Conduct -

Debugging startup issue with QML app (graphics-related?)

  • I am seeing an issue with a QML app failing to start on one of two supposedly similar machines. Both are VMWare virtual Windows machines. On one it works fine, on the other the main window shows up blank briefly and then the application closes/crashes. This is similar to what I have seen on some Linux VMs with unsuitable OGL set up and which has sometimes been resolvable using software rendering (QT_QUICK_BACKEND=software) and, sure enough, using this allows the software to run on the Windows VM. Ideally, however, I would like to get to the bottom of what the difference is between the machines so that I don't have to use software rendering on one of them.

    How can I go about debugging this? Bear in mind that I know very little about OGL/graphics/etc. Is there any logging I can turn on or likely things I could look out for? I don't have very good access to these machines so I am going to have to provide some instructions to someone else in the first instance.

  • Lifetime Qt Champion

    @Bob64 Did you try to start the app from command line to see whether there is some error/warning output?

  • @jsulm yes but nothing out of the ordinary unfortunately.

  • Couple of bits of extra information.

    • The crash is reproduced by the most trivial app - a Window with no content.
    • It works if I set QT_OPENGL=angle

    Now, as I understand it, Qt is meant to fall back to ANGLE automatically if it determines that it needs it. So one possibility is that on the machine that works, it is doing this. Or it might be using native OpenGL successfully.

    Is there any way I can turn on some diagnostics for the graphics to see if I can pin down what is happening and where things are failing?

  • Do both machines have the VMWare drivers to support opengl? VMWare should just work as it supports opengl 3.3 with its drivers installed.

    Edit: What version of Windows?

  • @fcarney both machines are Windows Server 2019. I am not currently able to log on to them but hopefully I will be granted access soon and will look into drivers etc. It is useful to know that it ought to work so thanks for that.

  • Now that I can log into the machines, I have run with QSG_INFO=1 set.

    On the failing machine:

    Debug: GL_VENDOR: Microsoft Corporation
    Debug: GL_RENDERER: GDI Generic
    Debug: GL_VERSION: 1.1.0

    On the one that works:

    Debug: GL_VENDOR: Google Inc.
    Debug: GL_RENDERER: ANGLE (Microsoft Basic Render Driver Direct3D11 vs_5_0 ps_5_0)
    Debug: GL_VERSION: OpenGL ES 2.0 (ANGLE

    I take it from this that neither machine has suitable OpenGL drivers but on the second Qt is able to recognise this and fall back to ANGLE.

Log in to reply