Page 1 of 1

Error after Printing

Posted: Thu Jul 08, 2004 10:36 am
by 8576153
Hi,
After printing a chart using the charteditor (it prints well) and closing the application dialog, debugger raises the following error:

" Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address FFF40000. Read of address FFF40000 ".

I have a printer connected and it prints fine. The problem raises when closing the application ( Close(); ).

Thank you.
Alex

Posted: Thu Jul 08, 2004 12:09 pm
by Pep
Hi Alex,

does this happens in another app. ? Have you tried to create a simple app. with an ChartEditor and do the same (Print) ?
I cannot reproduce the problem here.

Posted: Thu Jul 08, 2004 12:37 pm
by 8576153
With a simple App it does not happens.
I tried to print with:

Chart->BevelOuter = bvNone;
TColor OldColor = Chart->Color;
Chart->Color = clNone;
TMetafile *tmpMeta = Chart->TeeCreateMetafile(true,Chart->ClientRect);
try
{
Printer()->Orientation = poLandscape;
Printer()->BeginDoc();
Printer()->Canvas->StretchDraw(Rect(1,1,Printer()->PageWidth - 1,
Printer()->PageHeight - 1),tmpMeta);
Printer()->EndDoc();
}
__finally
{
delete tmpMeta;
Chart->BevelOuter = bvRaised;
Chart->Color = OldColor;
}

And the error doesn´t appear.
It only happens using Chart Editor.

Posted: Thu Jul 08, 2004 6:14 pm
by Pep
Hi Alex,

this happens in an old application ? If so, perhaps the problem is your old application is still referencing old TeeChart bpi/lib or obj files ? Before recompiling your old application, make sure it references/uses only new TeeChart packages.
If is not the case, can you post an example to the steema.public.attachments newsgroup with which I can reproduce "as-is" the problem here ?