Float is a NaN Exception
Posted: Fri Dec 21, 2012 10:38 am
I'm getting this exceptio using Bepu and VS don't showme were of my code is generating the NaN. I only know that the NaN it's getting to Bepu and generating this error. The most strange thing it's that is a heinser-bug, becasue only sometimes happens. Usually shows when I try to generate more that 100 zombies at random inside a rectangle and I allow the zombies to fall some meters over a staticmesh. (Note: I try to generate it using a loop and modules, so not was random positions with the same error showing)
No se controló System.ArithmeticException
Message=Function does not accept floating point Not-a-Number values.
Source=mscorlib
StackTrace:
at System.Math.Sign(Single value)
at BEPUphysics.CollisionShapes.ConvexShapes.CylinderShape.GetLocalExtremePointWithoutMargin(Vector3& direction, Vector3& extremePoint)
at BEPUphysics.CollisionTests.CollisionAlgorithms.MinkowskiToolbox.GetLocalMinkowskiExtremePoint(ConvexShape shapeA, ConvexShape shapeB, Vector3& direction, RigidTransform& localTransformB, Vector3& extremePoint)
at BEPUphysics.CollisionTests.CollisionAlgorithms.MPRToolbox.LocalSurfaceCast(ConvexShape shapeA, ConvexShape shapeB, RigidTransform& localTransformB, Vector3& direction, Single& t, Vector3& normal)
at BEPUphysics.CollisionTests.CollisionAlgorithms.TriangleConvexPairTester.DoDeepContact(TinyStructList`1& contactList)
at BEPUphysics.CollisionTests.CollisionAlgorithms.TriangleConvexPairTester.DoExternalNear(TinyStructList`1& contactList)
at BEPUphysics.CollisionTests.CollisionAlgorithms.TriangleConvexPairTester.GenerateContactCandidate(TinyStructList`1& contactList)
at BEPUphysics.CollisionTests.Manifolds.TriangleMeshConvexContactManifold.Update(Single dt)
at BEPUphysics.NarrowPhaseSystems.Pairs.StandardPairHandler.UpdateCollision(Single dt)
at BEPUphysics.NarrowPhaseSystems.NarrowPhase.UpdateBroadPhaseOverlap(Int32 i)
at BEPUphysics.Threading.ParallelLoopWorker.Work()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
No se controló System.ArithmeticException
Message=Function does not accept floating point Not-a-Number values.
Source=mscorlib
StackTrace:
at System.Math.Sign(Single value)
at BEPUphysics.CollisionShapes.ConvexShapes.CylinderShape.GetLocalExtremePointWithoutMargin(Vector3& direction, Vector3& extremePoint)
at BEPUphysics.CollisionTests.CollisionAlgorithms.MinkowskiToolbox.GetLocalMinkowskiExtremePoint(ConvexShape shapeA, ConvexShape shapeB, Vector3& direction, RigidTransform& localTransformB, Vector3& extremePoint)
at BEPUphysics.CollisionTests.CollisionAlgorithms.MPRToolbox.LocalSurfaceCast(ConvexShape shapeA, ConvexShape shapeB, RigidTransform& localTransformB, Vector3& direction, Single& t, Vector3& normal)
at BEPUphysics.CollisionTests.CollisionAlgorithms.TriangleConvexPairTester.DoDeepContact(TinyStructList`1& contactList)
at BEPUphysics.CollisionTests.CollisionAlgorithms.TriangleConvexPairTester.DoExternalNear(TinyStructList`1& contactList)
at BEPUphysics.CollisionTests.CollisionAlgorithms.TriangleConvexPairTester.GenerateContactCandidate(TinyStructList`1& contactList)
at BEPUphysics.CollisionTests.Manifolds.TriangleMeshConvexContactManifold.Update(Single dt)
at BEPUphysics.NarrowPhaseSystems.Pairs.StandardPairHandler.UpdateCollision(Single dt)
at BEPUphysics.NarrowPhaseSystems.NarrowPhase.UpdateBroadPhaseOverlap(Int32 i)
at BEPUphysics.Threading.ParallelLoopWorker.Work()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: