Hi John,

Do you know what version of OSG the model was created with?

I've noticed that older versions of OSG will crash when attempting to load
osgb files created with newer versions. I haven't pinpointed exactly which
version caused this issue, but it happened when I upgraded from 72 to 93. I
noticed that you are using version 80, so this could explain the crashes
you are experiencing.

Cheers,
Farshid





On Mon, Aug 19, 2013 at 11:24 AM, John Farrier <[email protected]>wrote:

> Hi,
>
> I am attempting to load a 3D model (.osgb) in my application using
>
>
> Code:
> auto model = osgDB::readNodeFile(this->_modelFile);
>
>
>
>
> After that, I immediately want to get the bounding sphere size:
>
>
> Code:
> osg::BoundingSphere bs = model->getBound();
>
>
>
> While this generally works fine, there are some models that this
> consistently crashes (it's not an exception) on.  It seems to be calling
> "discardAllDeletedDisplayLists" just before the crash.  Here's the stack
> trace:
>
>
> Code:
> osg80-osg.dll!osg::Drawable::Extensions::setupGLExtensions() + 2336 bytes
> osg80-osg.dll!osg::Drawable::discardAllDeletedDisplayLists() + 1111 bytes
> osg80-osg.dll!osg::Geometry::accept() + 543 bytes
> osg80-osg.dll!osg::Drawable::computeBound() + 123 bytes
> osg80-osg.dll!osg::Drawable::getBound() + 124 bytes
> osg80-osg.dll!osg::Geode::computeBound() + 120 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Transform::computeBound() + 56 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Switch::computeBound() + 382 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Transform::computeBound() + 56 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Transform::computeBound() + 56 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Transform::computeBound() + 56 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Transform::computeBound() + 56 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Switch::computeBound() + 382 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
> osg80-osg.dll!osg::Group::computeBound() + 209 bytes
> osg80-osg.dll!osg::Node::getBound() + 96 bytes
>
>
>
>
> The really odd thing here is that the model loads just fine with
> osgViewer.  Is there something I could be doing to the state of OSG that
> would cause it to fail in my own application?
>
> (The application isn't trivial, or I would post more code.)
>
> Thank you!
>
> Cheers,
> John
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=55871#55871
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to