I see a crash when trying to close a window in a multi window application that uses a QGLWidget. See the attached zip for a simple project that reproduces this issue.
- Open the application (2 QMainWindows are created).
- Click on the QGLWidget in the top window.
- Close the top window.
- Click in the remaining window. See crash.
I added basic debug output to show the focus window and the focus object. Something interesting to note is that after closing the first window, the Focus Window remains to be the previous window even though it has been closed.
Also, replacing QGLWidget with QOpenGLWidget does not reproduce this crash. When using QOpenGLWidget, after closing the first window the Focus Window properly becomes the remaining window (this is different from the original scenario).
I am using macOS 10.13.6 using Qt 5.12.3. I believe this is a mac specific issue.
|For Gerrit Dashboard: QTBUG-75326|
|260208,3||macOS: process activation events synchronously||5.15||qt/qtbase||Status: NEW||-1||0|
|260209,1||QWindow: clear platformWindow pointer early in destroy()||5.13||qt/qtbase||Status: ABANDONED||0||0|
|262536,3||Work around crash where a destroyed window becomes focus_window||5.12||qt/qtbase||Status: MERGED||+2||0|
|264107,1||Work around crash where a destroyed window becomes focus_window||5.12.4||qt/qtbase||Status: ABANDONED||0||0|