We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Crash on mouse click during Chart Load

Thread ID:

Created:

Updated:

Platform:

Replies:

31748 Jul 13,2005 02:09 PM Sep 21,2006 05:35 AM Windows Forms 16
loading
Tags: Chart
Administrator [Syncfusion]
Asked On July 13, 2005 02:09 PM

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\n at Syncfusion.Windows.Forms.Chart.ChartControl.ChartControl_MouseDown(Object sender, MouseEventArgs e)\r\n at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)\r\n at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.Run(Form mainForm)\r\n 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.

Administrator [Syncfusion]
Replied On July 16, 2005 01:44 AM

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

Haddon Kirk
Replied On July 18, 2005 08:32 AM

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 > >

Haddon Kirk
Replied On July 18, 2005 08:49 AM

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).

Haddon Kirk
Replied On July 18, 2005 06:19 PM

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.

Administrator [Syncfusion]
Replied On July 19, 2005 07:27 AM

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

Administrator [Syncfusion]
Replied On July 19, 2005 09:07 AM

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

Administrator [Syncfusion]
Replied On July 21, 2005 08:19 AM

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

newbie
Replied On September 18, 2006 11:15 AM

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

Administrator [Syncfusion]
Replied On September 19, 2006 03:14 AM


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

Administrator [Syncfusion]
Replied On September 19, 2006 03:15 AM

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

Administrator [Syncfusion]
Replied On September 19, 2006 03:29 AM

Hi Jaya.

I''m using Essential Chart 4.2.0.37.

Regards

Administrator [Syncfusion]
Replied On September 19, 2006 05:43 AM


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

Administrator [Syncfusion]
Replied On September 19, 2006 09:21 AM

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

Administrator [Syncfusion]
Replied On September 21, 2006 02:09 AM



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

Administrator [Syncfusion]
Replied On September 21, 2006 04:09 AM

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

Administrator [Syncfusion]
Replied On September 21, 2006 05:35 AM


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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;