Been investigating a crash in our app, that randomly occurs on some specific devices with PowerVR GPU. The casue is not clear, as the app does not crash on other devices, and there appears to be no relevant diagnostic messages in the log . I can however provide the exact call stack, and looking for someone with enough insight into internal logic of the driver to help me figure out why it would crash, and then hopefully how to work around that.
crash stack like this:
#04 pc 00000000000a5dbc /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#05 pc 00000000000a594c /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#06 pc 00000000000a69ec /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#07 pc 00000000000af668 /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#08 pc 00000000000b4d90 /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#09 pc 00000000000b5f58 /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#10 pc 00000000000cba3c /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#11 pc 000000000002b78c /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so
#12 pc 000000000002b2f0 /vendor/lib64/egl/libGLESv2_POWERVR_ROGUE.so (glDrawElements+140)
#13 pc 000000000047b290 /xxxxxx/xxx::Mesh::Draw()
Mesh::Draw() function as below:
void Mesh::Draw() const
{
assert(mVAO != 0 && mVBO != 0 && mEBO != 0);
if(mVAO == 0)
X3D_LOG_ERROR("mesh draw: mVAO is 0");
if(mVBO == 0)
X3D_LOG_ERROR("mesh draw: mVBO is 0");
if(mEBO == 0)
X3D_LOG_ERROR("mesh draw: mEBO is 0");
if(glIsVertexArray (mVAO))
X3D_LOG_ERROR("mesh draw: mVAO is glIsVertexArray");
if(glIsBuffer(mVBO))
X3D_LOG_ERROR("mesh draw: mVBO is glIsBuffer");
if(glIsBuffer(mEBO))
X3D_LOG_ERROR("mesh draw: mEBO is glIsBuffer");
glBindVertexArray(mVAO);
glBindBuffer(GL_ARRAY_BUFFER, mVBO);
GL_CHECK_ERROR("DrawMeshBeforeBind");
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mEBO);
GL_CHECK_ERROR("DrawMeshBeforeDrawElements");
glDrawElements(mDrawStyle, mIndices.size(), GL_UNSIGNED_INT, 0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glBindVertexArray(0);
GL_CHECK_ERROR("DrawMesh");
}
No GL_CHECK_ERROR is found, and mVAO is glIsVertexArray,mVBO is glIsBuffer,mEBO is glIsBuffer.
More information:
Renderer: PowerVR Rogue GE8322
OpenGL version: OpenGL ES 3.2 build 1.11@5471373