Bug using TeeChart .NET v3 in dialog
Posted: Wed Jan 12, 2011 4:36 pm
Dear all,
When using the latest release of TeeChart .NET v3 (build 3.5.3700.30575) and Visual Studio 2008 (9.0.30729.1 SP), I get an exception when opening a dialog with a chart on it for the second time. First time it opens okay, second time an ArgumentException is thrown ({"Parameter is not valid."}), by the looks of the stack-trace because teechart is using an invalid pointer to a graphics context. The last 4 lines of the trace say:
Yours,
André Hendriks
Deltares
When using the latest release of TeeChart .NET v3 (build 3.5.3700.30575) and Visual Studio 2008 (9.0.30729.1 SP), I get an exception when opening a dialog with a chart on it for the second time. First time it opens okay, second time an ArgumentException is thrown ({"Parameter is not valid."}), by the looks of the stack-trace because teechart is using an invalid pointer to a graphics context. The last 4 lines of the trace say:
In the attachment I have an example solution, with the chart on dialog1. Fix the reference to TeeChart, compile and just open it 2 times: the second time it will crash!at System.Drawing.Graphics.GetHdc()
at System.Drawing.BufferedGraphics.Render(Graphics target)
at System.Drawing.BufferedGraphics.Render()
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
Yours,
André Hendriks
Deltares