INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Access Violation on close of application

Access Violation on close of application

(OP)
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

RE: Access Violation on close of application

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!

RE: Access Violation on close of application

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.

http://madshi.net/madExceptDescription.htm

RE: Access Violation on close of application

(OP)
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.

RE: Access Violation on close of application

(OP)
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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close