Page 1 of 1

Memory error : a big red cross

Posted: Fri Dec 14, 2007 2:31 pm
by 9640703
I have a 3d surface chart that the user can rotate. It is very nice. However, every so often (say, 1 in 100 times), when rotating the surface there is a fatal exception :

Code: Select all


************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Drawing.SafeNativeMethods.Gdip.GdipDrawLineI(HandleRef graphics, HandleRef pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
   at System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
   at Steema.TeeChart.Drawing.Graphics3DGdiPlus.Line(Int32 x0, Int32 y0, Int32 x1, Int32 y1)
   at Steema.TeeChart.Drawing.Graphics3D.ZLine(Int32 x, Int32 y, Int32 z0, Int32 z1)
   at Steema.TeeChart.Axis.AxisDraw.TicksGridDraw.DrawGridLine(Int32 tmp)
   at Steema.TeeChart.Axis.AxisDraw.TicksGridDraw.DrawGrids()
   at Steema.TeeChart.Axis.AxisDraw.TicksGridDraw.DrawTicksGrid(Int32[]& tempTicks, Int32& tempNumTicks, Double& tempValue)
   at Steema.TeeChart.Axis.AxisDraw.Draw(Boolean calcPosAxis)
   at Steema.TeeChart.Axis.Draw(Boolean calcPosAxis)
   at Steema.TeeChart.Axes.Draw(Graphics3D g)
   at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
   at Steema.TeeChart.Chart.InternalDraw(Graphics g)
   at Steema.TeeChart.TChart.Draw(Graphics g)
   at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
   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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The surface disappears and a big red cross comes up. Any ideas what I might be doing wrong?

Posted: Fri Dec 14, 2007 2:35 pm
by narcis
Hi gs,

Could you please send us a simple example project we can run "as-is", let us know the exact steps we should follow to reproduce the issue here and the exact TeeChart version you are using?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Fri Dec 14, 2007 3:03 pm
by 9640703
narcis wrote:Hi gs,

Could you please send us a simple example project we can run "as-is", let us know the exact steps we should follow to reproduce the issue here and the exact TeeChart version you are using?
Would be kind of hard - the chart is in a Excel plug-in that looks up a database, so wouldn't make any sense to you. Was just wondering if you had general ideas. I'm a little worried that it might start happening in production.

My TeeChart version is 2.0.2652.22325. I'm using C#.

Posted: Fri Dec 14, 2007 3:08 pm
by narcis
Hi gs,

Sorry but it's very difficult for us guessing which the problem can be without being able to reproduce the issue.

First of all, notice that there's a new TeeChart for .NET v2 release, which is build 2.0.2887.28039/40, available at the client's download area. You could try if this version solves the problem at your end.

If the problem persists then it would be very helpful if you could arrange a simple example project (using random data if you want) we can run "as-is" to reproduce the issue here.

Thanks in advance.

Posted: Fri Dec 14, 2007 3:35 pm
by 9640703
Fair enough. If the problem persists I'll knock together an example of what I'm doing.

Thanks for your help.