Page 1 of 1

Access violation after new build

Posted: Tue Dec 19, 2006 12:48 pm
by 8574528
Using TeeChart Pro v6.01 Full Source in Delphi 6,

After a new build of a project which uses a form with TeeChart object, when creating the form at runtime this results in an access violation.

The way to resolve this problem is to delete all the dcu's in the source folder of TeeChart Pro and rebuild all packages with the Tee6D6.bpg. After this and a recompile of the project everything works fine.

In this projects make use of the developer express VCL suite v3 and v5 and IBObjects v4.2.Ib.

Anyone knows another solution for this problem ?

Posted: Tue Dec 19, 2006 2:04 pm
by narcis
Hi Edwin,
In this projects make use of the developer express VCL suite v3 and v5 and IBObjects v4.2.Ib.
Do those 3rd party tools use TeeChart libraries?

Posted: Tue Dec 19, 2006 2:39 pm
by 8574528
I believe DevExpress uses TeeChart libraries, cause in an earlier version (before they used an one installer installs all) there were warnings about TeeChart libraries and I could say I didn't want to use these components (ExpressPrinting system)

I will dig in and look if you need more information.

Posted: Tue Dec 19, 2006 2:59 pm
by narcis
Hi Edwin,

This shouldn't be the cause of an Access Violation but it could cause other problems as mentioned here.

Could you please send us a simple example project we can run "as-is" or post a code snippet to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Mon Jan 15, 2007 6:42 pm
by 8574528
Sorry to get back on this subject after a long period.

I tried to make an test project to achieve the same error, but could not create a project with the same error.

I installed a newer version of the DevExpress components and saw in one of the packages that use TChart components, they use complier switches to compile with the regular TChart components or the Pro components.

Even though I could not create a new 'test' project with the same error message, the project I'm experience the error with still gives an AV after a rebuild. The project is quite big and uses a very large database, so sending that project will be difficult.

To you have any other pointers where I can look to solve this problem ?

Posted: Tue Jan 16, 2007 8:30 am
by narcis
Hi Edwin,

Can you please read this thread about using TeeChart with DevExpress components? Does it have anything ot do with your problem?

Posted: Tue Jan 16, 2007 10:44 am
by 8574528
I have read the thread and as mention in my previous post, DevExpress changed there installation process to compile with TeeChart Pro when it is available.

I also excluded all DevExpress components that I don't use in the project (eg. ExpressPrintSystem and ExpressWebFramework), so I don't think that is an issue.

When I try to build a new project with all components I also use in the "problem" project and do a rebuld I don't get the error, even with all DevExpress components enabled.

With the problem project and the test project the same 6 dcu's get recompiled (Chart.pas, DBChart.pas, Series.pas, TeCanvas.pas, TeeConst.pas, TeEngine.pas and TeeProcs.pas). Only with the problem project the rebuild of these files create the AV.

When I get the error it first stops at line (9410) in the TeEngine.pas:

Code: Select all

  result:=(ASeries<>AComponent) and
          (AComponent is TChartSeries) and
          ASeries.IsValidSeriesSource(TChartSeries(AComponent));
and then at line (5834) in the TeEngine.pas:

Code: Select all

  if Assigned(DataSource) and (DataSource.Owner=Self) then
     DataSource.Free; { 5.02 }
The test project and the problem project will generate an AV after a rebuild of the problem project. If I do a rebuild of the test project after that, the AV is gone in both projects.

Do this information give you any idea where I can look (like a corrupt dpr) ?

Posted: Mon Jan 22, 2007 8:14 am
by Pep
Hi,

I'm sorry but it's really difficult to know here is the problem without being able to reproduce/debug it.
Does the error gives more info ?
Are you using runtime packages to build the app ?
You could try to debug and check the Series object just before the error happens, maybe this can help to find the problem.