Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.3
-
None
-
-
257bd49c1f47ba5fca6930082fdcf108f9d24e3f (qt/qtbase/5.12)
Description
https://code.woboq.org/qt5/qtbase/src/gui/opengl/qopenglshaderprogram.cpp.html#3818 declares a single static cache object for all QOpenGLShaderProgram instances. My application uses multiple different threads to render QML UI to offscreen surfaces, with each QML context associated with it's own rendering thread per the documentation for QQuickRenderControl: https://doc.qt.io/qt-5/qquickrendercontrol.html
I'm seeing occasional crashes with a stack trace that ends in QOpenGLProgramBinaryCache::load, line 326, which is calling into QCache and QHash. I haven't been able to reproduce this in a debugger yet, but I assume that the lack of locking around `m_memCache` in the load function means that QOpenGLProgramBinaryCache isn't thread safe.
Attachments
For Gerrit Dashboard: QTBUG-77469 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
270559,8 | Guard with a mutex in QOpenGLProgramBinaryCache where needed | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |