System.OverflowException occured on Click Series
Posted: Wed Dec 02, 2009 8:42 am
Hi,
I am getting a System.OverflowException on click series event.
I have many fast line serieses with custom y axises. Each series has its own custom axis so that data is not overlapped.
I have added the Click Series event for highlighting one series.
But after the data is drawn, whenever i am clicking in the chart area (not in the series or in the series or anywhere in the chart area), it is throwing the below exception.
Initially i was not able to identify from where the exception is coming because it was not going to any of my chart control code. It was simply crashing Application Form. Then i commented out all my code one by one and finally found that it is because of the Click Series event.
Funny thing is - if i am adding the event without any functionalities - even then its throwing the exception. But if the event is not added then my chart control is working fine.
One more thing i observed - if i set the Left axis for all the data serieses instead of Custom axises, then it is working fine.
I am totally confused .Please urgent help required.
I tried to reproduce the same problem in a sample application so that i can upload it for your reference but could not reproduce. But in my application it is happening everytime.
See below the exception details.
System.OverflowException was unhandled
Message="Negating the minimum value of a twos complement number is invalid."
Source="mscorlib"
StackTrace:
at System.Math.AbsHelper(Int32 value)
at System.Math.Abs(Int32 value)
at Steema.TeeChart.Drawing.Graphics3D.CalcLineParameters(Point PointA, Point PointB, Double& Slope, Double& Intercept)
at Steema.TeeChart.Drawing.Graphics3D.PointInLineTolerance(Point p, Int32 px, Int32 py, Int32 qx, Int32 qy, Int32 tolerance)
at Steema.TeeChart.Styles.FastLine.Clicked(Int32 x, Int32 y)
at Steema.TeeChart.Styles.Series.Clicked(Point p)
at Steema.TeeChart.Chart.CalcNeedClickedPart(Point Pos, Boolean Needed)
at Steema.TeeChart.Chart.DoMouseDown(Boolean IsDoubleClick, MouseEventArgs e, Keys Shift)
at Steema.TeeChart.TChart.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.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 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 PSES.Program.Main() in Z:\Prod_URT\ProfitSuiteEngineeringStudio\Infrastructure\PSES\Program.cs:line 25
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
I am getting a System.OverflowException on click series event.
I have many fast line serieses with custom y axises. Each series has its own custom axis so that data is not overlapped.
I have added the Click Series event for highlighting one series.
But after the data is drawn, whenever i am clicking in the chart area (not in the series or in the series or anywhere in the chart area), it is throwing the below exception.
Initially i was not able to identify from where the exception is coming because it was not going to any of my chart control code. It was simply crashing Application Form. Then i commented out all my code one by one and finally found that it is because of the Click Series event.
Funny thing is - if i am adding the event without any functionalities - even then its throwing the exception. But if the event is not added then my chart control is working fine.
One more thing i observed - if i set the Left axis for all the data serieses instead of Custom axises, then it is working fine.
I am totally confused .Please urgent help required.
I tried to reproduce the same problem in a sample application so that i can upload it for your reference but could not reproduce. But in my application it is happening everytime.
See below the exception details.
System.OverflowException was unhandled
Message="Negating the minimum value of a twos complement number is invalid."
Source="mscorlib"
StackTrace:
at System.Math.AbsHelper(Int32 value)
at System.Math.Abs(Int32 value)
at Steema.TeeChart.Drawing.Graphics3D.CalcLineParameters(Point PointA, Point PointB, Double& Slope, Double& Intercept)
at Steema.TeeChart.Drawing.Graphics3D.PointInLineTolerance(Point p, Int32 px, Int32 py, Int32 qx, Int32 qy, Int32 tolerance)
at Steema.TeeChart.Styles.FastLine.Clicked(Int32 x, Int32 y)
at Steema.TeeChart.Styles.Series.Clicked(Point p)
at Steema.TeeChart.Chart.CalcNeedClickedPart(Point Pos, Boolean Needed)
at Steema.TeeChart.Chart.DoMouseDown(Boolean IsDoubleClick, MouseEventArgs e, Keys Shift)
at Steema.TeeChart.TChart.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.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 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 PSES.Program.Main() in Z:\Prod_URT\ProfitSuiteEngineeringStudio\Infrastructure\PSES\Program.cs:line 25
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: