[osg-users] Custom GraphicsContext Segmentation Fault when using Multithreading

Philipp Meyer philipp.meyer at fh-bielefeld.de
Thu Apr 28 01:35:59 PDT 2016


Hi,

so after countless more hours of debugging I have identified the issue.
Within the "setUpEGL" function I already set the eglContext to be current. So once the "makeCurrentImplementation" is called, the context is already set to be current. For some reason, when using singlethreaded rendering, this works without issues and "eglMakeCurrent" returns EGL_TRUE even if the context is already active.

However, when using multithreading, eglMakeCurrent fails when called on an active context and also appearantly invalidates the context, so that all following OpenGL calls fail.

I managed to fix the issue completely by just removing the "eglMakeCurrent" call within my "setUpEGL" function, so that the context does not become current before "makeCurrentImplementation" is executed by OSG. I can now use the application without errors on the realtime machine. :)

Thank you!

Cheers,
Philipp

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








More information about the osg-users mailing list