Error: Attempted to divide by zero.

Topics: User Forum
Feb 4, 2007 at 9:03 PM
I get this error when trying to use my own model instead of the bear in the bear walking demo. I exported it from XSI, and the animation shows up in DXViewer.


System.DivideByZeroException was unhandled
Message="Attempted to divide by zero."
Source="Animation"
StackTrace:
at Animation.AnimationController.UpdatePoses()
at Animation.AnimationController.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Draw(GameTime gameTime)
at WalkingBearExample.Game1.Draw(GameTime gameTime) in D:\-=Game=-\XNA\-=Examples=-\AnimationComponents\WalkingBearExample\WalkingBearExample\Game1.cs:line 195
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Paint(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameWindow.OnPaint()
at Microsoft.Xna.Framework.WindowsGameWindow.mainForm_Paint(Object sender, PaintEventArgs e)
at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Form.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at Microsoft.Xna.Framework.WindowsGameForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at CallWindowProcW(IntPtr , HWND__* , UInt32 , UInt32 , Int32 )
at MouseSubClassFunc(HWND__* hWnd, UInt32 msg, UInt32 wParam, Int32 lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.Run()
at WalkingBearExample.Program.Main(String[] args) in D:\-=Game=-\XNA\-=Examples=-\AnimationComponents\WalkingBearExample\WalkingBearExample\Program.cs:line 14
Feb 4, 2007 at 9:08 PM
it got it to work, had to add:

AnimTicksPerSecond {
25;
}

in the .x file