Board index » delphi » Please Help on TV run time error

Please Help on TV run time error

I am having a hell of a time finding a run time bug in a TV app I am
working on. The app is very similar to the Tutorial app in the TV
reference manual, which is to say it is a database editor program.
It stores the database records in a collection, and writes the
collection to a stream.  the differences between my program and
that in the tutorial are as follows:

My data types are not the same as used by the dialog's input fields,
so there are conversion functions to convert from, say a string type
used in an input field to an integer which is what my data file needs.

When my program loads, it checks to see if there is a data file (the
stream), and if it isn't there it creates one (by creating a collection,
sticking in one record, and then writing the record to the stream).

Other than these two items, my program is very similar to the tutorial app.
When I run the program, everything works fine.  But after I close it, it
up the system (it locks up in DOS, in Win95 it says the program
performed and illegal operation and it's closed down).  

I've been over and over my code for the last week and a ahlf trying to
figure out what I'm doing wrong, but I just can't get it.  I thought maybe
I was disposing of something that had never been initialized, but can't
find anything like that.  I looked for to make sure I was reading the same
type into the collection that I was expecting to get out of it, and can't
find anyting wrong there either.  I think i am probably overlooking
something real obvious, but I just can't seem to put my finger on it.  Is
there some technique that people use to find a bug of this sort (stepping
through the code does not help since the system crashes after the
program closes)?

Can anyone help?  If anyone is nice enough to want to look at my code, I
can say that at least it is well commented, so hopefully what I'm doing is

Any help would be VERY MUCH appreciated (I'm at my wits end..arrgg)

Thanks in advance to anyone who can help.


Re:Please Help on TV run time error

In article <01bc3002$be55e7a0$> of Thu, 13 Mar
1997 23:06:57 in comp.lang.pascal.borland, "Mike N."

<> wrote:
>I am having a hell of a time finding a run time bug in a TV app I am
>working on.

Try the TV newsgroup.

Try cutting your program down in size, by repeatedly removing bits that
you think are OK & retesting.

As the fault may be due to the combined effect of two bits, you need to
be careful.

If removing a bit leaves the fault, then you don't need the bit in your
subsequent tests.

If removing a bit clears the fault, then the bit presumably had
something to do with it.

I don't recall the details, but I do know that I once reduced a many-
page program to a single line of executable code in finding a fault - in
this case, a serial card was improperly decoding its address lines and
was responding in some manner (as well as when it should) to the
statement y := sqrt(2.0) ;
John Stockton, Surrey, UK.    Turnpike v1.12    MIME.
  Web URL: -- includes FAQqish topics and links.
  Standard signature separator is as above, a line comprising "-- " (SoRFC1036)
  Standard quoter : ">" / "> " recognised by most good news readers (SoRFC1036)

Other Threads