Hi KK,
Just had a chance to try out your fix for the OpenFlt Optimizer crash. Seems
to work for me. Thanks for that
Mark
Hi
the problem causes osgUtil::Optimizer in stage MergeGeodes
crash conditions:
Visual Studio 2005 (VS80)
debug version osg (and host app)
some scene with group that contains some Geodes with various Nodemask
optimize scene (MergeGeodes)
crash cause:
Predicate LessGeode is bad in principle.
struct LessGeode
{
bool operator() (const osg::Geode* lhs,const osg::Geode* rhs) const
{
if (lhs->getStateSet()<rhs->getStateSet()) return true;
if (lhs->getNodeMask()<rhs->getNodeMask()) return true;
return false;
}
};
This predicate sometimes not fulfil condition
(lhs < rhs) && (rhs < lhs) != true
Debug version of STL map in Visual Studio verify this condition and may
crash on assert.
Isolating "same" geodes in 2 steps (2 maps) solve this problem.
KK
Mark Hurry napsal(a):
>
> Hi,
>
>
>
> I have been trying to load an OpenFlight file created using TerraVista
> using osgViewer. However I have been getting a crash in the optimizer
> code in Optimizer::MergeGeodesVisitor::mergeGeodes at line
> geodeDuplicateMap[geode].push_back(geode); I finally managed to track
> down that in the OpenFlight format polygon attributes there is a flag
> for ?Hidden polygon?. If this flag is set it causes a crash, if it is
> not set then the model loads.
>
>
>
> Is this a known problem? And if so is there a work around? Obviously
> it is not feasable to go into each OpenFlight file and manually check
> each polygon to see if the ?Hidden polygon? flag has been set.
>
>
>
> Thanks in advance
>
>
>
> Mark
>
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.7/1335 - Release Date: 19-Mar-08
9:54 AM
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org