Your computer stops mid-work, shows "Your device ran into a problem and needs to restart", then restarts on its own. On newer Windows 11 the screen is black; on older versions it is blue. Either way it is the same thing: a blue screen error, also called a stop code error or BSOD. Windows stops on purpose to protect your files. One crash after a power cut is usually nothing to worry about, but the same crash again and again means something needs fixing.

Screenshot: Microsoft Support — "Troubleshooting Windows unexpected restarts and stop code errors"
Why It Happens
A blue screen happens when a critical part of Windows fails. Microsoft's own analysis found about 70 percent of crashes are caused by third-party driver code, about 10 percent by hardware, and about 5 percent by Microsoft's own code. Drivers are small programs that let Windows talk to hardware — the graphics card, Wi-Fi adapter, printer, and sound chip. If a driver is out of date, corrupted, or badly written, it can ask Windows to do something unsafe, and Windows stops to prevent damage. Failing memory (RAM), a dying drive, overheating, a recent Windows update, or a conflicting program can also trigger crashes. The stop code tells these apart. It is a short code in capital letters at the bottom of the crash screen, such as PAGE_FAULT_IN_NONPAGED_AREA, sometimes with a file name ending in .sys. That file name usually points straight at the faulty driver. If the code changes every time, suspect hardware. If it is always the same code, suspect one driver or program.
Fix 1: Write Down the Stop Code
First, capture the information Windows shows you. When the blue screen appears, take a photo of it with your phone before the computer restarts. Write down the stop code at the bottom and any file name ending in .sys. If the screen disappears too fast, find it afterwards in Event Viewer: right-click Start, select Event Viewer, open Windows Logs > System, click Filter Current Log, and type 41 in the Event ID box. Event 41 is logged after an unexpected shutdown, and its entry includes the stop code.
Fix 2: Remove Any New Hardware
If the crashes started after you added something — a second monitor, docking station, USB hub, external drive, new memory, or graphics card — that new hardware is the first suspect. Shut the computer down, unplug the new device, and start the computer again. Use it normally and see whether the crashes stop. If they stop, reconnect one item at a time until the crashes return. If the device is new memory, test it: press Windows key + R, type mdsched.exe, press Enter, and choose Restart now and check for problems.
Fix 3: Start in Safe Mode and Fix the Drivers
Hold Shift while clicking Restart from the Start menu power button, then choose Troubleshoot > Advanced options > Startup Settings > Restart, and press 4 for Safe Mode. In Safe Mode, right-click Start and open Device Manager. Look for any device marked with a yellow exclamation point. Right-click it, choose Update driver, then Search automatically for drivers. Check the graphics card and network adapter first. If the crashes started right after a driver update, roll it back instead: right-click the device, choose Properties, open the Driver tab, and click Roll Back Driver.
Fix 4: Free Up Disk Space and Install Windows Updates
Windows needs free space to work normally, and Microsoft recommends keeping 10 to 15 percent of the drive free. Open Start > Settings > System > Storage and check how much space is left. If the drive is nearly full, use Temporary files cleanup to remove temporary files, and uninstall programs you no longer use. Next, install the latest Windows updates: go to Start > Settings > Windows Update, click Check for updates, install everything offered, and restart. If the crashes started right after a Windows update, uninstall it from Settings > Windows Update > Update history > Uninstall updates.
Fix 5: Run System File Checker and Check the Disk
Corrupted Windows system files are a common cause of blue screens. Right-click Start, select Terminal (Admin), type sfc /scannow, and press Enter. The scan takes several minutes. If it reports that it found and fixed corrupt files, restart the computer and see whether the crashes stop. If it cannot fix everything, run DISM in the same window: type DISM /Online /Cleanup-Image /RestoreHealth, press Enter, wait for it to finish, then run sfc /scannow once more. To check the disk, type chkdsk C: /f /r, press Enter, type Y when asked, and restart.
Fix 6: Use System Restore or Reset Windows
If the crashes continue, roll the system back to a time before the problem started. Type Recovery in the Start search box, open the Recovery control panel, and click Open System Restore. Choose a restore point dated before the crashes began. If there is no restore point, or restore does not help, reset Windows: go to Start > Settings > System > Recovery and click Reset PC. Choose Keep my files first, which reinstalls Windows while keeping your personal files. If the blue screen still appears after a full reset, the cause is almost certainly hardware — most often memory or the storage drive — and the computer needs a repair check.
Frequently Asked Questions
Is the black screen on new Windows 11 the same as a blue screen?
Yes. On Windows 11 version 24H2 and later, Microsoft replaced the blue crash screen with a simpler black screen showing the same message and stop code. The cause and the fixes are identical.
Will a blue screen delete my files?
No. A blue screen stops Windows to protect your files. Unsaved work in open programs can be lost, but files already saved on the drive are safe.
What does MEMORY_MANAGEMENT mean?
It is a memory-related stop code. It usually means faulty RAM, a bad driver, or a disk problem. Run the Windows Memory Diagnostic and update your drivers first.
When should I take the computer to a repair shop?
If the same stop code keeps returning after driver updates, System File Checker, and a Windows reset, or if the Memory Diagnostic reports faults, the cause is likely hardware. Take the computer in with a note of the stop code.
Conclusion
A blue screen looks alarming, but it is Windows protecting itself, and the stop code is the clue that leads to the fix. Write the code down, remove any new hardware, and update or roll back the drivers it points to. Free up disk space, install Windows updates, and run System File Checker. Only if all of that fails should you use System Restore or reset Windows.
Related guides: Windows 11 Black Screen After Update: 7 Fixes That Work — for a black screen with no stop code after an update. More Windows 11 fixes: Windows 11 USB Device Not Recognized: How to Fix and Windows 11 Keeps Restarting: How to Fix It.