osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

classic Classic list List threaded Threaded
8 messages Options
Bin.L Bin.L
Reply | Threaded
Open this post in threaded view
|

osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

Hey.  
    osg 3.6.5 ,osgEarth 3.0, Win7, VS2015
    I add 2 Viewer to CompositeViewer and show the same earth.but when I set 2 Viewer DrawThreadPerContext TheadModel, They will crash a minute later.
    The crash code in engine_rex, geometrypool line 886,funtion drawImplementation.
    It seems that shared EBO for every tile.
    If use the SingleThreaded, the CompositeViewer works well.
    How to solve this except use SingleThreaded?
Thanks!
osgearth for aircraft display
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

Are you using 2 views in one osgViewer::CompositeViewer, or are you using two osgViewer::Viewer's ?
Glenn Waldron / Pelican Mapping
Bin.L Bin.L
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

In reply to this post by Bin.L
I use TMS tile image layer and tiff elevation layer. The project have 2 earth file, use the same image and
elevation layer,different cache path.
osgearth for aircraft display
Bin.L Bin.L
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

In reply to this post by gwaldron
 using two osgViewer::Viewer's
osgearth for aircraft display
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

You cannot connect the same scene graph to multiple Viewers. This is unsupported in OSG. It will work sometimes in SingleThreaded but may crash in that case sometimes too.
Glenn Waldron / Pelican Mapping
Bin.L Bin.L
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

Hi gwaldron
    Thanks for you reply!

    How to show more than 1 earth in different window if use the same Data source?
osgearth for aircraft display
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

The osgearth_windows.cpp example shows how to do this with a CompositeViewer.
Glenn Waldron / Pelican Mapping
Bin.L Bin.L
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth crash when use CompositeViewer and ThreadingModel DrawThreadPerContext

Thanks, I will try it!
osgearth for aircraft display