[osg-users] Crash on exit (graphics thread removing camera)

Jannik Heller scrawl at baseoftrash.de
Mon Aug 15 07:03:55 PDT 2016


> Your crash suggests otherwise :-) 

Given that there is no documentation suggesting that removing RTT camera's is unsafe - I just assumed it was a bug :)

As a workaround I believe that removing the Camera's children before removing the camera should fix the crash. That means releaseGLObjects() won't be called on the Camera's subgraph on destruction but to be honest that feature seems broken to me anyway:

What the intent probably was:
- release any GL resources that are only used by this Camera

What the code actually does:
- release any GL resources of a Node only used by this Camera *and* all its child-nodes (which may be shared resources still in use by other Cameras).

What are your thoughts on removing the releaseGLObjects() stuff from GraphicsContext::removeCamera - it is not working as intended, and removing it would fix the race condition as a side effect :)


Read this topic online here:

More information about the osg-users mailing list