[osg-users] segfaults with glDeleteShader
Robert Osfield
robert.osfield at gmail.com
Tue Nov 3 01:30:18 PST 2015
Hi Laurens,
On 2 November 2015 at 14:51, Voerman, L. <l.voerman at rug.nl> wrote:
> Just a quick remark,
> I think the warning you see is caused by the State destructor deleting the
> context's extensions:
>
> file src/osg/State.cpp (line 138)
>
> in State::~State()
> GLExtensions::Set(_contextID, 0);
>
> I think it caused me problems with loosing the extensions wen a camera was
> deleted, causing the databasethread to stop loading compressed images, as
> it cannot query the openGL context.
> I have no proposal for a fix yet, as I do not feel I fully understand the
> intention of the code. Removing the "GLExtensions::Set()" call seemed to
> remove my problem.
>
I suspect just removing the GLExtensions::Set(_contextID, 0); will just
hide the issue. Possibly there's been an issue there for a very long time
but has been hidden.
If the GraphicsContext has been deleted along with the State object then
the all data including extensions information is completely invalid. No
code should be invoking these methods when there isn't a valid graphics
context. I don't yet have a good handle on what circumstances this occurs
yet so can't comment on a fix.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151103/3f18c22b/attachment-0003.htm>
More information about the osg-users
mailing list