ERROR: Function does not accept floating point Not-a-Number values.

Topics: Developer Forum, User Forum
Aug 21, 2010 at 11:02 AM

Hi,

I am getting the following error randomly while moving

 

An unhandled error occured:
--------------------------------------------------
MESSAGE:
Function does not accept floating point Not-a-Number values.
--------------------------------------------------
--------------------------------------------------
STACK TRACE:
   at System.Math.Sign(Single value)
   at FarseerGames.FarseerPhysics.Dynamics.Springs.FixedAngleSpring.Update(Single dt)
   at FarseerGames.FarseerPhysics.PhysicsSimulator.ApplyForces(Single dt)
   at FarseerGames.FarseerPhysics.PhysicsSimulator.Update(Single dt, Single dtReal)
   at FarseerGames.FarseerPhysics.PhysicsSimulator.Update(Single dt)
   at FarseerPhysics.Utilities.Controllers.GameController._renderLoop_Update(TimeSpan elapsedTime)
   at FarseerPhysics.Utilities.RenderSystem.RenderLoop.StepEventHandler.Invoke(TimeSpan elapsedTime)
   at FarseerPhysics.Utilities.RenderSystem.RenderLoop.Render()
   at FarseerPhysics.Utilities.RenderSystem.RenderLoop.CompositionTarget_Rendering(Object sender, EventArgs e)
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

Please suggest

 

Coordinator
Aug 21, 2010 at 12:38 PM

If the forces on the joint are too strong, you will get a NaN (Not a Number) exception. Try lowering the values you use in the joint and the forces applied to the joint.