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. Image for the cookie policy date
close icon

OutOfMemoryException from Chart Control

My application uses a chart control to display some data and it sometimes gives an OutOfMemoryException.

One case I've seen this is when my application is trying to draw a single series with 27 points (all of which are the same).

Below is the stack from the error, any help would be appreciated.

System.OutOfMemoryException: Out of memory.
at System.Drawing.Drawing2D.GraphicsPath.Widen(Pen pen, Matrix matrix, Single flatness)
at System.Drawing.Drawing2D.GraphicsPath.Widen(Pen pen)
at Syncfusion.Windows.Forms.Chart.Renderers.LineRenderer.Render(Graphics g)
at Syncfusion.Windows.Forms.Chart.ChartSeriesCollection.DrawSeries(Graphics g, IChartAreaHost chart)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw2D(PaintEventArgs e, ChartPaintFlags flags)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e, ChartPaintFlags flags)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e)
at Syncfusion.Windows.Forms.Chart.ChartControl._Paint(Graphics g, Rectangle r)
at Syncfusion.Windows.Forms.Chart.ChartControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
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.SafeNativeMethods.UpdateWindow(HandleRef hWnd)
at System.Windows.Forms.Control.Update()
at Syncfusion.Windows.Forms.Tools.TreeNodeAdv.UpdateCustomConrtol()
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.Draw(PaintEventArgs e)
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WmPaint(Message& msg)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Tools.TreeViewAdv.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)

5 Replies

RF Rashidha F Syncfusion Team June 22, 2007 06:55 AM UTC

Hi Dan,

Sorry for the inconvenience caused.

I am not able to reproduce this issue which you have mentioned in the previous update. You can download the sample from the below given Webpage link,

http://websamples.syncfusion.com/samples/Chart.Windows/F62760/main.htm

Could you please modify the above sample which reproduces the issue that you mentioned here, so that it would help me in analyzing the issue?

Thanks for your patience.

Regards,
Rashidha.


DS Dan Searle June 22, 2007 08:39 AM UTC

This modification to your sample gives me the exception.

Hope that helps you diagnose it.

LineChart12.zip


RF Rashidha F Syncfusion Team June 22, 2007 09:32 AM UTC

Hi Dan,

Sorry for the inconvenience caused.

Thanks for bringing this issue to our attention. I was able to reproduce the issue using the condition that you have mentioned here.

Could you please open a DirectTrac incident with regard to this with the Forum ID and Title of the Forum in the subject of the incident, so that we could log a bug report with regard to this issue and follow up you in the incident with the details regarding this defect.

Regards,
Rashidha.


JP Justin Pauley July 17, 2007 05:42 PM UTC

Could you please let us know if you have solved this and how? I want to make sure this is solved before attempting it myself.

>Hi Dan,

Sorry for the inconvenience caused.

Thanks for bringing this issue to our attention. I was able to reproduce the issue using the condition that you have mentioned here.

Could you please open a DirectTrac incident with regard to this with the Forum ID and Title of the Forum in the subject of the incident, so that we could log a bug report with regard to this issue and follow up you in the incident with the details regarding this defect.

Regards,
Rashidha.


RF Rashidha F Syncfusion Team July 18, 2007 12:06 PM UTC

Hi Justin,

We regret to inform you that this issue is not yet addressed. To facilitate tracking the progress of the fix, and timely resolution, we request you to create a new incident database Direct Trac. Our development team would be able to determine the fix and alert you with the service pack download details as soon as they are made available.

Thanks for your patience.

Regards,
Rashidha

Loader.
Live Chat Icon For mobile
Up arrow icon