當一個(gè)運行期A(yíng)ccess violation出現時(shí),你的用戶(hù)得到的錯誤信息類(lèi)似于如下情況:
Access violation at address <十六進(jìn)制值>
in module <應用程序名>
Read of address <十六進(jìn)制值>
如果你在Debugger選項窗口使“Stop on Delphi Exceptions”生效,那么就會(huì )彈出下面的信息:
The message states that the EAccessViolation has occurred. The EAccessViolation is the exception class for invalid memory access errors.
這是你在設計程序時(shí)將會(huì )看到的信息,下一個(gè)信息框將會(huì )出現,然后程序失敗了:
Access violation at address 0043F193
in module ’Project1.exe’
Read of address 000000.