Содержание
- 0xc0000005 Access Violation error — Explanation & Solutions
- Variations of 0xc0000005 Error Messages:
- How to fix
- case 3: Printer Drivers
- case 5: Development Issue
- case 6: Symantec Antivirus
- case 9: Windows Service Pack
- case 3: STOP c000021a 0xc0000005 combination
- case 13: Repair Your Registry
- case 14: STOP 0x0000007e 0xc0000005
- 0xc0000005 error case 15: 0xc0000005 in Windows 7
- What exactly is the scope of Access Violation ‘0xc0000005’?
- 3 Answers 3
- EXCEPTION ACCESS VIOLATION — как исправить ошибку
- 0xC0000005: Access violation reading location 0x00000000
- 3 Answers 3
- 0xC0000005 STATUS_ACCESS_VIOLATION 100% WORKING FIX! 2022 DAYZ ARMA 3 WORKING 100% GUARANTEE!
- Subscribe to RSS

I’m having a very strange issue with a space invaders game I’m working on. Basically I get an access violation error:
0xc0000005 Access Violation error — Explanation & Solutions
Below you will find some specific examples of 0xc0000005 error messages and possible solutions for specific cases. However, if you are not a computer technician we strongly recommend to use specialized software suggested on this page or contact an expert on this issue. The software, information and tips below are suggested by PC experts, the Microsoft Company or the users who successfully resolved 0xc0000005.
0xC0000005 is a common access violation error. Typically, you randomly receive an error message that looks like this:
Explorer.exe access violation **(0xC0000005)** at address 240027 The application failed to initialize properly (0x0000005) Click on OK to terminate application.
0x0000005 error code can also be a part of a blue screen error (a STOP error or BSOD) message that looks like this:
STOP: 0x0000008E (0xC0000005,0x89BBD4A9,0x7A44EC4C,0xBc40)
When it occurs
As a rule, you get the 0xc0000005 error message when you try to start one of your programs in Windows or install software. The program terminates with the 0xc0000005 message and you can’t get it work.
The most typical causes for the ‘0xc0000005: Access Violation’ error are: malware (viruses, trojans, spyware and other), system file damage, corrupt registry, faulty RAM, faulty drivers, incorrectly written, installed or updated software and even Windows security features.
Variations of 0xc0000005 Error Messages:
- «An application error has occurred and an application error log is being generated. Exception: access violation (0xC0000005), Address»
- «The application failed to initialize properly (0xc0000005). Click OK to terminate the application».
- The «Stop: 0x0000008E (0xC0000005, . )» combination on the blue screen.
How to fix
case 1: Bad RAM Memory
Quite often this problem results from a faulty RAM memory. This is most likely the reason if you started getting the 0xC0000005 error message after installing a new RAM memory. To check this you can remove the new memory and see if the 0xC0000005 error disappears. If so, get a refund or ask to replace the faulty memory with a good one.
Don’t forget to do the following before you start removing the memory:
- Turn off your computer and remove all cables (power, network, etc.)
- Remove the battery (if you have a laptop)
- Ground yourself out before you touch the memory!!(for example, touch metal screw on a lightswitch).
case 2: Virus or Other Malware
Your computer may be infected with malware. In this case the 0xc0000005 error informs that the system prevented execution of a malicious application. You should scan your system with a reliable antivirus program.
case 3: Printer Drivers
Sometimes 0xc0000005 error occurs when your current printer profile is incompatible with the updated settings of one of the programs you are trying to use. You may reinstall the program, printer drivers or even the entire system over and over again and that won’t help. The reason is that every time you will install the same default user profile included in your printer installation package by the manufacturer. The simplest way to fix 0xc0000005 is to create a new, clean user profile for the printer.
case 4: DEP
Quite often the 0xC0000005 error occurs because of Data Execution Prevention (DEP) introduced by Microsoft in Windows SP2 and used in later versions. DEP is a set of security features that prevents code execution from non-executable memory segments. It’s a vivid illustration of a typical 0xc0000005 Access Violation error Learn how to fix issues errors caused by DEP..
case 5: Development Issue
If you are a software developer and you keep getting an exception with status code STATUS_ACCESS_VIOLATION (0xC0000005), your program might attempt to violate DEP. You could try the following: If your application is designed to use executable memory, it must have this attribute set on the appropriate memory by specifying
PAGE_EXECUTE_, PAGE_EXECUTE_READ, PAGE_EXECUTE_READWRITE or PAGE_EXECUTE_WRITECOPY
in the memory protection argument of the Virtual memory allocation functions.
If the above solutions don’t help run your program in debugger. Maybe you haven’t initialized the pointer correctly. When debugger stops on a violation simply check the call stack and open every file until you see what piece of code produced the violation. And don’t forget to check for useful tools listed on this site.
case 6: Symantec Antivirus
The 0xC0000005 error may appear if you are using Symantec Antivirus. If the error message mentions SAVRT.SYS file, that must be the case. All you have to do is update Symantec Antivirus to the latest version, that removes the 0xC0000005 error.
case 7: Google Chrome
If you are using Гугл Chrome you may get the following message: ‘The application failed to initialize properly (0xc0000005). Click on OK to terminate the application.’ Learn how to fix the 0xc0000005 error in Гугл Chrome.
case 8: IE6
The ‘Access Violation (0xC0000005 exception)’ message may appear in IE6 when a web page or a html document contain a SPAN tag which was not correctly closed. As to solutions, why use IE6 at all? Install a later version or use another browser like Мозилла Firefox, Opera or Гугл Chrome.
case 9: Windows Service Pack
Install the latest Service Pack for Windows. Sometimes that removes the 0xC0000005 error.
case 10: Driver Errors
Driver problems may cause 0xC0000005, especially faulty 3rd party drivers, incompatible or outdated drivers. Update old drivers, replace 3rd parry drivers with native ones and see if it solves 0xc0000005 error.
case 11: Video Driver Update
Sometimes 0xc0000005 errors occur after video card driver updates. If that is the case rollback to the drivers you’ve been using before the update. And inform the vendor about the issue.
case 3: STOP c000021a 0xc0000005 combination
This error code combination frequently occurs during logon. As a rule, the error is caused either by a corrupt system file (after applying a service pack) or an existing bug in a system file that makes system crash when a username of specific length is used. Read how to fix this problem on STOP c000021a 0xc0000005 page.
case 13: Repair Your Registry
In certain cases, 0xc0000005 error may be caused by poor maintenance of your computer and corrupt registry entries or invalid references that pile up as you install and delete programs, especially when you install new programs over old ones. Windows registry is considered to be a single point of failure (SPOF) by many experts. This means that the entire system is bound to the registry and if the registry fails, the entire system may be disabled. To get rid of the 0xc0000005 error you can check all the registry entries manually and remove invalid ones. You may also use a registry cleaner tool but do so with caution. There are many free tools of that sort.
Make sure the tool comes from a reputable developer and is actually free.
case 14: STOP 0x0000007e 0xc0000005
STOP 0x0000007e 0xc0000005 may be caused by a wide range of issues, from viruses to faulty drivers. More about 0x0000007e 0xc0000005.
0xc0000005 error case 15: 0xc0000005 in Windows 7
0xc0000005 frequently occurs during Windows 7 installation, upgrade or printing in W7. Read more: 0xc0000005 in Windows 7.
We hope the information above helped you resolve the 0xC0000005 error.
There may be little time left before your can’t reverse it.
Tests show your blood sugar is higher than normal? This means that your are on your way to diabetes or may already have it.
However, the condition can be reversed. The earlier you take action the greater the chance to get back to healthy blood sugar levels.
Basic Error Concepts:
- What is Memory Access Violation?
- How to Change Laptop Memory
- Data Execution Prevention
- Configuring DEP Exceptions
- How to Disable DEP
- How Last Known Good Configuration Works
- Exception 0xc0000005 vs Error
- 0xC0000005 in Гугл Chrome
- System Restore Function
- Windows 7 0xc0000005
- How to Repair Windows 7?
- How to Repair Windows Vista?
What exactly is the scope of Access Violation ‘0xc0000005’?
I was wondering about exception 0xc0000005 and what it acctually encompasses. I.e. I take it this occurs if an application tries to access freed memory/memory belonging to another process.
But what about, for example, an address mapped for hardware? Or an address outside the valid range? Do attempted accesses to these fault with the same code or do they have their own? Does this include failed reads to valid addresses owned by the process?
Essentially I want to know when an application fails with this exception, what may have gone wrong; is this a narrow fault that could only have come from the apps. code or am I looking at anything up and including hardware problems? (I know there must be an MSDN page on this but searching Гугл or MSDN brings up the expected 100 pages of troubleshooting random applications ;)) Thanks!
asked Mar 14, 2011 at 19:36
2,781 5 5 gold badges 31 31 silver badges 50 50 bronze badges
3 Answers 3
You need to read the processor manual to drill this down. It is triggered by a «trap», best described as an exception in the processor. A trap interrupts code execution and lets an operating system «catch» handler deal with the fault. A very common benign one is a page fault, raised when the processor tries to read data from RAM that isn’t mapped yet.
EXCEPTION ACCESS VIOLATION — как исправить ошибку

