Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.3.0 Alpha
-
Windows 8.1 Runtime
Windows Phone 8
-
-
3aa6a8b90f9c0e5f0ad72c462a15157b4e419ae6
Description
See Renderer::renderMergedBatch() + about 50 lines:
ShaderManager::Shader *sms = m_useDepthBuffer ? m_shaderManager->prepareMaterial(material) : m_shaderManager->prepareMaterialNoRewrite(material); QSGMaterialShader *program = sms->program;
The sms variable can be a null pointer here. Avoiding the null pointer access and printing an error message would be helpful.
This might happen on other platforms where the material doesn't link, but the bug is opened because it can happen quite commonly on WinRT if the D3D compiler is left out of the package or the compiler service isn't running.
It's worth noting that there are already debug messages printed by QOpenGLShader and d3dcompiler_qt saying that something went wrong. However, it might be worth going the extra mile and avoiding the crash. Or, qFatal could be used so that a message box could be shown in release builds instead of simply crashing the application.
Attachments
For Gerrit Dashboard: QTBUG-37290 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
80137,1 | QSGBatchRenderer: return when a shader is not returned by the manager | stable | qt/qtdeclarative | Status: MERGED | +2 | 0 |