The EXCEPTION_ACCESS_VIOLATION usually occurs when a process attempts to read or write to a memory address that it can’t access. It usually comes with other messages like:
- An “access violation” exception was generated
- The thread attempted to read inaccessible data
- The thread caused a user-mode data execution prevention (DEP) violation
You will usually encounter it while trying to run a game. But access violation exceptions are also common with other processes like JAVA, Visual Studio, etc.
It can happen due to a number of issues specific to your system as well as the application where you encounter this error. Driver issues, conflicts with other processes, suboptimal graphics settings, application errors, outdated system, and memory (RAM) issues are all likely causes. So, you may need to troubleshoot all of these depending on your situation.
Update Graphics Driver
If your graphics drivers are not working properly, the graphics card won’t be able to work properly too. As such, it can try accessing memory addresses that are already in use, leading to this error.
You need to update the drivers to prevent any bugs that can potentially cause such issues.
- Go to the official driver download page of your graphics card, AMD or NVIDIA or Intel.
- Search for and select the driver for your graphics card model.
- Download the driver installer and run the program.
- Follow the on-screen instructions.
Reinstall Sound Drivers
Along with graphics drivers, games also require sound drivers to output their audio. So, the above error is also likely if these drivers don’t work as they should. Since Microsoft itself usually provides these drivers, updating Windows will update these as well.
So, you should try reinstalling such drivers to take care of any potential errors in the driver software.
- Open Run by pressing Windows key + R.
- Type
devmgmt.msc
and press Enter to open the Device Manager. - Click on View > Show hidden devices.
- Expand Sound, video and game controllers.
- Right-click on all the devices inside this category and select Uninstall device > Uninstall.
- After you are done, right-click on your computer name and select Scan for hardware changes to reinstall the drivers.
Disable Overlays
Sometimes the game overlays can use a memory address right before the game tries writing to it. In such cases, the memory address becomes inaccessible due to the overlay and the attempt to write to it creates an exception error.
While it is not a common issue, it’s best to disable all the overlays and check if you can successfully run your game or application.
You will need to disable all currently enabled overlays on your system, including Discord, Steam, NVIDIA or AMD overlays. All these programs require separate steps for this procedure, so I recommend checking the official website or forums if you encounter any problems.
Create or Modify Options.ini File
If you encounter the EXCEPTION_ACCESS_VIOLATION error while playing specific games, it may be because the Options.ini
file is missing from its AppData folder. In such cases, you need to manually create this file.
The contents of the options.ini
file depend on the game. Also, depending on the configuration you want, you can have different parameters as well as different values for these parameters.
For instance, for Command and Conquer Generals Zero Hour Data, the contents might be something like:
I recommend visiting their forums to learn the required content as well as the optimum value for your gaming experience. Then, to create the options file in the necessary location,
- Open the file Explorer by pressing Win + E.
- Click on View > Show > File name extensions from the menu bar.
- Open Run.
- Type
%appdata%
and press Enter to open theAppData/Roaming
folder. - Search for and open the folder for your game. The name may be different based on the language of your game so look carefully.
- Right-click on an empty area and select New > Text Document.
- Set its name to
Options.ini
and press Enter. - Open this file and type or paste the necessary contents.
- Alternatively, you can download a pre-made options.ini file for the game if some related sites provide it and move or save it in this location.
If you already have an Options file, you may need to change some configuration within. For example, on Minecraft, having FboEnable: True
will cause this error, so you need to modify it to FboEnable: False
.
Update Windows
Games and other applications require many system components like .NET framework and so on for their operation. Microsoft rolls out regular updates for these components to introduce more features.
The latest games use these features to provide a better gaming experience. So, if the components are not working properly, you may run into specific errors, including the above exception error.
- Open Windows Settings by pressing the Windows key + I.
- Go to Windows Update or Update & Security > Windows Update.
- Click on Check for updates to look for further available updates and Install now to install them.
- Restart your computer as required.
Installing quality updates will also install possible driver updates in your computer, which is useful since exception errors are also common due to buggy drivers. Apart from that, you can also manually install optional driver updates through the Windows Update.
- Go to Windows Update Settings.
- Select View optional updates or Advanced options > Optional updates.
- Expand Driver updates if the category exists.
- Check all options and click Download and install.
Troubleshoot Your Mods
Installing many mods on your games does improve the gaming experience. But it also comes with its own share of memory access and other issues. Some mods can try writing to an address that is already being used by another process or vice versa, leading to the exception error.
So, you need to disable all the mods and try running the game again. If you can run it successfully, enable the mods one by one and run the game. This way, you can check which one is causing the conflict and then deal with it accordingly.
Perform Clean Boot
It is not just the mods or overlays that can cause the memory addressing conflicts. Other applications can do the same. This issue is especially likely due to apps that change the Windows shell components which make up the graphical interface of Windows.
You can perform a clean boot to troubleshoot for incompatible programs.
- Open Run.
- Type
msconfig
and press Enter to open the System Configuration. - Go to the Services tab.
- Check Hide all Microsoft services and click Disable all.
- Click Apply.
- Go to the Startup tab and click Open Task Manager.
- Here, select each program and click Disable if the option is there.
- Restart your computer and see if you can run the game or the application. If the game requires a certain service, you can enable it from the System Configuration first (check the name of the service).
- If the game runs, any of the disabled services or apps may be problematic and you can enable them one by one or in bulk. Then restart your computer and check if the game runs.
- Reiterate this process while checking all the services or apps to isolate all conflicting files.
Then, you can disable the service/app or uninstall the application to resolve the issue.
Disable Overclocking
Overclocking your graphics card can also cause multiple issues, including memory access violations. While it does forcefully boost the performance of the GPU, many important graphics processes may not work properly. So, it’s always better to disable such practice altogether.
In fact, with the latest graphics cards out there, you’ll get very good performance even without any overclocking. So, I always recommend upgrading the hardware instead of overclocking it.
If you used any application to overclock the GPU, you should disable it through the same app.
Change Graphics Settings
You can also encounter this error if you are loading a game with higher graphics settings than the optimal configuration based on your system.
It is possible that you are running the game with the integrated graphics, not the dedicated one. Or graphics settings like Antialiasing, Path tracing, and so on may be causing the game to demand more assets than the graphics processor can handle.
So you need to check these settings and change them.
- Open Run.
- Type
ms-settings:display-advancedgraphics
and press Enter to open Advanced Graphics Settings. - Search for your app or game on the list. If it’s not there,
- Set the drop-down box below Add an app to Desktop app and click Browse.
- Go to the executable file of the game, select it and click Add.
- Set the drop-down box below Add an app to Desktop app and click Browse.
- Select the app on the list and click Options.
- Check High performance and hit Save.
If your system was already using the dedicated GPU for the game or changing it doesn’t help, you need to lower the graphics settings.
Open the NVIDIA Control Panel or AMD Radeon Software and try making such changes. You can try disabling certain features like Antialiasing and then check if you can run the game.
Reinstall Application
You can also try uninstalling the app or game where you encounter this error and then reinstalling it again. This way, you can resolve some issues like incomplete installation or corruption of the game after its installation.
- Open Run.
- Type
appwiz.cpl
and click OK to open Programs and Features. - Search for the application and select it.
- Click Uninstall or Uninstall/Change and then follow the on-screen instructions to remove the app.
- Open Run again.
- Type
appdata
and press Enter to open the AppData folder. - Go inside Local and search for your app’s folder. Then, delete it.
- Now, go to Roaming inside AppData and do the same. However, keep in mind that it may remove important data for online games. So, it’s better to create a backup before deleting it.
- Then, download the latest version of the game or app from the official website or platform and install it.
Depending on the game as well as your system, reinstalling may not work and you may need to perform very specific solutions. So, it’s best to visit the game’s official forums to see what you can do to resolve the error.
Change DEP Settings
If you see “The thread caused a user-mode data execution prevention (DEP) violation” in the error message, you can also try excluding the app from the DEP list.
DEP actually separates memory addresses between those that can run executable files and those that can only store data, so it can also create such exception errors.
However, if you disable DEP for the app, it can leave the app vulnerable to external threats, so only do so as a last resort.
- Open Run.
- Type
systempropertiesadvanced
and press Enter to open the Advanced tab of System Properties. - Click on Settings under Performance.
- Go to the Data Execution Prevention tab.
- Check Turn on DEP for all programs and services except those I select.
- Click Add.
- Go to your game or app location.
- Select the executable file (
.exe
) there and click Open. - If there are more than one executable files, add all of them to the exclusion list.
- Hit OK > OK.
If you still encounter the error, the game may require other files that are causing the DEP violation. You can try disabling DEP altogether in such cases, but do so only temporarily if you have to.
- Open Run.
- Type
cmd
and press Ctrl + Shift + Enter to open the Elevated Command Prompt. - Type
bcdedit
and press Enter. - Check the value of the identifier inside Windows Boot Loader. It should usually be {current}.
- Type
bcdedit /set {current} nx AlwaysOff
while replacing {current} if it is any other value and press Enter. - Open the app and see if it works now.
- After closing the app (when you are done), run the command
bcdedit /set {current} nx AlwaysOn
to enable DEP again.
Run Memory Diagnostic
Since memory access violations can cause this issue, it is also possible that your RAM hardware itself is not working properly. You can run the Windows Memory Diagnostic program to check for such issues.
- Open Run.
- Type mdsched and press Enter to open this utility.
- Click on Restart now and check for problems.
Your computer will restart, run the Diagnostic tests, restart again and show the results. If it shows any errors, your RAM or RAM slot is defective.
You can try changing the RAM slots to narrow down the cause. Also, use single RAM sticks at a time with different slots if you have more than one.
Then, if the RAM stick is defective, replace it with a new one. And if a slot is not working, switch to another or seek help from a hardware specialist to repair it.