0

I run the qt official example "2dpainting" in "C:\Qt\Examples\Qt-5.12.2\opengl\2dpainting". When I set the graphics card (Intel(R) UHD Graphics, it is the graphics card that example is using) is disabled, the example crashed. BUT, at the same time, the Chrome which is playing a youtube's video has not crashed. Then, I found the CPU usage of Chrome has increased a lot. So, I think this is a bug of Qt which can't handle the switching between graphics card and cpu well.

My computer:

Computer: Lenove laptop, CPU: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz, RAM: 16.0 GB, GRAPHICS CARD: NVIDIA Quadro P620 + Intel(R) UHD Graphics, System: Windows 10, Compiler: msvc2017, Qtcreator: 9.0.1(community),

This is a reproducible bug on my environment. I have reported to QTBUG[https://bugreports.qt.io/browse/QTBUG-111810], however, no reply.

How to avoid this crash?

When I run the example "qopenglwidget" in "C:\Qt\Examples\Qt-5.12.2\opengl\qopenglwidget", there was also a crash.

When I implemented QGLWidget by GLWidget, the "2dpainting" example did not crash. Does anyone know why?

James Xue
  • 1
  • 1
  • Just to clarify: are you disabling the graphics card *while* the application is running? What information does your debugger give you about the crash site? – G.M. Mar 10 '23 at 19:42
  • First is YES. Second is nothing. The crash site [link](https://bugreports.qt.io/browse/QTBUG-111810). – James Xue Mar 13 '23 at 03:12
  • If you disable the graphics card while it's being used I'm really not surprised the application crashes. Regarding chrome: it uses separate rendering processes. As such I suspect the relevant chrome sub-process also crashes but is then resurrected by a watchdog process. – G.M. Mar 13 '23 at 18:30
  • Thank you for your patient reply! The reason for disabling the graphics card is to simulate the scenario in which the system loses its drive. After all, it is a common problem to lose the driver of the graphics card [link](https://www.technology-solved.com/graphics-card-failure/). When my widget inherited QGLWidget, crash disappeared, so, I wanted to replace QOpenGLWidget with QGLWidget. But, I didn't know the differences between QGLWIdget and QOpenGLWdiget. And, Qt document said "We strongly advise against using it in new code". In fact, I just need the program not to crash. – James Xue Mar 14 '23 at 06:33

0 Answers0