Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.15.6, 5.15.2
-
CentOS 7.9.2009
NVIDIA Corporation GM206GLM [Quadro M2200 Mobile]
Intel Corporation Xeon E3-1200 (Lenovo P51)
Description
If a QOpenGLWindow is constructed and immediately shown, a followup call to isValid() fails every single time running under Linux/X11.
If you then modify and add a QThread::msleep(10) call, followed by processing the Qt event loop manually with qApp->processEvents(), then QOpenGLWindow::isValid will return true if the system isn't heavily taxed, seemingly with GPU tasks.
Repeated calls creating a QOpenGLWindow, testing it for validity, and destroying it (even non-threaded) ends with intermittent results on validity. The first such trial works, but followup trials are intermittent.
Increasing the amount of sleep performed increases the success rate of isValid() calls returning true, but if the system is under heavy load, it can still fail.
I have seen situations of greater than 60 seconds before isValid returns true after creation of a QOpenGLWindow.
Clearly, a fixed sleep is not appropriate here, however it is unclear to me what the issue is, and what I can call to wait for the QOpenGLWindow instance to be valid.
Attached is a project that contains two very small examples - one is the minimally reproducing example, and the other performs trials, and allows one to choose how much sleep should be performed, and whether or not processEvents() gets called.