Page 1 of 1

Access violation by using TeeChartPro v7.07 and ODAC

Posted: Thu Aug 03, 2006 6:20 am
by 9346235
Hi,

We have an application with C++ Bulder 6 which is using TeeChartPro v7.07 and BDE (to an Oracle database).
We want to get rid of the BDE (Borland had stopped with BDE). Now we want to use ODAC (Core Lab) or DOA (allroundautomation).
When we are going to use other database components than BDE we get an application error when we close the application.
This is an "Access Violation" error.
We can only eliminate the error by deleting all VCL from TeeChart in the application. But then we have an application without graphics.

Is there anyone who has also simular problems.
Please let me know, because it is very frustrating.

Best regards,

Ruud Reinders

Posted: Thu Aug 03, 2006 8:58 am
by Pep
Hi Ruud,

in order to try to find where the problem is, we're going to need a simple example with which we can reproduce "as is" the problem as is here. Could you please post an example at news://www.steema.net/steema.public.attachments newsgroup ?

Posted: Thu Aug 03, 2006 9:33 am
by 9346235
Hi Josep,

I think that is a problem. I can send you the complete application, but I don't think you can run it because it needs an oracle database with correct schema and tables.
Do you think you can use the complete application for investigating??

Kind regards,

Ruud Reinders

Posted: Thu Aug 03, 2006 9:51 am
by Pep
Hi Ruud,

yes, you're correct, it could be difficult to find the problem without having oracle, schemas, etc...
Well, we could try some things before check the complete app.

Which is the complete error you're getting ?
Could you please try to free all Series just before the app. is closed ? using :

Code: Select all

1) Chart1.FreeAllSeries(nil) method
or
2)
var tmpSeries : TChartSeries;
begin
  While Chart1.SeriesList.Count > 0 do
  begin
    tmpSeries := Chart1.Series[0];
    tmpSeries.ParentChart := nil;
    tmpSeries.Free;
  end;
end;

Posted: Thu Aug 03, 2006 12:15 pm
by 9346235
Hi Josep,

It seems like you have the problem solved!!!!!
I've added the following code in the FormClose section:

TChartSeries *tmpSeries;

while ( theDBChart->SeriesList->Count > 0 )
{
tmpSeries = theDBChart->Series[0];
tmpSeries->ParentChart = 0;
tmpSeries->Free();
}

And this we do for every DBChart in the application.
Now the access violation has disappeard !!!!!!!!
But I think it is a bug in release 7.07.
Because every visual component in the application should do a clean "garbage collection" on closing the application.
How is your opinion about this ????

Kind regards,

Ruud Reinders

Posted: Fri Aug 04, 2006 9:28 am
by Pep
Hi Ruud,

I'm glad to know that works.
Yes, I'm with you, it seems to be a bug, they should be freed automatically. Knowing this we'll review the source in order to find where the bug is.

Posted: Fri Aug 04, 2006 10:49 am
by 9346235
Hi Josep,

Thank you for replying.
It is great that the problem is solved for me.

Kind regards,

Ruud Reinders