[osg-users] FBO and Renderbuffer leak in OSG 3.5

Jannik Heller scrawl at baseoftrash.de
Thu Feb 4 09:52:21 PST 2016


Hi,

I have just tracked down a memory leak regarding FBO's to what appears to be an OSG bug. Please check out the attached screenshot of gDebugger, OSG attempts to glDeleteFramebuffers / glDeleteRenderbuffers from the main thread with no context current. That can't work properly and I'm actually surprised that the driver doesn't crash or complain about this.

When I change the threading mode to SINGLE_THREADED the leak disappears, this makes sense since now all graphics work is done from the main thread, so deleting from the main thread will actually work.

I'm getting this issue with OSG 3.5 git master commit 40bd79c499a37a9. When I revert back to OSG 3.4 the leak disappears. I presume this is a regression from when the new GL buffer object management was introduced in OSG 3.5. 

I haven't written a reproduction sample yet but it should be fairly simple - all I'm doing is add an FBO camera to the scene graph, have it render for one frame, and then remove it from the scene graph to be deleted.

Any ideas on how to fix this? If needed I can try to provide a reproduction sample.

Thank you!

Cheers,
Jannik

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66205#66205








More information about the osg-users mailing list