Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging and Access Violations

Status
Not open for further replies.

Canderel

Programmer
Apr 6, 2004
21
0
0
ZA
I have a program that is supposed to run infinately. After about a week I get an access violation (not predictable a week).

Is there any way that the information from the error report can actually help me to debug it, and if so how?

I inherited the code, so I my understanding of the program is limited.

o__
,_.>/ _
(_)_\(_)_______
..speed is good
 
Sounds like a leak somewhere. Have you tried Dr. Watson on it?


James P. Cottingham
[sup]
There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
[/sup]
 
No, I have no experience with Dr Watson. How do I use it?

One thing though, this is the same application that previously was run for weeks on end on a NT 4 machine, and now that it is upgraded (with some other modifications as well) to 2k it is bugging.

But please explain Dr Watson to me, I know about it's existance, but that is about as far as it goes.

o__
,_.>/ _
(_)_\(_)_______
..speed is good
 
Dr. Watson is a standard Windows program. Check your help files. Make sure you have logging on. When the problem errors out, Dr. Watson should see it and log where in the program the error occured. The difficult problem with Dr. Watson is the location is in hex so you may have to do some work to find the exact location.

I suspect that something in the program was written with NT4 in mind and with the change in W2K's method of memory handling, something is coming in conflict. (My [limited] understanding is that W2K's change was supposed to make it less prone to BSOD.) Just out of curiosity, is something scheduled to run when the program bombs?

It might not even be your program's fault. It may be that another program is running on W2K that was not running on NT4. This may be the root cause and your program is getting the "short end of the stick."



James P. Cottingham
[sup]
There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
[/sup]
 
To my knowledge, this program does not have a great amount of things that happens when it bombs, usual cleanup (if it ever gets there?) because the program is supposed to always be running, the original programmer included quite a lot security code to make it hard for the program to quit.

Is the kind of data that Dr. Watson gives something to this effect:
"Access violation at address 00421C79 in module 'EMAC.EXE'. Read of address CA921FDC". ?

And if I have this, how can I get to know where in the program this is happening?

o__
,_.>/ _
(_)_\(_)_______
..speed is good
 
Yes, that is it. Look at your help file on "Using the Dr. Watson log file" on how to interpret the log. It will give you more info than I can.


James P. Cottingham
[sup]
There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
[/sup]
 
Thanks, now I at least know where to start.


o__
,_.>/ _
(_)_\(_)_______
..speed is good
 
What about Code Guard? Do you have that? It might work better than Dr. Watson, but you still have the problem of dealing understanding the log it produces. I don't quite understand it myself. Does anybody know of a reference with information on how to use and understand Code Guard?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top