HI Judson,

The design of osgViewer provides CompositeViewer for managing
applications with multiple Views.  Why are you using multiple Viewers?
 ComposisteVIewer has the ability to coordinate between multiple
contexts that using multiple Viewers can not.

W.r.t the buffers, I suspect the problem is that the buffers used to
manage the per context data are not being allocated prior to opening
the viewers and runners the threads.  Once the buffers are allocated
to the correct size then each rendering thread should operate in it's
own copy without collision with the other contexts.

You can resize the buffers prior to opening the windows by calling
rootnode->resizeGLObjectBuffers(), but this must be done single
threaded.

Again, I'd stress you are using the OSG multi-threaded in a way that
bypasses the route it was designed for, so you'll need to jump through
extra hoops, or just use the OSG as intended.

Robert.



On 4 June 2014 23:41, Judson Weissert <[email protected]> wrote:
> Hello,
>
> I have been experiencing a crash when opening multiple OSG windows at the
> same time on Windows. It is quite difficult to reproduce, but the end result
> is that the glyphsWereSubloading reference in GlyphTexture::apply() ends up
> pointing to a memory location that consists of 0xdd repeated. On MSVC debug
> builds, this usually indicates memory that was recently deleted. The
> _glyphsToSubload member has reasonable values (and a different memory
> location) when the problem occurs. Somehow, the reference and the member
> become out of sync, presumably due to some sort of threading problem.
>
> I have not determined exactly what the problem is, but two things that I
> suspect are:
>
> 1. _glyphsToSubload is read outside of the lock in a number of locations in
> GlyphTexture::apply().
> 2. _glyphsToSubload is written outside of a lock in
> GlyphTexture::resizeGLObjectBuffers().
>
> Anyone have any suggestions?
>
> I am running OSG 3.2.0 on Windows 8.1, with OSG compiled from source using
> MSVC 10. The viewers are running in single threaded mode, but each viewer is
> running on its own thread.
>
> Thanks,
>
> Judson
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to