Last Updated:

How to Fix the “EXCEPTION ACCESS VIOLATION” Error in Windows 11 and Windows 10

Dmitry Bashlak Windows

When you start a game or other app on your computer, you may receive an “EXCEPTION ACCESS VIOLATION” error, the title of the window may contain the words “Unexpected Error”, “Unhandled Exception” or “Fatal Error” and you may see error codes such as 0xc0000005 or the DLL filename. This issue is common in Windows 10 and Windows 11.

Unhandled Exception. Exception Access Violation error message

We'll look at methods to fix the Exception Access Violation error, which usually means the software is unable to access the requested data in RAM.

Table of Contents

Exception Access Violation Caused by Antivirus Software

One of the most common causes of the EXCEPTION ACCESS VIOLATION error is the antivirus software interfering with a game or program. Sometimes it is a third-party antivirus, sometimes it is Microsoft Defender.

  1. Test if there’s an error if you temporarily disable your antivirus.
  2. If 1st step fixed the error, you may add game’s folder to your antivirus exclusions, then enable it again.

To add exclusions in Microsoft Defender, follow the steps below:

  1. Open Windows Security using system tray icon.
  2. Head to Virus & Threat protection.
  3. Click “Manage settings” in Virus & Threat protection settings section.
  4. Click “Add or remove exclusions” in “Exclusions section”.
  5. Use the “Add an exclusion” button to add the folder containing your game or application that is throwing the EXCEPTION ACCESS VIOLATION error to the Microsoft Defender exclusions list.
    Add folder to Microsoft Defender exclusions

Data Execution Prevention (DEP)

The Data Execution Prevention feature, when enabled, can cause the EXCEPTION ACCESS VIOLATION error for some apps. To disable this feature:

  1. Right-click the “Start” button, select “Run” from context menu, type sysdm.cpl and press Enter.
  2. Open “Advanced” tab and click “Settings” button in “Performance” section.
    Open advanced system performance settings
  3. On “Data Execution Prevention” tab choose “Turn on DEP for all programs and services except those I select”.
  4. Click “Add” button, add your app executable file to the list, confirm disabling DEP and apply settings.
    Disable DEP for specific executable
  5. If there’s a “You can not set DEP attributes on 64-bit executables” error when adding a program, click “Ok” and use steps 6-9 below.
  6. Open Command Prompt as Administrator: type “cmd” in the Windows search, right-click on the result and select “Run as administrator”.
  7. Type bcdedit.exe /set nx AlwaysOff command and hit Enter. If there is “The value is protected by Secure Boot policy and cannot be modified or deleted” message, disable Secure Boot option in your BIOS/UEFI settings, then repeat steps 6-9.
  8. Type bcdedit.exe /set nx OptOut and hit Enter.
  9. Close Command Prompt and restart your PC.

Additional Ways to Fix the Error

The two methods above usually fix the EXCEPTION ACCESS VIOLATION error, but if you continue to encounter it, try the following options:

  • Try using compatibility mode to start your app. Right-click the executable, select “Properties”, navigate to “Compatibility” tab, and enable compatibility with previous Windows version.
  • If the game/app worked on this PC before within the same Windows installation, try using System Restore to revert your computer to an earlier time. To quickly open System Restore, press Windows Key + R and enter rstrui.exe.
  • If you have recently reinstalled Windows, try downloading and installing chipset and controllers’ drivers from the motherboard or laptop manufacturer’s website.
  • Use Windows Memory Diagnostic Tool (Windows + R — mdsched.exe) to scan RAM for possible errors.
  • If you copy the DLL files to the wrong folders — for example, an x86 (32-bit) DLL in the System32 folder rather than the SysWOW64 folder, or vice versa — you may receive this error message. The x64 (64-bit) DLLs should be in the System32 folder, and the x86 (32-bit) DLLs should be in the SysWOW64 folder.
  • The error may be due to “SysWOW64” folder path placed before “System32” in $PATH environment variable.

When troubleshooting an error, consider the possibility that it can also be caused by a fault in the program itself. If none of the solutions in this guide helped to fix the error, try downloading it from another source.