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

Robert Osfield robert.osfield at gmail.com
Thu Feb 4 11:02:54 PST 2016


Hi Jannik,

Does the issue appear with any of the RTT example i.e. osgprerender?

>From your description it could be removing the FBO Camera from the
scene graph but keeping a reference around for it beyond the lifetime
of the graphics window that could be an issue.  However, I suspect it
isn't actually a leak, but an attempt to fix a potential leak that is
causing the reported problem as the old code would likely be not even
attempting to delete the GL objects.

It would be useful to have an example as I could easily create an
example that doesn't cause any problems and not know what to amend to
recreate the issue.

Robert.

On 4 February 2016 at 17:52, Jannik Heller <scrawl at baseoftrash.de> wrote:
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list