Hi,
My GUI allows users to select data to graph and then click "Graph" to load up a seperate form with chart. If you click "Graph" and then click again anywhere the area the chart is being loaded...the program crashes with error trace
at System.Collections.ArrayList.get_Item(Int32 index)
at Syncfusion.Windows.Forms.Chart.ChartControl.GetChartRegion(Int32 index)
at Syncfusion.Windows.Forms.Chart.ChartControl.GetChartRegionFromPoint(Point pt)\r at Syncfusion.Windows.Forms.Chart.ChartControl.ChartControl_MouseDown(Object sender, MouseEventArgs e)\r at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)\r at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)\r at System.Windows.Forms.Control.WndProc(Message& m)\r at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)\r at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)\r at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)\r at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r at System.Windows.Forms.Application.Run(Form mainForm)\r at PacsGraph.bonds.Main(String[] args) in p:\\pacsgraph\\bonds.cs:line 521"
The error only occurs during load...once the chart is fully visible, clicks do no harm
Thanks for you help.
HK
Haddon Kirk
July 18, 2005 12:32 PM UTC
Davis,
Thanks for your help. I do not get the problem with the sample, but the sample does not reproduce my situation.
One windows form includes an Essential Grid control and allows users to select the data they wish to view. When they click "Graph" a totally separate Windows form, including an Essential Chart control, loads. As soon as "Graph" is clicked, the second form begins to load, but the Chart takes a few seconds to draw itself.
Anytime during this period between clicking "Graph" on one form, and the time that the Chart, on a separate form, is finished loading/drawing and fully visible, a click inside the area where the finished Chart would appear causes the program to crash with the previous error message/stack trace.
I am not handling MouseDown, but have tried to handle it in order to prevent this error. The MouseDown event is not recognized, however, until the Chart is fully loaded and visible. While the Chart is loading, the debug break point placed in MouseDown is not reached, and the program crashes on a click inside the ChartArea.
>Hi Haddon,
>
>I tried reproducing the problem with sample linked to below.
>
>
http://www.syncfusion.com/support/user/Uploads/ChartLoadingClick_F31748_221.zip
>
>Are you handling the ChartControl''s MouseDown event? Please try the above sample and let us know if you see the exception.
>
>Thanks,
>
>Davis
>
>
HK
Haddon Kirk
July 18, 2005 12:49 PM UTC
Davis,
I have now gotten the same error with the sample. If I wait until the form appears but before the Chart is visible and click inside the Chart area, I get the same error. It takes pretty good timing, as this sample does not take as much time to load as some of my graphs. But, if you catch it at the right moment, you may see the error too.
The error again is:
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Syncfusion.Windows.Forms.Chart.ChartControl.GetChartRegion(Int32 index)
at Syncfusion.Windows.Forms.Chart.ChartControl.GetChartRegionFromPoint(Point pt)
at Syncfusion.Windows.Forms.Chart.ChartControl.ChartControl_MouseDown(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.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.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Syncfusion.Windows.Forms.Chart.Samples.FormMain.Main() in C:\WINDOWS\desktop\test\ChartLoadingClick\Form1.cs:line 193The program ''[2744] ChartLoadingClick.exe'' has exited with code 0 (0x0).
HK
Haddon Kirk
July 18, 2005 10:19 PM UTC
Just to clarify:
The error occurs in the sample during initial load after pressing the "start" button in Visual C# .NET.
1. Press "start"
2. Position your mouse in the area of the screen that will be occupied by the Chart control. (If you make the size of the Chart bigger, this is easier).
3. When the form begins to load (for me, I can see the item appear in the taskbar at the bottom of the screen) click inside the area.
When I do this before the chart is visible, your sample crashes.
AD
Administrator
Syncfusion Team
July 19, 2005 11:27 AM UTC
Hi Haddon,
Thanks for the detailed information. I have tried to reproduce the problem and was unable to do so. However, I can see the code in ChartControl.GetChartRegion that could cause this problem. I have changed the source to fix this issue. This fis should be included in the next available version.
Thanks,
Davis
AD
Administrator
Syncfusion Team
July 19, 2005 01:07 PM UTC
Davis,
Thanks so much for your help. I was wondering if there might be a temporary fix, i.e. some way to trap this error when it occurs? Handling MouseDown doesn''t seem to work, but it would be nice if there was a way to at least prevent the program from crashing. Thanks again.
Haddon
>Hi Haddon,
>
>Thanks for the detailed information. I have tried to reproduce the problem and was unable to do so. However, I can see the code in ChartControl.GetChartRegion that could cause this problem. I have changed the source to fix this issue. This fis should be included in the next available version.
>
>Thanks,
>
>Davis
AD
Administrator
Syncfusion Team
July 21, 2005 12:19 PM UTC
Hi Haddon,
Unfortunately, there is no way to prevent this error without modifying the source. The next version will be available within the next few days.
Thank you for your patience.
Regards,
Davis
NE
newbie
September 18, 2006 03:15 PM UTC
Hi,
the problem still exists today September 2006.
Any news for the old fix?
>Hi Haddon,
>
>Unfortunately, there is no way to prevent this error without modifying the source. The next version will be available within the next few days.
>
>Thank you for your patience.
>
>Regards,
>
>Davis
AD
Administrator
Syncfusion Team
September 19, 2006 07:14 AM UTC
Hi Newbie,
Thanks for the update.
Could you please let me know the current version of Essential Chart you are using?
Thank you for your continued interest in Syncfusion products.
Regards,
Jaya
AD
Administrator
Syncfusion Team
September 19, 2006 07:15 AM UTC
Hi Newbie,
Thanks for the update.
Could you please let me know the current version of Essential Chart you are using?
Thank you for your continued interest in Syncfusion products.
Regards,
Jaya
AD
Administrator
Syncfusion Team
September 19, 2006 07:29 AM UTC
Hi Jaya.
I''m using Essential Chart 4.2.0.37.
Regards
AD
Administrator
Syncfusion Team
September 19, 2006 09:43 AM UTC
Hi Newbie,
I was not able to reproduce the mentioned issue in the version 4.2.0.37 with the sample attached in the previous post.
Could you please send me the another sample which reproduces the issue so that it will be easy for me to find the solution at the earliest.
Thank you for your patience.
Regards,
Jaya
AD
Administrator
Syncfusion Team
September 19, 2006 01:21 PM UTC
I''ve modified the prevoius sample.
In the sample attached, when the form is loaded, try to triple click on the chart region and you can see the crash.
Regards,
Newbie
ChartLoadingClick.zip
AD
Administrator
Syncfusion Team
September 21, 2006 06:09 AM UTC
Hi Newbie,
I was able to reproduce the mentioned issue.
I will create a bug report on this regard with topmost priority and let you know at the earliest once it is fixed.
Thank you for your patience.
Regards,
Jaya
AD
Administrator
Syncfusion Team
September 21, 2006 08:09 AM UTC
Hi Jaya,
thanks in advance for your support, we will look forward to a fixed version.
(We have also bought the source code in case a quick fix will be possible from there)
Mauro
AD
Administrator
Syncfusion Team
September 21, 2006 09:35 AM UTC
Hi Newbie,
I created a bug report on this regard with topmost priority.
You can also view the status of the same in the following link :
http://www.syncfusion.com/support/issues/chart/Default.aspx?ToDo=view&questId=2720
Thank you for your continued interest in Syncfusion products.
Regards,
Jaya