Introduction
The KERNEL_MODE_HEAP_CORRUPTION BSOD on Windows 10/11 is a critical blue screen error that often points to a corrupted kernel heap—memory used by the Windows kernel and drivers. It commonly appears while gaming, streaming, editing video, using hardware-accelerated codecs, or shortly after updating graphics drivers. Because it often involves GPU drivers and codec modules (e.g., DirectX, media decoders), ignoring it risks repeated crashes, data loss, and deeper system instability.
This guide goes beyond generic advice. You’ll find step-by-step instructions to identify faulty GPU/codec modules, analyze minidumps, use WinDbg/BlueScreenView, run Driver Verifier, and apply layered fixes—from quick checks to advanced diagnostics and repair. If your goal is to fix the BSOD and ensure it doesn’t come back, follow this walkthrough carefully.
Understanding the Error
The stop code KERNEL_MODE_HEAP_CORRUPTION indicates that a driver or kernel component corrupted memory in the kernel heap. In plain language, a low-level component mishandled memory (e.g., wrote out of bounds, double-freed, or used an invalid pointer), causing Windows to crash to protect data integrity.
Typical triggers include:
- Graphics driver faults during 3D rendering, video playback, or switching between apps (Alt-Tab).
- Codec/Decoder issues in apps using hardware acceleration (HEVC/H.265, AVC/H.264, VP9, AV1) via DirectX/Media Foundation.
- Overlay/injection tools (e.g., screen recorders, OSDs, RGB/monitoring utilities) hooking into GPU pipelines.
- Unstable overclocks (GPU, VRAM, CPU, RAM) or aggressive power/thermal limits.
- Defective hardware (RAM, GPU VRAM), unstable BIOS settings (XMP), or aging PSU.
- Corruption in system files or disk.
- Buggy or unsigned drivers for USB capture cards, webcams, or virtual video/audio devices.
Because many GPU/codec pipelines cross kernel and user mode boundaries, the crash may cite dxgkrnl.sys (DirectX kernel), dxgmms2.sys, or your vendor’s GPU driver (e.g., nvlddmkm.sys, amdkmdag.sys, igdkmd64.sys), even if a third-party module triggered the corruption.
Common Causes
Use this list to quickly spot likely culprits for the KERNEL MODE HEAP CORRUPTION error:
- Graphics drivers
- Corrupt or buggy versions (recently updated/rolled back)
- Conflicts after major Windows updates
- Incomplete upgrades (leftover driver files)
- Codec/Media components
- Third-party codec packs (e.g., K-Lite, legacy filters)
- Hardware-accelerated decoding conflicts (HEVC, AV1, VP9)
- App-specific codec modules (editors, streaming tools)
- Overlay/Hooking software
- OBS, Discord overlay, RivaTuner/MSI Afterburner, ShadowPlay, capture utilities
- RGB control tools injecting overlays
- Memory and Overclocks
- XMP instability, RAM mis-timings, or faulty DIMMs
- GPU/VRAM overclocks or undervolts
- Storage/System integrity
- Corrupted system files or filesystem errors
- Failing SSD/HDD (bad sectors, SMART warnings)
- Firmware/BIOS
- Outdated motherboard BIOS or chipset microcode
- Unstable settings: Above 4G Decoding, CSM, PCIe Gen tweaks
- Windows updates
- Newly installed cumulative updates or feature updates
- Malware/Rootkits
- Kernel-level hooks or tampering
- Power/Thermals
- Weak or failing PSU
- Overheating GPU/CPU/VRM
Preliminary Checks
Before deeper work, stabilize your system and baseline its health.
- Boot into Safe Mode
- If Windows won’t boot normally, enter Safe Mode:
- Hold Shift while selecting Restart -> Troubleshoot -> Advanced options -> Startup Settings -> Restart -> Press 4 (Safe Mode) or 5 (Safe Mode with Networking).
- In Safe Mode, only essential drivers load, helping isolate third-party issues.
- Back Up Important Data
- Copy essential files to an external drive or cloud.
- Create a System Restore point:
- Press Win+R -> type: SystemPropertiesProtection.exe -> Create.
- Run Basic Health Checks
-
System File Checker:
sfc /scannow
-
DISM (servicing and repair):
DISM /Online /Cleanup-Image /RestoreHealth
-
Check Disk (online scan):
chkdsk /scan
-
If errors are reported on C:, schedule a fix:
chkdsk C: /f
-
Update Windows:
- Settings -> Windows Update -> Check for updates -> Install and reboot.
These steps can repair underlying corruption that amplifies driver problems.
Step-by-Step Troubleshooting
Follow these steps in order—from easiest to most targeted. Test your workload (game/video playback) after each major change.
- Check Reliability Monitor and Event Viewer
- Reliability Monitor: Press Win+R -> perfmon /rel
- Look for red X events around the BSOD. Note application or driver names tied to crashes.
- Event Viewer: Windows Logs -> System
- Filter for Event ID 1001 (BugCheck), 41 (Kernel-Power), 4101 (Display driver stopped responding), WHEA-Logger events.
- These clues help link crashes to display or codec activity.
- Temporarily Disable Hardware Acceleration
- In browsers (Chrome/Edge/Firefox): Settings -> System/Performance -> disable Use hardware acceleration. Restart the browser.
- In apps (video editors/players, Discord, OBS): disable GPU acceleration where available.
- Windows Graphics Settings: Settings -> System -> Display -> Graphics -> Default graphics settings -> toggle off Hardware-accelerated GPU scheduling.
- If BSODs stop, the issue likely involves GPU drivers or hardware-accelerated decoders.
- Clean Boot (isolate third-party conflicts)
- Press Win+R -> msconfig -> Services tab -> check Hide all Microsoft services -> Disable all -> Startup tab -> Open Task Manager -> Disable all startup items -> OK -> Restart.
- Test again. If stable, re-enable items in batches to find the offender (overlays, recorders, RGB utilities are frequent culprits).
- Cleanly Reinstall GPU Drivers (DDU method)
- Download the latest stable NVIDIA/AMD/Intel GPU driver. Also download one previous version.
- Download DDU (Display Driver Uninstaller).
- Disconnect the internet (prevent auto-driver install).
- Boot to Safe Mode.
- Run DDU -> Select GPU vendor -> Clean and restart.
- Install the new driver in Clean or Minimal mode (avoid optional extras). For NVIDIA, consider installing driver only (no GeForce Experience) during testing.
- Reconnect the internet. Reboot once more.
- If issues persist, try the previous driver version.
- Remove Codec Packs and Reset Media Components
- Uninstall third-party codec packs (K-Lite, Shark007, CCCP).
- Reboot.
- Prefer Microsoft-native or vendor-supported codecs:
- Install HEVC Video Extensions from Microsoft Store if needed.
- Update apps that bundle their own decoders (e.g., editors based on FFmpeg).
- In Windows: Settings -> Apps -> Optional features -> Manage Media Features (ensure Media Feature Pack for N editions is present).
- Test video playback and editing again.
- Update Core Platform Drivers
- Chipset drivers (Intel/AMD): install latest from your motherboard or CPU vendor.
- Intel ME/AMT or AMD PSP firmware packages (if applicable).
- Integrated GPU drivers (even if using a discrete GPU).
- Audio and USB controller drivers (especially for capture cards/webcams).
- Reboot after each install.
- Reset Overclocks and Power Tweaks
- Restore GPU to stock settings (disable overclock/undervolt in MSI Afterburner or vendor utility).
- Disable XMP temporarily; set RAM to JEDEC defaults. Retest.
- If stable, tune back gradually. Memory instability is a classic cause of kernel heap corruptions.
- Storage and Thermal Health
- Check SSD/HDD SMART via a tool like CrystalDiskInfo; replace drives with failing or cautionary SMART data.
- Monitor temps using HWiNFO or similar. Keep GPU/CPU under thermal limits (generally <85°C for many GPUs).
- Ensure your PSU is adequate and healthy; swap in a known-good unit if possible.
- BIOS and Firmware Updates
- Update your motherboard BIOS to the latest stable release.
- Load Optimized Defaults after flashing; then re-enable only necessary features.
- If experiencing PCIe instability, try setting GPU slot to PCIe Gen3, or disable CSM if legacy conflicts exist.
- Leave Resizable BAR (ReBAR) as default unless your vendor advises otherwise for your GPU.
- Minidump Collection and Analysis
- Ensure Small memory dump (256 KB) is enabled:
- Press Win+R -> sysdm.cpl -> Advanced -> Startup and Recovery (Settings) -> Write debugging information: Small memory dump -> Directory: %SystemRoot%\Minidump.
- Ensure the pagefile is enabled on the system drive (System managed is fine).
- After the next BSOD, locate dumps at C:\Windows\Minidump.
Option A: BlueScreenView (quick)
- Download BlueScreenView (NirSoft) -> open the latest dump -> note:
- Bug Check String: KERNEL_MODE_HEAP_CORRUPTION
- Likely Caused By: driver file (e.g., nvlddmkm.sys, amdkmdag.sys, igdkmd64.sys)
- Stack references (dxgkrnl.sys, dxgmms2.sys) indicate a GPU pipeline context.
Option B: WinDbg (deeper)
-
Install WinDbg (Preview) from Microsoft Store.
-
File -> Open dump file -> select the latest minidump.
-
In the command window:
.symfix
.reload
!analyze -v -
Look for:
- MODULE_NAME or Probably caused by: e.g., nvlddmkm.sys
- Call stack frames involving dxgkrnl.sys, dxgmms2.sys, or third-party filter drivers.
-
Inspect a specific module:
lmvm nvlddmkm
Check timestamps and versions. If the suspect is a non-Microsoft driver (capture card, virtual camera, antivirus filter), update/replace it.
- Targeted Remediation Based on Minidump
- If a GPU driver is implicated:
- Try a different branch (e.g., NVIDIA Studio vs Game Ready).
- Avoid optional features (Ansel, HD Audio) temporarily.
- Disable overlays (GeForce Experience overlay, ShadowPlay).
- If a codec/decoder pattern emerges:
- Keep hardware acceleration off in the problematic app.
- Reinstall the app’s codec components (some editors allow switching to software decode).
- Uninstall the codec pack entirely; use native Media Foundation decoders.
- If a USB capture/webcam driver appears:
- Update firmware/drivers for the device.
- Connect to a different USB controller/port (prefer rear I/O on the motherboard).
- Test with the device unplugged.
- Memory Diagnostics
- Quick test: Windows Memory Diagnostic (mdsched.exe) -> Restart now and check for problems.
- Thorough test: MemTest86 (USB boot) for several passes.
- If errors occur, test each RAM stick individually and slots.
- Keep XMP off until no errors appear.
- Driver Verifier (Advanced; use with caution)
-
Purpose: intentionally stress drivers to provoke the faulty one.
-
Create a restore point first. Expect more BSODs while testing.
-
Enable for non-Microsoft drivers only:
- Press Win+R -> verifier -> Create standard settings -> Automatically select unsigned drivers or Select driver names from a list -> check third-party drivers (display, capture, storage, antivirus filter drivers).
-
Reboot and use the PC until a BSOD occurs.
-
After a crash, analyze the new minidump; the culprit should surface more clearly.
-
Disable Driver Verifier when done:
verifier /reset
If stuck in a boot loop, use Safe Mode then run the command.
- System Restore or In-Place Repair
- System Restore: rollback to a point before the issue.
- In-place upgrade repair (keeps apps/files):
- Download the latest Windows ISO from Microsoft.
- Mount ISO -> run setup.exe -> Choose Keep personal files and apps.
- If all else fails: Reset this PC (keep files) as a last resort.
- Hardware Validation
- Reseat the GPU; check PCIe power connectors.
- Test GPU in another system or try a different GPU.
- Temporarily use iGPU (if available) to see if crashes stop (strong indicator of discrete GPU/driver issue).
- Run OCCT or 3DMark Stress Test to check stability under load; also test VRAM.
- If the error only occurs with a specific GPU or PSU, replacement may be necessary.
Advanced Diagnostics
Use these tools to pinpoint root causes precisely.
-
Driver Verifier (Deep dive)
- Enable options like IRQL checking, Pool tracking, Force pending I/O requests, and DDI compliance for non-Microsoft drivers.
- Only advanced users should enable additional checks; they can destabilize systems intentionally to catch faults.
- Always know how to disable: Safe Mode -> verifier /reset.
-
Event Viewer: Custom Views and Filters
- Create a custom filter for:
- Source: BugCheck, Display, WHEA-Logger
- Event IDs: 1001, 4101, 17/18/19, 41
- Correlate timestamps with applications in use (games, editors, browsers) to see which workloads trigger the BSOD.
- Create a custom filter for:
-
Reliability Monitor Timeline
- Identify patterns (e.g., BSODs after a specific driver install or app update).
- Use View technical details to extract faulting module names.
-
Symbolic Debugging in WinDbg
-
Use:
!analyze -v
k
lmto view stack traces and loaded modules. Look for repeated appearances of nvlddmkm.sys, amdkmdag.sys, igdkmd64.sys, dxgkrnl.sys, or third-party kernel filters.
-
-
Isolating App-Level Codecs
- In editors/players, switch between decoding backends:
- Prefer Software decode temporarily.
- If available, choose different hardware decode APIs (e.g., DXVA2, D3D11, NVDEC, AMF, Intel Quick Sync) to pinpoint a specific acceleration path causing the issue.
- In editors/players, switch between decoding backends:
-
Power and Thermals Profiling
- Use HWiNFO logging during workload to detect power spikes, throttling, or thermal runaway.
- If KERNEL_MODE_HEAP_CORRUPTION aligns with power transients, suspect PSU or aggressive GPU power tuning.
Caution: Advanced tools can produce more BSODs by design. Work methodically and keep backups and restore options ready.
When to Seek Professional Help
Consider professional diagnostics or hardware replacement if:
- BSODs persist after a clean GPU driver install, codec resets, and platform driver updates.
- MemTest86 reports RAM errors even at default speeds.
- The system only stabilizes when using an alternate GPU or PSU.
- Minidumps repeatedly flag the same hardware driver after multiple known-good driver versions.
- You lack time or resources to continue advanced testing (e.g., swapping components).
Technicians can perform bench testing with known-good parts, deep thermal/power diagnostics, and vendor-specific firmware updates.
Prevention Tips
Keep KERNEL MODE HEAP CORRUPTION at bay with disciplined maintenance:
-
Driver hygiene
- Avoid beta/unstable GPU drivers unless needed.
- Use DDU when switching vendors or after major issues.
- Update chipset, iGPU, and audio/USB drivers periodically.
-
Codec sanity
- Avoid third-party codec packs unless required; rely on Media Foundation or app-bundled codecs.
- Keep video apps updated; test hardware acceleration carefully after updates.
-
Stable configurations
- Keep XMP only if proven stable; run memory tests after changes.
- Avoid aggressive overclocks/undervolt for production systems.
- Maintain adequate PSU headroom and cooling.
-
System integrity
-
Run periodic checks:
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
chkdsk /scan -
Monitor storage SMART and replace aging disks early.
-
-
Update cadence
- Apply Windows updates routinely but delay major driver changes if your system is stable.
- Create a Restore Point before big updates.
-
Backups
- Keep verified system images and file backups for quick recovery.
Conclusion
The KERNEL_MODE_HEAP_CORRUPTION BSOD often traces back to GPU drivers, hardware-accelerated codecs, or related third-party hooks. By methodically applying the steps above—health checks, clean boot, DDU-based driver reinstalls, codec resets, platform driver and BIOS updates, minidump analysis with WinDbg/BlueScreenView, and targeted diagnostics like Driver Verifier—you can pinpoint the faulty module and restore stability.
Most blue screens are fixable with the right approach. Take it step by step, test between changes, and don’t hesitate to escalate to hardware validation or professional help if needed. With careful troubleshooting and prevention practices, your system should run reliably under even the most demanding GPU/codec workloads.
FAQ
Can I ignore the KERNEL_MODE_HEAP_CORRUPTION BSOD if it only happens occasionally?
No. Even infrequent crashes signal low-level instability—often in graphics drivers or codec paths—that can worsen over time and risk data loss. Follow the troubleshooting steps to identify and fix the root cause.
Does this error mean my hardware is failing?
Not necessarily. Many cases are due to buggy drivers, codec conflicts, or unstable settings like XMP or GPU overclocks. However, if issues persist after software fixes, test RAM, GPU, PSU, and storage to rule out hardware faults.
WinDbg points to dxgkrnl.sys. Is that the real culprit?
Often, no. dxgkrnl.sys is the DirectX kernel component and appears in the stack when GPU pipelines are involved. The true culprit is usually a vendor driver (e.g., nvlddmkm.sys, amdkmdag.sys, igdkmd64.sys) or a third-party kernel module. Use minidumps, Driver Verifier, and version testing to isolate it.
Will reinstalling Windows fix KERNEL MODE HEAP CORRUPTION?
A clean install or in-place repair can resolve deep corruption or driver conflicts, but if underlying hardware or firmware issues exist, the BSOD may return. Try the step-by-step fixes first; consider repair install toward the end.
- Disable hardware acceleration in the app to confirm the cause.
- Remove codec packs; rely on native Media Foundation or vendor codecs.
- Update GPU drivers and the app itself.
- Try alternate decode paths (e.g., DXVA2, D3D11, NVDEC, AMF, Intel Quick Sync).
- Keep overlays and capture tools off while testing.
Helpful reminder: Keep a log of each change and result. That record accelerates root-cause discovery and helps you maintain a stable, high-performance Windows environment.