Skybuck Flying
2015-02-21 00:26:47 UTC
Hello,
To re-produce Delphi XE 7 TChart problem/access violation:
Add a TChart to a form.
Add two buttons
add VCLTee.Series to uses clausule:
uses
...,
VCLTee.Series;
Following code causes access violation:
procedure TForm1.Button1Click(Sender: TObject);
var
vLineSeries : TLineSeries;
begin
vLineSeries := TLineSeries.Create( Chart1 );
Chart1.AddSeries(vLineSeries);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Chart1.RemoveAllSeries;
end;
Press Button1 a couple of times.
Press Button2 a couple of times.
Press Button1 a couple of times.
Press Button2 a couple of times.
Then hold Button2... and move mouse across TChart... then let Button2 go.
Thus:
Once the mouse is hovering over the TChart and the button2/remove is called
an access violation occurs ?!
How to solve this problem ?
(I suspect the line selection feature might be causing an access violation,
maybe it's expecting lines or something, or something else is causing it
within TChart).
Suggestions for working-work-arounds are welcome !!!
(Also let me know if the code above is somehow flawed ?!?)
Bye,
Skybuck.
To re-produce Delphi XE 7 TChart problem/access violation:
Add a TChart to a form.
Add two buttons
add VCLTee.Series to uses clausule:
uses
...,
VCLTee.Series;
Following code causes access violation:
procedure TForm1.Button1Click(Sender: TObject);
var
vLineSeries : TLineSeries;
begin
vLineSeries := TLineSeries.Create( Chart1 );
Chart1.AddSeries(vLineSeries);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Chart1.RemoveAllSeries;
end;
Press Button1 a couple of times.
Press Button2 a couple of times.
Press Button1 a couple of times.
Press Button2 a couple of times.
Then hold Button2... and move mouse across TChart... then let Button2 go.
Thus:
Once the mouse is hovering over the TChart and the button2/remove is called
an access violation occurs ?!
How to solve this problem ?
(I suspect the line selection feature might be causing an access violation,
maybe it's expecting lines or something, or something else is causing it
within TChart).
Suggestions for working-work-arounds are welcome !!!
(Also let me know if the code above is somehow flawed ?!?)
Bye,
Skybuck.