P
Peter Row
Hi,
I know this may be a bit off topic since it is really a Teechart.net issue
but I am at my wits end, a total hair pulling to baldness moment.
I have a windows application that uses Teechart to plot several lines
(highly simplified but that's the jist of it). All is fine, the form that
this is on has buttons to allow you zoom in and out etc... However when the
user/developer starts scrolling about and zooming in/out things they get
NullReferenceException crashes. Here is the stack from a crash:
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object.
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.ClipRectangle(Rectangle r)
at Steema.TeeChart.Drawing.Graphics3D.ClipRectangle(Int32 left, Int32
top, Int32 right, Int32 bottom)
at Steema.TeeChart.Drawing.Graphics3D.ClipCube(Rectangle rect, Int32
minZ, Int32 maxZ)
at Steema.TeeChart.Styles.Series.ClipRegionCreate(Boolean& ActiveRegion)
at Steema.TeeChart.Styles.Series.DrawSeries()
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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at SystemThe thread '<No Name>' (0x16e8) has exited with code 0 (0x0).
The crash is really hard to reproduce. Some of the other developers in the
team never see the problem. I have tried using the source code for teechart
in my solution but it never stops on break points in the code indicated by
the stack above.
One way I use to reproduce the crash is to zoom in twice, and then alternate
between maximising and restoring the form hosting it until it crashes.
Sometimes I only have to max/restore the form once to cause the crash, other
times I have to do it 20 times.
I have tried various different versions of TeeChart.NET, running the debug
EXE of the application and then attaching the VS debugger to the process,
debugging the TeeChart source etc... etc...
I am using VS 2003 with v1.1 of the .NET runtime on XP Pro SP2, the language
used throughout is C#.
Anybody else have any problems with TeeChart when resizing?
Regards,
Peter
I know this may be a bit off topic since it is really a Teechart.net issue
but I am at my wits end, a total hair pulling to baldness moment.
I have a windows application that uses Teechart to plot several lines
(highly simplified but that's the jist of it). All is fine, the form that
this is on has buttons to allow you zoom in and out etc... However when the
user/developer starts scrolling about and zooming in/out things they get
NullReferenceException crashes. Here is the stack from a crash:
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object.
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.ClipRectangle(Rectangle r)
at Steema.TeeChart.Drawing.Graphics3D.ClipRectangle(Int32 left, Int32
top, Int32 right, Int32 bottom)
at Steema.TeeChart.Drawing.Graphics3D.ClipCube(Rectangle rect, Int32
minZ, Int32 maxZ)
at Steema.TeeChart.Styles.Series.ClipRegionCreate(Boolean& ActiveRegion)
at Steema.TeeChart.Styles.Series.DrawSeries()
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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at SystemThe thread '<No Name>' (0x16e8) has exited with code 0 (0x0).
The crash is really hard to reproduce. Some of the other developers in the
team never see the problem. I have tried using the source code for teechart
in my solution but it never stops on break points in the code indicated by
the stack above.
One way I use to reproduce the crash is to zoom in twice, and then alternate
between maximising and restoring the form hosting it until it crashes.
Sometimes I only have to max/restore the form once to cause the crash, other
times I have to do it 20 times.
I have tried various different versions of TeeChart.NET, running the debug
EXE of the application and then attaching the VS debugger to the process,
debugging the TeeChart source etc... etc...
I am using VS 2003 with v1.1 of the .NET runtime on XP Pro SP2, the language
used throughout is C#.
Anybody else have any problems with TeeChart when resizing?
Regards,
Peter