Unhandled exception
Posted: Sat Feb 09, 2008 9:34 am
On the latest rev of a scenario I'm tinkering with, I get a .NET exception on the first AI turn:
System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsApplication1.AIClass.IsAreaNeighbour(Int32 area1, Int32 area2)
at WindowsApplication1.AIClass.SetMatrixHQ(SimpleList UL, Int32 hqnr, Int32 onlysanr)
at WindowsApplication1.AIClass.ExecuteMovement(Int32 PlanNr, Int32 MovePhaseNr)
at WindowsApplication1.AIClass.ExecuteAI()
at WindowsApplication1.GameLoopMainWindowClass.handleTimer()
at WindowsApplication1.ScreenClass.HandleTimer()
at WindowsApplication1.Form1.Timer1_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsApplication1.AIClass.IsAreaNeighbour(Int32 area1, Int32 area2)
at WindowsApplication1.AIClass.SetMatrixHQ(SimpleList UL, Int32 hqnr, Int32 onlysanr)
at WindowsApplication1.AIClass.ExecuteMovement(Int32 PlanNr, Int32 MovePhaseNr)
at WindowsApplication1.AIClass.ExecuteAI()
at WindowsApplication1.GameLoopMainWindowClass.handleTimer()
at WindowsApplication1.ScreenClass.HandleTimer()
at WindowsApplication1.Form1.Timer1_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)