TMarkTools causes Access Violation Error if Series is empty

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
easyblue
Newbie
Newbie
Posts: 10
Joined: Wed Jan 04, 2012 12:00 am

TMarkTools causes Access Violation Error if Series is empty

Post by easyblue » Wed Feb 08, 2012 2:49 pm

Hello

TeeChart2011.04.41118+BDS2006

with following project, whenever I move the mouse over the TChart, there will be access violation unless I disable the TMarkTools, or the series is not empty.

Steps:
1. Drop a TChart to the Form
2. Double click the Chart, and add an AreaSeries at design time
3. Double click the chart, and add a TMarkTool
4. in Form OnCreate event, have following code:

procedure TForm2.FormCreate(Sender: TObject);
var
AreaSeries: TAreaSeries;
begin
AreaSeries:=TAreaSeries.Create(Self);
AreaSeries.ParentChart :=Chart1;
AreaSeries.FillSampleValues(5);
AreaSeries.Marks.Visible :=False;
AreaSeries.LinePen.Visible :=False;
AreaSeries.AreaLinesPen.Visible := False;
AreaSeries.LinePen.Visible := False;
AreaSeries.MultiArea := maStacked;
end;


Run the application, and move the mouse, then you will have access violation error.

The reason for an empty series at step2 is that in the real situation, the series are linked to a source of TDataSet, who might be empty, where the problem is actually happened.

Detail please find in attachment. It contain the source code and also the exception call stack caught by Eurekalog.
Attachments
bug.zip
(13.26 KiB) Downloaded 309 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TMarkTools causes Access Violation Error if Series is empty

Post by Yeray » Thu Feb 09, 2012 1:23 pm

Hi,

I could reproduce it and found where the problem was. I've fixed it for the next maintenance release (TV52016025).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

easyblue
Newbie
Newbie
Posts: 10
Joined: Wed Jan 04, 2012 12:00 am

Re: TMarkTools causes Access Violation Error if Series is empty

Post by easyblue » Sun Feb 12, 2012 1:29 pm

When the update will be released?

We have to deliver our SW by the end of Feb. Can we have the update of TeeChart by then?

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TMarkTools causes Access Violation Error if Series is empty

Post by Yeray » Mon Feb 13, 2012 10:37 am

Hi,

I don't think we'll publish a maintenance release this month. However, as the fix is simple, if you are source code customer you can apply it yourself.
The line 1653 in Series.pas says:

Code: Select all

    if (Index>=tmpFirst) and ClickableLine then
Change it for:

Code: Select all

    if (Index>tmpFirst) and ClickableLine then
If you are not a source code customer, just tell us and we'll study if we can prepare a release for you.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

easyblue
Newbie
Newbie
Posts: 10
Joined: Wed Jan 04, 2012 12:00 am

Re: TMarkTools causes Access Violation Error if Series is empty

Post by easyblue » Tue Feb 14, 2012 1:42 am

bug solved.

Thanks.

Post Reply