Kaydet (Commit) 11fc36a4 authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Caolán McNamara

tdf#93798 - avoid apitrace provoked infinite loop dumping errors.

Change-Id: I6c42e6a9ead90ed6fad2f289cd686a72cffa0c2d
Reviewed-on: https://gerrit.libreoffice.org/18165Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f139baa0
......@@ -400,9 +400,14 @@ void OpenGLHelper::checkGLError(const char* pFile, size_t nLine)
{
OpenGLZone aZone;
GLenum glErr = glGetError();
if (glErr != GL_NO_ERROR)
int nErrors = 0;
for (;;)
{
GLenum glErr = glGetError();
if (glErr == GL_NO_ERROR)
{
break;
}
const char* sError = OpenGLHelper::GLErrorString(glErr);
if (sError)
......@@ -410,7 +415,12 @@ void OpenGLHelper::checkGLError(const char* pFile, size_t nLine)
else
SAL_WARN("vcl.opengl", "GL Error #" << glErr << " (no message available) in File " << pFile << " at line: " << nLine);
glErr = glGetError();
// tdf#93798 - apitrace appears to sometimes cause issues with an infinite loop here.
if (++nErrors >= 8)
{
SAL_WARN("vcl.opengl", "Breaking potentially recursive glGetError loop");
break;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment