Some PC users have reported the issue whereby when booting their system or while using the computer, the Windows 11 or Windows 10 system randomly crashes and displays the EXCEPTION_ON_INVALID_FILE Blue Screen error. This post provides the most applicable solutions to fix this error.
Upon investigation, it was discovered you may encounter this error due to one or more of the following reasons.
- Bad sectors on the drive.
- Boot Configuration Data (BCD) is corrupted, misconfigured, or missing.
- Corrupted system files.
- Windows bugs.
- Outdated drivers running in compatibility mode.
EXCEPTION_ON_INVALID_FILE Blue Screen
If you get the EXCEPTION_ON_INVALID_FILE Blue/Black Screen of Death (BSOD) error when you boot or during normal use, your Windows 11/10 computer crashes, then you can try our recommended solutions presented below in no particular order and see what works for you in fixing this error.
- Run the Blue Screen Online Troubleshooter
- Run SFC and DISM scan
- Run CHKDSK
- Troubleshoot in Clean Boot (Hardware) state
- Rebuild BCD & Repair MBR
- Uninstall recent Feature or Quality Update
- Perform System Restore
- Reset/In-place Upgrade Repair/Reinstall Windows 11/10
Let’s look at the description of the process as it relates to each of the listed solutions. If you can log in normally, good; else you will have to boot into Safe Mode, enter the Advanced Startup options screen, or use the Installation Media to boot to be able to carry out these instructions.
1] Run the Blue Screen Online Troubleshooter
You can begin troubleshooting the EXCEPTION_ON_INVALID_FILE BSOD error that occurred on your Windows 11/10 computer by running the Online Troubleshooter for Blue Screen issues from Microsoft. The automated wizard will present questions as to when you encountered the error – and depending on your selection will then make recommendations on possible solutions you can apply to resolve the issue. In some cases, this should get the work done, and that’s why it should be your first step in troubleshooting BSOD errors especially if you don’t have much technical expertise.
2] Run SFC and DISM scan
As already identified, corrupt system files in most cases can trigger BSOD errors on your Windows 11/10 PC. In this case, to rule out the possibility, you can run an SFC scan and see if that helps. If the scan fails with the error message Windows Resource Protection found corrupt files but was unable to fix some of them at the first instance, you can run DISM scan which will repair the system file source cache in the WinSxS folder that SFC pulls from, to repair system files if needed. Now if the system file source cache is corrupted and not fixed with DISM repair first, then SFC will end up pulling files from a corrupted source. Once the DISM scan completes and restores health, you can run the SFC scan again.
3] Run CHKDSK
This solution requires you to run CHKDSK to repair errors or bad sectors on the system drive, which may be responsible for the BSOD error. The system drive is the drive that contains the system partition. This is usually the C: drive. The command will look something like this:
chkdsk /f /r X:
- /f switch fixes errors detected.
- /r switch Identifies Bad Sectors and attempts recovery of information.
- X represents your system drive letter.
If you are unable to boot into your Windows 11/10 computer, you can boot into Advanced Startup Options, select Command Prompt and then run CHKDSK.
4] Troubleshoot in Clean Boot (Hardware) state
You are more likely to encounter this particular BSOD error, most especially on a computer running Windows 11 due to hardware incompatibility or outdated or incompatible hardware driver. So, you can first make sure your device is eligible to run Windows 11 by using the PC Health Check tool to confirm whether your current device meets the necessary system requirements to run Windows 11.
However, if this is not the case for you as your system meets the system requirement for Windows 11 or you’re encountering this issue on Windows 10, then it’s likely an outdated or incompatible hardware driver is the culprit here. In this case, you can troubleshoot in Clean Boot (Hardware) state. This procedure requires you to disable one by one all the hardware components that are not necessary for a system to run in Device Manager. Once done, you enable each device one after the other by rebooting to pinpoint the issue and find the devices or hardware that is likely causing the issue, and then take the necessary action to resolve it, which could either update the driver for the problematic hardware or replace the hardware if faulty.
5] Rebuild BCD & Repair MBR
This solution requires you to rebuild the Boot Configuration Data file and repair the Master Boot Record file. To do this, boot into Advanced Options and select Command Prompt, then run the following commands one after the other:
These commands will fix Boot Sector problems. After running these commands, check if the error in hand has been resolved. If not, you can try the next solution.
6] Uninstall recent Feature or Quality Update
If the error in view started after installing a new Windows update on your device, to resolve the issue, you could simply uninstall the recent update on your device by following these easy steps:
- Open the Settings app.
- Click on Windows Update on the left navigation pane.
- Click on Update History.
- On the next screen, scroll down to the Related settings section.
- Click on the button on the right side of Uninstall updates to open the Installed Updates Control Panel applet.
- Now, right-click on the Update.
- Select Uninstall from the context menu.
- Open the Settings app.
- Go to Update and Security > Windows Update > View update history.
- Click on the Uninstall Updates link to open a window that will show the list of all the installed updates on your computer.
- Now, select the update you want to uninstall.
- Click on the Uninstall button in the lower right corner of the window.
Alternatively, you can uninstall Windows Updates via the command line. To do so, open Command Prompt in admin mode and run the command below to see the Windows Update History:
wmic qfe list brief /format:table
- From the output, make a note of the update installed recently.
- To uninstall the Windows Updates, type the command below and hit Enter – substitute 1234567 placeholders with the actual number of the Update you identified earlier that you wish to uninstall.
wusa /uninstall /kb:1234567
- Exit CMD prompt when done.
In the event your computer fails to successfully boot to the desktop, you can follow the instructions in this guide for how to uninstall Quality or Feature Update when Windows 11/10 won’t boot.
7] Perform System Restore
As an alternative to uninstalling the Windows update, you can perform System Restore by following these steps:
- Press Windows key + R. to invoke the Run dialog.
- In the Run dialog box, type rstrui and hit Enter to launch the System Restore Wizard.
- At the initial screen of System Restore, click Next.
- At the next screen, check the box associated with Show more restore points.
- Now, select a restore point before noticing the issue on your device.
- Click Next to advance to the next menu.
- Click Finish and confirm at the final prompt.
In the case, the system won’t boot to the desktop, you can follow the instructions in this guide on how to perform a system restore when Windows doesn’t boot to the desktop.
8] Reset/In-place Upgrade Repair/Reinstall Windows 11/10
At this point, if all the suggestions provided above weren’t helpful, you can view the BSOD log files and see if you can pinpoint the exact culprit so you can apply any other specific fix. Otherwise, your only option in your attempt to resolve the issue you’re currently facing on your Windows 11/10 PC could be either of the following:
- Reset PC – If you’re unable to carry out the PC reset because you’re unable to boot to the desktop, you can follow the instructions in this guide on how to reset Windows 11/10 via Advanced Startup Options when the PC won’t.
- Perform an in-place upgrade repair – For the in-place upgrade repair, you can only perform this task within the working Windows environment as you’ll be required to mount the Windows ISO, then launch setup from there. So, in essence, if your system won’t boot to the desktop, this option isn’t applicable. You will not be able to perform a repair install at boot or in Safe Mode.
- Clean install using USB installation media – For the clean install, make sure you create and use a fresh USB installation media.
Hopefully, this post helps!
Related post: EXCEPTION_ON_INVALID_STACK screen on Windows 11
Does Windows 11 cause a Blue Screen of Death?
A Blue Screen of Death (BSOD) error is not uncommon while upgrading to Windows 11. Usually, the error may occur because of a compatibility problem with an application or security software. However, it can also happen because of corruption in the current setup or damaged files in the installation media.
How do I read minidump files in Windows 11?
A Windows minidump is a small file that is saved to your computer each time the computer stops unexpectedly, for example when you get a BSOD. This file is stored on the same drive that holds your Windows 11 installation, in a folder called %SystemRoot%\MEMORY.DMP or %SystemRoot%\Minidump. To open the file, you’ll need an app called WinDbg. An example of a file name could be Mini030409-01.
- How to open and read Small Memory Dump (DMP) files in Windows
- Analyze Windows Memory Dump .dmp files with WhoCrashed
- Best Free Crash Dump Analyzer software for Windows
Why does Blue Screen appear on Windows 11?
A blue screen error (also called a stop error) can occur if a problem causes your device to shut down or restart unexpectedly. You might see a blue screen with a message that your device ran into a problem and needs to restart.