Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.8.1
-
None
-
Windows 11 Pro 23H2 22631.4602
AMD Ryzen 9 7900X and NVIDIA 4070 Ti
Description
Running on Windows 11, I have not tested this issue on Linux or MacOS though I can for completeness if desired.
I have created Vertex and IndexBuffers with proper memory and data such that this code
m_IndexBufferObject.bind(); glFuncs->glDrawElements(GL_TRIANGLES, m_MeshGrid.size(), GL_UNSIGNED_INT, nullptr); m_ShellIndexBuffer.bind(); glFuncs->glDrawElements(GL_TRIANGLES, m_Shell.size(), GL_UNSIGNED_INT, nullptr);
works perfectly and reliably in Qt 6.5.3 including resizing and changing the contents of the IndexBuffers over time (size and index values)
But when I tried to upgrade to 6.8.1 I spent nearly a full day chasing down a crash in the SECOND time I called glFuncs->glDrawElements for the m_IndexBufferObject. The first time through the loop it runs, but I don't get anything on the display. The second time through it crashes with a nullptr reference.
It is acting like it is reading whatever value is in the last parameter as the actual memory address to read, not the offset into the bound IndexBuffer.
OpenGL correctly reports the appropriate Buffer ID as bound for the GL_ELEMENT_ARRAY_BUFFER when queried and the size >= the relevant .size() parameter.
If I manually Generate and bind an IndexBuffer ID (using glGenBuffers and glBindBuffers) but DO NOT assign any memory, it will run without crashing, but produce GL errors due to no memory available (logged using a callback). If I assign memory to the manually generated buffer, it will crash with the same issues as using QOpenGLBuffer variables.
I have updated my nVidia drivers to the newest (and again, it works in 6.5.3 just fine with the same drivers).
Edit: GPL Version