Page 1 of 1

Datasource fault

Posted: Wed May 17, 2006 3:29 pm
by 9341805
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

Posted: Tue May 23, 2006 8:29 am
by Pep
Hi Matthew,

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