What is EXCEPTION_ON_INVALID_STACK error
One of the more confusing and frustrating Blue Screen of Death (BSoD) errors users encounter in Windows 11 or 10 is the EXCEPTION_ON_INVALID_STACK error. This issue typically surfaces when the operating system encounters an exception while trying to process a task using an invalid or corrupted stack pointer. It often appears suddenly, causing your system to crash or fail to boot properly. The stack is a critical memory region responsible for storing call-return sequences, local variables, and function parameters. When it becomes unstable or corrupted, the OS halts to prevent further damage. This error can stem from various underlying causes, such as corrupted system files, bad disk sectors, faulty RAM, or a failing hard drive. In some cases, outdated or incompatible device drivers may also trigger stack-related exceptions. Malware infections and improper shutdowns can further exacerbate the issue. Since the problem affects core OS functionality, fixing it usually requires booting from recovery media or entering advanced troubleshooting environments. It is crucial to identify the root cause early to prevent data loss or permanent system instability. Fortunately, there are several proven methods to resolve this error and restore system integrity without resorting to a full reinstall.
Step-by-step instructions to fix EXCEPTION_ON_INVALID_STACK error
Run a System File Checker (SFC) Scan
This method helps identify and fix corrupted system files that may be causing the EXCEPTION_ON_INVALID_STACK error.
- Insert a compatible Windows 11/10 installation media and press any key to boot from it.
- Click Repair your computer on the bottom-left corner.
- Choose Troubleshoot > Advanced Options > Command Prompt.
- Type
sfc /scannow
and press Enter. - Let the scan complete, then reboot your PC normally.
Run a CHKDSK Scan
CHKDSK helps detect and repair bad sectors or file system issues that might be causing stack corruption.
- Restart your PC while holding the Shift key to enter recovery mode.
- Click Troubleshoot > Advanced Options > Command Prompt.
- Type
chkdsk c: /f /r /x
and press Enter. - Close the prompt and restart your PC normally.
Fix Boot Configuration Data
If corrupted boot files are responsible for the error, you can rebuild the Boot Configuration Data (BCD).
- Boot from a Windows installation media and click Repair your computer.
- Go to Troubleshoot > Advanced Options > Command Prompt.
- Enter each of the following commands one by one:
bootrec.exe /fixmbr
bootrec.exe /fixboot
bootrec.exe /scanos
bootrec.exe /rebuildbcd
- Close the prompt and reboot your PC.
Update Device Drivers
Outdated or faulty drivers can cause memory handling errors like EXCEPTION_ON_INVALID_STACK.
- Press Windows + X and select Device Manager.
- Expand each category and right-click on any device, then choose Update driver.
- Select Search automatically for drivers.
- Repeat the process for all critical devices such as graphics, chipset, and storage controllers.
Updating each driver manually is time- and energy-consuming. If you are willing to save it and update drivers faster, we recommend using a special utility called Driver Booster from IObit. It has broad databases of drivers for all of the devices you need to maintain your PC. You can download it using the button below.
Perform a Full Virus Scan
Malware infections can tamper with the system stack or corrupt memory pointers which leads to BSoD errors.
- Open Windows Security from the Start menu.
- Go to Virus & threat protection.
- Click Scan options and select Full scan.
- Click Scan now and wait for the process to complete.
You can use default Windows Defender or try to install a more advanced antivirus developed by Malwarebytes – a trusted and talented group of experts constantly updating their software to fight off both local and global threats. You can download it now using the link below and try a 14-day trial of the ultimate antimalware experience for free.
Install Latest Windows Updates
Microsoft frequently releases patches that address system-level bugs, including BSoD errors.
- Press Windows + I to open Settings.
- Go to Windows Update.
- Click Check for updates.
- Download and install any available updates.
Perform a Repair Install or Reset Windows
If none of the above solutions work, a repair install or reset may be required to restore system stability.
- Create a Windows 10/11 installation media using the Media Creation Tool.
- Run the setup and choose Upgrade this PC now.
- During setup, choose the option to Keep personal files and apps.
- Follow on-screen instructions to complete the process.
This will replace corrupted system files while keeping your personal data intact.