C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28384
Number of posts: 94256

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
0xC0000005: Access Violation. Posted by se404008 on 14 Dec 2004 at 4:53 AM
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
Report
Re: 0xC0000005: Access Violation. Posted by tom_sw on 14 Dec 2004 at 8:43 AM
: 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.
Report
Re: 0xC0000005: Access Violation. Posted by AsmGuru62 on 18 Dec 2004 at 5:55 AM
: : 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.
:
Run it in debugger and it will automatically point out which variable causing this.
Report
Re: 0xC0000005: Access Violation. Posted by carloskkk on 4 Feb 2005 at 5:02 PM
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 :)

Report
Re: 0xC0000005: Access Violation. Posted by AsmGuru62 on 4 Feb 2005 at 7:19 PM
: 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 :)
:
:
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.
Report
Re: 0xC0000005: Access Violation. Posted by m_gawande on 7 May 2009 at 1:33 PM
: : 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 :)
: :
: :
: 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.

:
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.
Report
XP vs win7 Posted by dskv on 7 Oct 2010 at 11:28 AM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.