Robert Osfield schrieb:
I have now added a Mutex to osg::Stats and use of it in the various
get/set methods.

I have tested it out by running with DrawThreadPerContext and
CullThreadPerCameraDrawThreadPerContext and holding down the  's' key
and so far so good, no crashes.  I'm not noticing a performance hit
with this extra mutex, you only pay it when collect stats too so I
think safety is certainly better than what little gain one might have
on performance.

Could you do a cvs update and see if the above now work?

I did a cvs-update and made a clean compile -- I am sorry, your fix does not work

osgviewer cow.osg --DrawThreadPerContext will crash after pressing 2 x 's' and 1 x 'h'

here's the stack-trace:
#0    0x90b2a656 in std::string::compare
#1 0x204ce790 in std::operator< <char, std::char_traits<char>, std::allocator<char> > at basic_string.h:2190
#2    0x002b56d6 in std::less<std::string>::operator() at stl_function.h:227
#3 0x00382281 in std::_Rb_tree<std::string, std::pair<std::string const, double>, std::_Select1st<std::pair<std::string const, double> >, std::less<std::string>, std::allocator<std::pair<std::string const, double> > >::find at stl_tree.h:1118 #4 0x00382346 in std::map<std::string, double, std::less<std::string>, std::allocator<std::pair<std::string const, double> > >::find at stl_map.h:513
#5    0x002a6228 in osg::Stats::getAttributeNoMutex at Stats.cpp:88
#6    0x204df2c4 in osg::Stats::getAttribute at Stats:52
#7 0x204e0ae5 in osgViewer::BlockDrawCallback::drawImplementation at StatsHandler.cpp:289
#8    0x01320476 in osg::Drawable::draw at Drawable:873
#9    0x01275384 in osgUtil::RenderLeaf::render at RenderLeaf.cpp:60
#10 0x01273279 in osgUtil::RenderBin::drawImplementation at RenderBin.cpp:427 #11 0x012785de in osgUtil::RenderStage::drawImplementation at RenderStage.cpp:982
#12    0x01273073 in osgUtil::RenderBin::draw at RenderBin.cpp:370
#13    0x0127a4ba in osgUtil::RenderStage::drawInner at RenderStage.cpp:718
#14    0x0127a1e9 in osgUtil::RenderStage::draw at RenderStage.cpp:872
#15    0x01283f93 in osgUtil::SceneView::draw at SceneView.cpp:1305
#16    0x204d5914 in ViewerRenderingOperation::operator() at Viewer.cpp:186
#17 0x0029b9e4 in osg::GraphicsContext::runOperations at GraphicsContext.cpp:426
#18    0x204ce284 in ViewerRunOperations::operator() at Viewer.cpp:958
#19    0x0029ef80 in osg::OperationsThread::run at GraphicsThread.cpp:290
#20 0x000c31b8 in OpenThreads::ThreadPrivateActions::StartThread at PThread.c++:157
#21    0x90023d87 in _pthread_body


Stephan
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to