how to access the following

Pripombe, komentarji ali pohvale o Delphi-SI.
Prispevkov: 14
Pridružen: 26.02.2004 02:04:26

how to access the following

Odgovor Napisal/-a JanezZ » 19.07.2006 11:39:34

Debugging access violations.

Debugging is a pain, especially when you get uninformative errors from the operating system. For example, a developer posted this problem: An access violation occurred when he closed his program. The following edited and partial answer demonstrates a generally useful technique.

The access violation dialog should say that an access violation happened at XXXXXX: read of address YYYYYY. Try running your program in the debugger. Pause the program and bring up the view CPU pane. In the upper left pane, right click and select Go To Address. Go to the address that caused the access violation. Look around a little bit and see if you can find where you are in the program.

Insert some breakpoints and try to close the program. When you hit a breakpoint, view the call stack and see if it gives any clues.

Glommed from borland.public.cppbuilder.language newsgroup post by Harold Howe (TeamB).