[osg-users] osg::Text::setBackdropType crash with a single character string

Carlo Lanzotti - DynaDream clanzotti at dynadream.com
Wed Sep 20 07:40:39 PDT 2017


Hi all,

when using osgText::Text::setBackdropType() with any shadow flag and a 
string with only one character a crash occur ("vector subscript out of 
range" exception are raised in debug mode, track 
Text::computeAverageGlyphWidthAndHeight()):

osgText::Text *text = new osgText::Text;
text->setBackdropType(osgText::Text::DROP_SHADOW_BOTTOM_RIGHT);
text->setText("X");

OSG Version: 3.4.1 64 bit, Visual Studio 2017, Windows 10,

Best Regards

-- 
Carlo Lanzotti

DynaDream - Dynamic Laboratory

http://www.dynadream.com



More information about the osg-users mailing list