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!

Access Violation on close of application

Status
Not open for further replies.

DeniseBDA

Programmer
May 28, 2012
6
BM
Hi there,
I'm using Delphi XE2 update 4 hotfix 1. We keep getting "access violation in module 'appname.exe' at 00052C21. Access violation at address 00452C21 in module 'appname.exe'. Read of address 00000000" It occurs when the app is closing. It doesn't happen every single time. We seem to believe it has something to do with the CXGrid. Could someone shed a little light on this. Even some tips to try to decifer this msg. I'm afraid to admit that the call stack and I don't seem to jive but I'm pulling my hair out.
thanks for any and all help
Denise
 
read of address 00000 means that you are accessing a null (nil) pointer, this could be a an object that has already been freed (or never has been created).
Without seeing code it's hard to guess where the problem lies. Try to step with the debugger and simulate the problem...

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Download and install MADExcept. IIRC, you can use it to debug your application for free as long as you disable the support before you publish your application. When you get an error like this is can sometimes point you to the exact line of code causing the problem.

 
Thanks for the advice. Stepping through doesn't help me. I go all the way to the System unit and of course once I step through I don't get the AV. Just running it causes an error after opening and closing the app a few times. I do notice in the event log that not all the modules are unloaded or there are multiple instances of the dll's loaded. Should all dll's loaded have an unload? In the meantime I'll try the MadExcept.
 
Looking into it a little more I noticed in the even log that the access violation occurrs just before it tries to load an instance of the ole32.dll. When the app runs smoothly it loads and unloads the oil32.dll. Is this just a fluke?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top