[osg-users] division by zero in osgParticle/FluidProgram.cpp

Tomlinson, Gordon GTOMLINSON at overwatch.textron.com
Thu Mar 12 09:04:53 PDT 2009

Read this page http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol

Product Manager 3d
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Csaba Halász
Sent: Thursday, March 12, 2009 12:03 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] division by zero in osgParticle/FluidProgram.cpp

On Thu, Mar 5, 2009 at 4:16 AM, Csaba Halász <csaba.halasz at gmail.com> wrote:
> Hi!
> If wind_accel has zero length, then line 43
>  double critical_dt2 = relative_wind.length2()/wind_accel.length2();
> will attempt a divide by zero. A simple fix would be to check for zero 
> but that would still leave the possibility of an overflow if the 
> divisor is small. So a more clever check would be nice. Any 
> suggestions?

Sorry for the "UP", but with a planned 2.8.1 bugfix release, I wonder if at least the trivial fix for this could be applied, if nobody has a better idea.
Same goes for the other div-by-zero I reported.

osg-users mailing list
osg-users at lists.openscenegraph.org

More information about the osg-users mailing list