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

Jannik Heller scrawl at baseoftrash.de
Thu Feb 4 11:37:48 PST 2016


Hi Robert,

The leak is only noticable when you frequently remove and re-create cameras, something that osgprerender does not do.

I've added an osg::Observer to test that the Camera is being deleted properly, and it is. It looks like CPU side everything is being deleted correctly, only on GPU side there is an issue because glDeleteFramebuffers is being called without a current context.

Please check out the following minimal changes to osgprerender.cpp - recreating the Camera every frame. This leaks for me in OSG 3.5 but does not leak in 3.4. An easy way to see the increase in VRAM usage is with nvidia-smi if you are using an Nvidia card, not sure about tools for other graphics cards manifacturers.

When I run this modified example, the VRAM usage instantly baloons to 4 GB, and the system memory usage starts growing very fast (presumably since the graphics card has to swap back and forth from system memory when it's full). 

Hope that helps in solving the issue.

Thanks,
Jannik

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgprerender.cpp
Type: text/x-c++src
Size: 18596 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160204/301592b7/attachment-0003.cpp>


More information about the osg-users mailing list