Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.1.2
-
None
-
-
84f30bf17170769795ddd8dbe1e7008ddbef2f6a (qt/qtdeclarative/dev) 217631fd61145b05a8798e4ef546428d78666284 (qt/qtdeclarative/6.2)
Description
We stubled across a massive leak that keeps growing the SRB-Cache (we don't know what that's used for, exactly) of QSGBatchRenderer::ShaderManager, in the likes of Megabytes per minute.
Incremental leak-check with valgrind shows the leak accumulates in
==58160== 2,544,640 (+1,454,080) bytes in 22 (+12) blocks are possibly lost in loss record 22,646 of 22,652
...
==58160== by 0x4AF7A30: insert (qhash.h:1142)
==58160== by 0x4AF7A30: QSGBatchRenderer::ShaderManager::srb(QVarLengthArray<QRhiShaderResourceBinding, 8ll> const&) (qsgbatchrenderer.cpp:336)
==58160== by 0x4B01336: QSGBatchRenderer::Renderer::prepareRenderMergedBatch(QSGBatchRenderer::Batch*, QSGBatchRenderer::Renderer::PreparedRenderBatch*) [clone .part.0] (qsgbatchrenderer.cpp:3048)
Aswell as the Map-Entry itself
==58160== 2,435,056 (+478,400) bytes in 509 (+100) blocks are possibly lost in loss record 22,647 of 22,652
==58160== at 0x4838DEF: operator new(unsigned long) (vg_replace_malloc.c:342)
==58160== by 0x536B9C3: QRhiGles2::createShaderResourceBindings() (qrhigles2.cpp:1237)
==58160== by 0x4AF77A2: QSGBatchRenderer::ShaderManager::srb(QVarLengthArray<QRhiShaderResourceBinding, 8ll> const&) (qsgbatchrenderer.cpp:333)
==58160== by 0x4B01336: QSGBatchRenderer::Renderer::prepareRenderMergedBatch(QSGBatchRenderer::Batch*, QSGBatchRenderer::Renderer::PreparedRenderBatch*) [clone .part.0] (qsgbatchrenderer.cpp:3048)
We do not know what could trigger generations of these "resource bindings". This understanding could help us tackle down the cause of map-growth. For now, we found that calling "releaseResources" fixes the leak, but we would like to fix this properly
Timer { interval: 10000 repeat: true running: true onTriggered: { mainWindow.releaseResources() } }