Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.3
-
None
-
-
16a6b2dc39f0022cddbc9be48a0ae8564f7a53a8 (qt/qtwebengine/5.12)
Description
When you create a QApplication, which have QWebEngine, a shared context is created.
But when the application is destroyed, the shared context pointer is not reset to nullptr.
So, in a UnitTest context, if we create a QApplication and QWebEngine by TestCase, it will crash on the second test case, because a deleted shared context will still be reference by global_share_context (in qopenglcontext.cpp).
The problem seems due to the call to deleteShareContext() in qtwebenginecoreglobal.cpp. This function do not recall qt_gl_set_global_share_context() with nullptr in order to clear the pointer of the deleted shared context.