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).
Pripombe, komentarji ali pohvale o Delphi-SI.
1 prispevek • Stran 1 od 1