Further, access violations may be attributable to one's own code.

 

We had a form calling lots of stored procedures.  All the i's were dotted
and the t's crossed as far as three experienced developers could ascertain.
But, there were two labels in the code that were longer than 18 characters,
although neither one of them was the destination of a GOTO - they were just
for positional reference within the code.  Access violations were routine.

 

We changed two things at once, and don't really know which one fixed the
problem.  We shortened the label length and we moved the SPs into CFAs.

 

Problem solved.

 

So was it a case of the over-long labels, even though they weren't
referenced anywhere, throwing the parser a curve?  Or was there something
about all the calls to stored procedures?  The SPs work just fine as CFAs.

 

I would also add that it can be next to impossible to find an AV in TRACE.
You have to step through each and every command individually - if you hit
[F5] or [Ctrl][F5] and the AV occurs while the code is executing, you will
have no clues to where it actually occurred.  In a lengthy process,
stepping through commands one-by-one can take forever.  And TRACE does alter
the underlying landscape such that, as you note, the AV may not occur.

 

Emmitt Dove

Manager, Converting Applications Development

Evergreen Packaging, Inc.

[email protected]

(203) 214-5683 m

(203) 643-8022 o

(203) 643-8086 f

[email protected]

 

From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Thursday, July 08, 2010 12:21
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: access violation

 

<< 

I assume setting trace on will be the way to do this?

>> 

 

It's one way to help find the problem.  But be aware that certain problems
may not even occur with TRACE ON.

 

Other ways include SET ECHO ON and DEBUG WRITE statements that go to the
console or to a file.  I've even had problems where after some number of
loop iterations (say, in the 14,000 range) R:Base would simply quit, so
there was nothing left to see.  I debug those by writing a lot of "got to
this line", "got to that line" messages into a file and then checking the
file after the program crashes.

--

Larry

Reply via email to