That’s how virtual memory is implemented.
An AccessViolation belongs to a group of traps that are hard faults that the operating system doesn’t know how to handle. It is called «General Protection Fault» in the processor manual. It’s a bit of a grab-bag, there are lots of ways to trigger a GPF. By far the most common one is trying to read memory that isn’t mapped, usually caused by heap memory corruption.
Followed by trying to execute a machine code instruction that isn’t valid or can only be executed by privileged code, usually caused by stack memory corruption.
These traps are as nasty as they come, the processor simply cannot continue executing the program. The operating system certainly doesn’t know how to handle it, it raises an AccessViolation exception to give the program a shot at jerking the processor back to known-good code. Possible by using the __try/__except keywords in your code. Not a great idea btw, other than for custom error reporting, you have no real idea how the state of your program got mutated before it died and thus no way to restore it back.
Without such an SEH handler, this ends up in a backstop that Windows provides. You can provide your own with SetUnhandledExceptionFilter(), useful to customize the crash report. The system-provided one puts an end to it by triggering WER, the Windows Error Reporting component. Which ultimately terminates the process.
0xC0000005: Access violation reading location 0x00000000
I’m having a very strange issue with a space invaders game I’m working on. Basically I get an access violation error:
Unhandled exception at 0x5edad442 (msvcr100d.dll) in SpaceInvaders.exe: 0xC0000005: Access violation reading location 0x00000000.
when I include the piece of code below. visual studio takes me to «strcmp.asm» when debugging. Note that Im not using strcmp() in any of my code. Is there anything wrong with the code, or is this a problem beyond the scope of what I’ve included? Thanks for any help
const char* invarray[] = ; int i=0; //Creates 55 invaders for (int y=0; y >
Invader constructor:
Invader::Invader(const char *pic, int x, int y, int w, int h, bool dir, bool des, int point) : MovingObject(pic, x, y, w, h) , direction(dir), destroyed(des), b(0), points(point)<>;
MovingObject Constructor
MovingObject::MovingObject(const char *pic, int x, int y, int w, int h):picture(pic), positionX(x), positionY(y), width(w), height(h) <>;
201k 40 40 gold badges 392 392 silver badges 404 404 bronze badges
asked May 7, 2012 at 8:28
647 1 1 gold badge 6 6 silver badges 18 18 bronze badges
Show code inside constructor of Invader
May 7, 2012 at 8:32
The error message suggests that this is a null pointer dereference, but I can’t see where this would happen in your code.
Apart from the Invader constructor, please show us where/how the invaders array is initialized, too. The copy constructor of Invader might be interesting as well, if it has one.
May 7, 2012 at 8:34
I just updated OP with constructors. @Medo, invader array was just initialized as global variable: «Invader invaders[55];»
May 7, 2012 at 8:38
Thanks guys, as Fraser suggested I must have accidentally forgot to increment i.
May 7, 2012 at 8:40
3 Answers 3
«Access violation reading location 0x00000000» means that you’re derefrencing a pointer that hasn’t been initialized and therefore has garbage values. Those garbage values could be anything, but usually it happens to be 0 and so you try to read from the memory address 0x0 , which the operating system detects and prevents you from doing.
Check and make sure that the array invaders[] is what you think it should be.
Also, you don’t seem to be updating i ever — meaning that you keep placing the same Invader object into location 0 of invaders[] at every loop iteration.
0xC0000005 STATUS_ACCESS_VIOLATION 100% WORKING FIX! 2022 DAYZ ARMA 3 WORKING 100% GUARANTEE!
1 1 1 silver badge
answered May 7, 2012 at 8:35
Tneuktippa Tneuktippa
1,625 2 2 gold badges 15 15 silver badges 25 25 bronze badges
This line looks suspicious:
invaders[i] = inv;
You’re never incrementing i , so you keep assigning to invaders[0] . If this is just an error you мейд when reducing your code to the example, check how you calculate i in the real code; you could be exceeding the size of invaders .
If as your comment suggests, you’re creating 55 invaders , then check that invaders has been initialised correctly to handle this number.
answered May 7, 2012 at 8:37
73.2k 19 19 gold badges 235 235 silver badges 214 214 bronze badges
The problem here, as explained in other comments, is that the pointer is being dereference without being properly initialized. Operating systems like Linux keep the lowest addresses (eg first 32MB: 0x00_0000 -0x200_0000) out of the virtual address space of a process. This is done because dereferencing zeroed non-initialized pointers is a common mistake, like in this case. So when this type of mistake happens, instead of actually reading a random variable that happens to be at address 0x0 (but not the memory address the pointer would be intended for if initialized properly), the pointer would be reading from a memory address outside of the process’s virtual address space. This causes a page fault, which results in a segmentation fault, and a signal is sent to the process to kill it.
That’s why you are getting the access violation error.
answered Mar 1, 2018 at 16:19
Jay Medina Jay Medina
514 5 5 silver badges 11 11 bronze badges
- c++
- access-violation
-
The Overflow Blog
sponsored post
Linked
Related
Hot Network Questions
Subscribe to RSS
Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.3.23.43344
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Похожие статьи
-
Caused an access violation 0xc0000005
Work through this guide: Caused an access violation 0xc0000005 Cities.exe caused an Access Violation (0xc0000005) So the game just randomly goes «oops…
-
Deathloop using void engine error 0xc0000005
Deathloop also requires you to have the latest Microsoft libraries on your system, so be sure to update it as well: Deathloop using void engine error…