0xC0000005: Access Violation. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

0xC0000005: Access Violation.

se404008se404008 Posts: 20Member
Hi,

I am getting the following error 0xC0000005: Access Violation., is there is a reason why I am getting, my code compiles correctly but at run time, is it something to do with memory?

Alan

Comments

  • tom_swtom_sw Posts: 828Member
    : Hi,
    :
    : I am getting the following error 0xC0000005: Access Violation., is there is a reason why I am getting, my code compiles correctly but at run time, is it something to do with memory?
    :
    : Alan
    :
    Yes, it is a memory access violation. Try stepping through your code to see where the error occurs. Does it happen on some use of a pointer? Maybe you haven't initialized that pointer correctly.
  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : : Hi,
    : :
    : : I am getting the following error 0xC0000005: Access Violation., is there is a reason why I am getting, my code compiles correctly but at run time, is it something to do with memory?
    : :
    : : Alan
    : :
    : Yes, it is a memory access violation. Try stepping through your code to see where the error occurs. Does it happen on some use of a pointer? Maybe you haven't initialized that pointer correctly.
    :
    [blue]Run it in debugger and it will automatically point out which variable causing this.[/blue]
  • carloskkkcarloskkk Posts: 1Member
    I've the same problem. In my case the error occures in very strange (for me) place because when the program leves one of the functions (the "}" sign). The function job is to create a file, and the file created by the function before the error takes place is good. So the function finished the job perfectly but while exiting I see the 0xC0000005: Access Violation and I don't have any idea how to deal with it... please help me :)

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : I've the same problem. In my case the error occures in very strange (for me) place because when the program leves one of the functions (the "}" sign). The function job is to create a file, and the file created by the function before the error takes place is good. So the function finished the job perfectly but while exiting I see the 0xC0000005: Access Violation and I don't have any idea how to deal with it... please help me :)
    :
    :
    [blue]Did you run it in debugger? When debugger stops on a violation - check the call stack and open every file until you see your code.[/blue]
  • m_gawandem_gawande Posts: 1Member
    : : I've the same problem. In my case the error occures in very strange (for me) place because when the program leves one of the functions (the "}" sign). The function job is to create a file, and the file created by the function before the error takes place is good. So the function finished the job perfectly but while exiting I see the 0xC0000005: Access Violation and I don't have any idea how to deal with it... please help me :)
    : :
    : :
    : [blue]Did you run it in debugger? When debugger stops on a violation
    : - check the call stack and open every file until you see your
    : code.[/blue]
    :
    I had a similar experience. The error occured when a routine tried returning to the calling function. In my case, the call stack helped in an indirect way. The error (which turned out to be exceeding declared bounds of an array) caused the stack to disappear. So, by wathcing the stack whiled I stepped through my program, I was able to track the statement at which the stack disappeared.
  • dskvdskv Posts: 2Member
    I have a similar issue. I moved my code from an windows 2000 VB 2006 to Windows 7 VB 2010. Code compiles fine but the error occurs when a HASP check is performed. I can comment that function out but then my security check is checked. What could the problem be? Went back to check if everything works on the win2000 machine and code compiles and runs correctly.
    The executable from win200 compiled code works fine on win7 but the executable that is generated in win7 errors out.
Sign In or Register to comment.