[osg-users] [build] Multi-threading crashing on start-up (2.8.3, XP, VS2008)
robert.osfield at gmail.com
Tue Apr 26 03:17:42 PDT 2011
There isn't an build option to enable multi-threading of the viewer,
the OSG will always build with OpenThreads and have a multi-thread
capable viewer, the only limitation is on how the graphics contexts
are created - you have to use the OSG's native creation of graphics
contexts to do multi-threading, and can't use the
GraphicsWindowEmbedded functionality for grafting the OSG into
existing apps, as this doesn't enable all context mechanisms required
to multi-threaded, multi-context GL.
I would suggest trying out different threading models with OSG
examples like osgviewer to see if they all work fine, this would at
least show whether there is build issue. Then once you are confident
that there isn't a build issue then move on to testing your own app.
On Tue, Apr 26, 2011 at 2:13 AM, Tom Appollo <tappollo at harris.com> wrote:
> Hi All,
> I had been running my app based on OSG 2.8.3 on a VS2003 build (XP machine) for a while. However, I'm now moving the app to VS2008 so, I got a clean 2.8.3 source, pulled the latest 3rd party VS2008 binaries and configured CMake to build it. No problems with the build.
> (NOTE: Not ready to move on past 2.8.3 yet)
> When my code is ported over and the OSG libraries are added in, when app starts up, if my derived CompositeViewer exectues the line:
> (which was in the original VS2003 2.8.3 build and it ran fine) with VS2008, it immediate crashes at the start of the frame being displayed.
> If however I replace it with
> the app will run but as a single thread which isn't all that desirable as all work stops if I pop up something (e.g. user dialog).
> Is there something I forgot, I didn't see anything specific in the CMake listing regarding enabling threading (the one reference to OpenThread is set for dynamic).
> Thank you for any insight you may be able to offer!
> Read this topic online here:
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users