“1 OpenGL errors detected 0 : (1285) Out of memory” after tens of thousands of Loop (inside each Loop: use VTK, new Window, Render, VolumeMapper then delete them))

“1 OpenGL errors detected 0 : (1285) Out of memory” after tens of thousands of Loop (inside each Loop: use VTK, new Window, Render, VolumeMapper then delete them))

app crashed after many loops, OpenGL Error"Out of memory" BUT cudaMemGetInfo and nvdia-smi log there is still enough available GPU memory…

Use a GL debug callback to get more details on the error. It might not be an out of memory error, but instead out of some other resource.

For how to do this, see:
https://www.khronos.org/opengl/wiki/OpenGL_Error#Catching_errors_(the_easy_way)

1 Like

thanks!
and do you know the inside memory layout or management of OpenGL? different on various platforms and drivers?
very werid that after got the OpenGL Out of memory ERROR, not only nvidia-smi shows that there is still enough available VRAM, and test with cudaMalloc shows that there is enough large contigous VRAM…donot know why after many loops of new and delete window with other res, OpenGL in VTK crash and shows Out of memory, it seems that OpenGL is not able to alloc on the very large enough contigous VRAM…

No. I’m not a driver developer. My experience is limit to being an OpenGL application developer. Mostly with NVIDIA’s OpenGL driver, both on Linux and Windows.

While that may be one possible cause, there are others. For just a few of the many examples (with NVIDIA drivers), see this thread. Search for GL_OUT_OF_MEMORY:

I’d suggest you see what the driver is telling you about your specific error. It may not be what you think.

1 Like

thank you very much!
how to get the specific error? is there API? or just search the OpenGL error code (1285) Out of memory WITH the version of the nvidia-driver?

got this:
GL CALLBACK: ** GL ERROR ** type = 0x824c, severity = 0x9146, message = GL_OUT_OF_MEMORY error generated. Failed to allocate memory for texture.

It’s probably a bug in your code. Possibly a leak.

You’re not running under Wine, correct?

A few web hits for the specific GL_OUT_OF_MEMORY detailed error you’re getting: