Hi, I had similar problems in OSG 2.8.2 when calling osgText::Text::setText(string) while the text was being rendered by another thread. My solution was to use a DrawCallback and a Mutex lock to avoid calling setText at the same time as the drawImplementation. I'm not sure if this is a good solution or if osgText is changed in newer versions of OSG.
See the attached SafeText.h for an example. Regards, Johannes 2010/10/12 Björn Blissing <[email protected]>: > Hi, > > We are getting crashes when adding text to the scenegraph. I have spent hours > of debugging trying to find the source of the problem without success. All > suggestions will be appreciated. > > Details: > ======== > We use OpenSceneGraph 2.8.3 and base the software on the composite viewer. > Our main loop looks like this: > > > Code: > while (!m_viewer->done()) > { > updateSceneGraphContent(); > m_viewer->frame(); > } > > > > All changes to the scenegraph is done inside the updateSceneGraphContent > method. > > The text nodes have their datavariance set to Dynamic. > > When running the software on my developer machine everything works fine. It > is a Core2 machine with no hyperthreading and a NVIDIA GTX 8800 card. But > when we move the software to the production environment we get crashes when > adding text to the scenegraph. The production enviroment is running QuadCore > machines with hyperthreading. All computers run WinXP 32-bit and have NVIDIA > GTX470 cards. > > When running with DrawThreadPerContext it crashes, but if we set the viewer > to run in SingleThreaded mode everything works fine. > > > Best regards > Björn Blissing > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=32650#32650 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
SafeText.h
Description: Binary data
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

