Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3
-
None
-
OS Name Microsoft Windows 11 Enterprise
Version 10.0.22000 Build 22000
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Manufacturer VMware, Inc.
System Model VMware7,1
System Type x64-based PC
System SKU
Processor AMD EPYC 7713P 64-Core Processor, 2000 Mhz, 4 Core(s), 4 Logical Processor(s)
BIOS Version/Date VMware, Inc.
OS Name Microsoft Windows 11 Enterprise Version 10.0.22000 Build 22000 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Manufacturer VMware, Inc. System Model VMware7,1 System Type x64-based PC System SKU Processor AMD EPYC 7713P 64-Core Processor, 2000 Mhz, 4 Core(s), 4 Logical Processor(s) BIOS Version/Date VMware, Inc.
-
-
3b2d9d458 (dev)
Description
After migrating from QOpenGLWidget to QOpenGLWindow, as per the Qt documentation, we have encountered a critical issue. Our application crashes when using QOpenGLWindow on a Windows virtual machine with the GPU disabled. The crash seems to be caused by a nullptr exception when calling the glBindFramebuffer API, as the BindFramebuffer is not being set for the window's OpenGL functions as it only loaded opengl32.dll.
Impact:
This issue has posed a significant problem for our users and we are seeking urgent assistance to resolve it. While GPU is generally required for the best user experience, we still need this support for testing certain workflows and for legacy reasons. We are curious to know if there are alternatives for this approach when GPU is not available.
Steps to Reproduce:
- Disable GPU on a Windows virtual machine.
- Run the following code that uses QOpenGLWindow.
* Observe the crash when glBindFramebuffer API is called during paint.#include <QApplication>
#include <QOpenGLWindow>
#include <QOpenGLFunctions>int main(int argc, char *argv[])
{
QApplication app(argc, argv);QOpenGLWindow window;
QSurfaceFormat format;
format.setVersion(3, 3);
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setProfile(QSurfaceFormat::CoreProfile);
window.setFormat(format);window.show();
return app.exec();
}
Expected Result:
The application runs smoothly with QOpenGLWindow whether the GPU is enabled or disabled.
Actual Result:
Application crashes when the GPU is disabled, due to a nullptr exception when calling glBindFramebuffer API.
Note:
- Upon debugging, it appears that the BindFramebuffer is implemented by the Nvidia driver via nvoglv64.dll when the GPU is enabled. However, when the GPU is disabled, this does not occur, leading to the crash.
- As per dynamically-loading-opengl, I tried configuring the local build with -opengl dynamic and set the Qt::AA_UseSoftwareOpenGL attribute before the app launch, it should allow Qt to pick the software renderer lib with the specialized name called opengl32sw.dll. However, this didn't work. This file is nowhere to be found in the local Qt build directory. I attempted to build the standalone app with the libs I obtained from mesa3d installation sources, it appears to let the standalone build work as expected. It would be great if one of the experts could confirm the best course of action.
- I am also attaching the call stack for reference.