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
locks
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
clear.
Any help would be VERY MUCH appreciated (I'm at my wits end..arrgg)
Thanks in advance to anyone who can help.