System.OverflowException occured on Click Series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

System.OverflowException occured on Click Series

Post by Avijit » 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 :roll: :? .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:

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: System.OverflowException occured on Click Series

Post by Narcís » Thu Dec 03, 2009 2:55 pm

Hi Avijit,
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.,
To be able to help you we should be able to reproduce the problem here so we can debug the code and find a solution if possible. So I recommend you to check which are the differences between your program and your example project to see what makes the difference, for example: are the events assigned in the same way in both applications? If you find a consistent way to reproduce the issue we will be glad to test it here and try to help you.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

Re: System.OverflowException occured on Click Series

Post by Avijit » Tue Dec 08, 2009 9:17 am

Hi Narcís,
I tried to reproduce the problem - but with no luck.
Dont know how i can help you reproducing the problem. But it is occuring everytime in my application.
We dont have the TeeChart code package also. So i am not able to go to the location where it is crashing.
If you want, i can show you the problem from my application.
Regards,
Avijit

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: System.OverflowException occured on Click Series

Post by Narcís » Wed Dec 09, 2009 10:36 am

Hi Avijit,

You could either try to make a copy of your project and strip it down to the minimum code necessary to reproduce the issue here or create a test project similar to your application until you can reproduce the problem at your end.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply