Datasource fault

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
matthewj
Newbie
Newbie
Posts: 1
Joined: Wed May 04, 2005 4:00 am

Datasource fault

Post by matthewj » Wed May 17, 2006 3:29 pm

I've found a bug in the 7.07 (and previous) series code. Most people won't hit it, but I was being clever and got bitten.

The problem is that when you set a DataSource for a series, the InternalAddDataSource function calls Value.FreeNotification(Self) which is fine if the TDataSet is deleted first, but not if the series is deleted first. The series never calls RemoveNotification on destruction (if the datasource is still valid of course), which means that a dynamically created series and datasource are destined to blow up an app if they are destroyed in the wrong order. Which my code was doing.

Now, I can work around this, but it is a serious fault IMO, and should be rectified in 7.08. I've spent all day tracking this down, and for dynamic datasets it could be a big issue if multiple charts on different forms are linked to the same dataset.

Matthew

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue May 23, 2006 8:29 am

Hi Matthew,

many thanks for the advise, we'll review this and will try to change the behavior for the next releases.

Post Reply