Tue, 03/28/2023 - 15:07
Hello, I have a 3D application using OCC/V3d_View base on Qt 5.15...
The application run fine... but I have notice this error recently when I left my computer on with the application running all night, when I come back the next morning I got this error:
TKOpenGl.WinSystem | Type: Error | ID: 6 | Severity: High | Message:
wglMakeCurrent() has failed. The handle is invalid.
TKOpenGl.WinSystem | Type: Error | ID: 6 | Severity: High |
Message: wglMakeCurrent() has failed. The handle is invalid.
....
And then the V3d_View is all black and I can't see my model anymore.
Is this something that is known? What can I activate to have more logging information so I can reproduce the problem and make a bug report if needed.
I use the following: Qt 5.15.12, OCC 7.7.0, Visual Studio 2019, Windows 11, NVidia RTX 3080
Here is the callstack I manage to grab:
1 OpenGl_Context::MakeCurrent OpenGl_Context.cxx 726 0x7ffbf0fb8bd5
2 OpenGl_Window::Activate OpenGl_Window.cxx 755 0x7ffbf0f8e983
3 OpenGl_Workspace::Activate OpenGl_Workspace.cxx 158 0x7ffbf0f16061
4 OpenGl_View::Redraw OpenGl_View.cxx 1641 0x7ffbf0f1dc12
5 V3d_View::Redraw V3d_View.cxx 404 0x7ffbf0720df8
6 AIS_ViewController::handleViewRedraw AIS_ViewController.cxx 3158 0x7ffbf0903ff3
7 prt::ViewController::handleViewRedraw prtviewcontroller.cpp 460 0x7ff660ffd901
8 AIS_ViewController::HandleViewEvents AIS_ViewController.cxx 3471 0x7ffbf08fd5e0
9 AIS_ViewController::FlushViewEvents AIS_ViewController.cxx 251 0x7ffbf08fd0dc
10 prt::View3D::paintGL prtview3d.cpp 669 0x7ff660ff2260
11 QOpenGLWidgetPrivate::invokeUserPaint qopenglwidget.cpp 895 0x7ffbda0dbf9f
12 QOpenGLWidgetPrivate::render qopenglwidget.cpp 916 0x7ffbda0dc062
13 QOpenGLWidget::paintEvent qopenglwidget.cpp 1328 0x7ffbda0da25a
Any ideas?
Thanks,
Francois
Thu, 03/30/2023 - 13:04
I haven't heard about issues happening just because of long execution time. Consider checking the following scenarios:
If that is not the case, then maybe Qt does something wrong and tricky (recreated window for some reason? or recreated OpenGL context?). Try logging Qt events / check its documentation if
QOpenGLWidget
has such exceptional cases that should be treated somehow.