David,

Thanks for the information. It sounds like there might actually be a problem here. Rather than code around it, I'm going to keep poking around to see if I can figure out what's going on. It's nice to have a plan B though, so thank you for the advice.

Right now it looks like the Viewer::getContexts(contexts, true) method is being called from ViewerBase::stopThreading(). The thread that is still running (GraphicsContext which I believe was started when I called realize()) isn't marked as valid and thus is not reported by getContexts(). Now I'm trying to figure out how that thread can still be running and not be valid.

One thing that is slightly strange about my scene graph is that I have a slave camera rendering a subgraph for the background. Did you have more than one camera?

Cory

David Spilling wrote:
Cory,

FWIW, I do what you do : I have an OpenThreads::Thread class which _has_ a viewer. The parent application starts this thread up, and lets it get on with viewer creation, frame dispatch, viewer deletion and so on.

I had very similar problems to you a while ago (> 1 year? ) when I originally set this up.

>...assuming that it is ok to call viewer->setDone() from a different thread?

This sounds familiar. I only call viewer->setDone from within the thread that owns it. (The thread that owns the viewer has a "Stop" method, which calls setDone).

This works for me.

Hope that helps,

David

_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to