Article View: borland.public.cppbuilder.nativeapi
Article #17646Re: Access Violation ERROR! Help me!
From: Stephan
Date: Fri, 07 Mar 2003 21:30
Date: Fri, 07 Mar 2003 21:30
75 lines
3256 bytes
3256 bytes
Hi,
I am not a "guru" enough to look at code and ID problem
without studying it, but errors of this kind often are caused
by trying to access or write and indexed variable beyond
what is legal... such as an index of "0" when the indexing
starts at "1"
to help troubleshoot, I usually test one of the loop variables
and execute a "do nothing" statement on some conditional.
Then, I put a breakpoint.
If the code breaks there, without causing the error, I change the value of
the
test until I get the error.
hope this helps
have fun
Stephan
"Tuga" <nuno@paquete.dynu.com> wrote in message
news:3e690548@newsgroups.borland.com...
Thanks for reply.
I think this hapens because i try to print out of the print area.
Take a look please.
I've got this code:
dtsRelCustos->DataSet->First();
for(i=0; i<dtsRelCustos->DataSet->RecordCount; i++)
{
iStartX = 70;
for(j=0; j<dtsRelCustos->DataSet->FieldCount; j++)
{
linha = dtsRelCustos->DataSet->Fields->Fields[j]->Text;
Printer()->Canvas->TextOut(iStartX,iStartY+iLineHeight*iLineNumber-1,
linha);
if(len[j]>15) // This is justo to format the alinment of the
text.
iStartX += (len[j] * 25);
else
iStartX += (len[j] * 30);
}
if(Printer()->Canvas->PenPos.y+2*iLineHeight >=
Printer()->PageHeight)
{
Printer()->NewPage();
iLineNumber = 3;
}
else
{
iLineNumber++;
}
linha = "";
if(i<dtsRelCustos->DataSet->RecordCount - 1)
dtsRelCustos->DataSet->Next();
}
What's the problem?
"JD" <nospam@nospam.com> escreveu na mensagem
news:3e61e7bd$1@newsgroups.borland.com...
>
> "Tuga" <nmp@ispgaya.pt> wrote:
> > When i try to print i receive an error like this:
> >
> > Access violation at adress 325025E0 in module 'CC3250mt.dll'.
> > Write of adress 00000008. But the printers prints anyway.
>
> I'm simply not hip to what the error message means but what
> ever the case, someone will most likely need to see your code
> to track it down.
>
> ~ JD
>
Technical Details
Message-ID:
<3e690f58$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e5fd484@newsgroups.borland.com> <3e61e7bd$1@newsgroups.borland.com> <3e690548@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c1110153f4f88ad7 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-07 13:33:44 PST From: "Stephan" <slaska@devarinc.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e5fd484@newsgroups.borland.com> <3e61e7bd$1@newsgroups.borland.com> <3e690548@newsgroups.borland.com> Subject: Re: Access Violation ERROR! Help me! Date: Fri, 7 Mar 2003 16:30:07 -0500 Lines: 79 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 64.252.14.74 Message-ID: <3e690f58$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047072600 64.252.14.74 (7 Mar 2003 13:30:00 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail