Skip to content
0x0000007FUNEXPECTED_KERNEL_MODE_TRAPStop codeWidely reported

UNEXPECTED_KERNEL_MODE_TRAP (0x7F): what it means and how to fix it

Updated Oct 19, 2026 · Checked against Microsoft documentation · How this page is made

Quick answer

Stop code 0x0000007F indicates that the processor triggered a trap that the Windows kernel could not catch or handle. It is most frequently caused by faulty or mismatched RAM, processor overclocking, or driver conflicts that overflow the system stack. Testing your memory with the Windows Memory Diagnostic is the best first step.

What it means

When Windows halts with stop code 0x0000007F, the central processor generated an internal condition known as a trap, and the operating system kernel failed to intercept it. To protect your file system and prevent data corruption, Windows immediately stops execution and displays a blue screen.

Traps and Double Faults

Traps fall into two general groups: bound traps that the kernel is forbidden from catching, and double faults. A double fault happens when the processor encounters a new error while already attempting to process an earlier error. Because the CPU cannot process both exceptions at the same time, a system crash occurs.

The first parameter on the blue screen indicates the specific trap number reported by the CPU. Frequent trap codes include:

  • 0x00000000: Divide by Zero Error, which can result from software faults or hardware memory corruption.
  • 0x00000006: Invalid Opcode, triggered when the processor tries to run an invalid instruction because memory corruption sent it to the wrong address.
  • 0x00000008: Double Fault, typically signaling hardware issues or a kernel stack overflow.

Why Traps Happen

Hardware defects trigger the vast majority of 0x7F errors. Mismatched, damaged, or poorly seated memory modules cause erratic data transfers and memory corruption. Setting CPU speeds beyond rated specifications through overclocking also disrupts processor stability and generates traps. Motherboard flaws, such as a scratched circuit trace or a defective component, as well as an unstable power supply, can trigger identical failures.

Software can also provoke this crash when operating in kernel space. A double fault often occurs when multiple drivers attach to the same kernel stack—such as multiple file system filter drivers or backup programs. When the driver stack runs out of memory, it hits a guard page, causing a kernel stack overflow that forces the system to stop.

Common causes

  • Faulty, damaged, or mismatched RAM modules.
  • CPU overclocking pushing the processor past its rated operating limits.
  • A kernel stack overflow caused by multiple drivers operating on the same stack.
  • Outdated or incompatible hardware drivers, particularly storage controllers and network adapters.
  • Defective physical components, including motherboards, scratched traces, or failing power supplies.

How to fix it

Safest and most likely fixes first. Readers' answers to "Did this fix it?" reorder this list over time.

  1. Test your RAM with Windows Memory Diagnostic

    Use this first, as faulty or mismatched memory modules are the leading cause of trap crashes.

    1. Press Windows Key + R, type mdsched.exe into the Run dialog, and press Enter.
    2. Select the option to restart now and check for problems.
    3. Wait for the computer to reboot and complete the diagnostic test pass.
    4. Sign back into Windows to view the test report in the notification area.
    Did this fix it?
  2. Reset CPU overclocking and disable BIOS memory caching

    Use this if your processor is overclocked or if you customized performance settings in your motherboard firmware.

    1. Restart your computer and press the required key during startup (such as F2, F10, or Del) to enter the BIOS or UEFI setup.
    2. Navigate to the CPU performance or frequency settings.
    3. Return the CPU clock speed and voltage parameters to their default factory values.
    4. Locate and disable the memory caching option if your BIOS provides that setting.
    5. Save your changes and restart the computer.
    Did this fix it?
  3. Remove recently installed hardware

    Use this if the crash started occurring after adding new RAM, storage drives, or internal components.

    1. Shut down the computer and disconnect the power supply cable.
    2. Disconnect or unseat any recently added hardware components.
    3. If you added new memory to existing sticks, remove the new modules to check for RAM mismatches.
    4. Power the computer back on to see if Windows runs without errors.
    Did this fix it?
  4. Examine the System log in Event Viewer

    Use this to identify which specific driver or hardware component triggered an error before the blue screen.

    1. Right-click the Start menu button and select Event Viewer.
    2. Expand the Windows Logs section on the left and click System.
    3. Scroll through the log entries recorded directly before the crash time.
    4. Look for Error or Warning entries that name a driver file, disk controller, or failing system service.
    Did this fix it?
  5. Update BIOS, storage controller, and network drivers

    Use this when Event Viewer indicates hardware device errors or when running older system firmware.

    1. Visit your computer or motherboard manufacturer's official support website.
    2. Search for your specific model and locate the driver downloads section.
    3. Download and install the newest updates for your BIOS/ACPI, hard drive controllers, and network adapters.
    4. Open Settings, navigate to Windows Update, and install any remaining operating system updates.
    Did this fix it?

Is it just you?

25+ Microsoft Q&A threads discuss this. Most recent activity:

Checked Oct 19, 2026. Refreshed automatically every few days.

Sources

Frequently asked questions

What does trap code 0x00000008 mean?

Trap code 0x00000008 indicates a double fault, which occurs when the processor encounters an exception while already processing an earlier error. This is usually caused by a kernel stack overflow from conflicting drivers or failing physical hardware.

Can bad RAM cause UNEXPECTED_KERNEL_MODE_TRAP?

Yes. Mismatched or physically defective memory modules frequently corrupt data instructions and prevent the CPU from executing commands properly, leading directly to a 0x7F crash.

How do I fix 0x7F if my PC crashes on startup?

Boot Windows into Safe Mode to stop third-party drivers from loading. From Safe Mode, you can uninstall recent drivers, or use the Recovery Console to rename faulty driver files preventing normal startup.

Does overclocking cause error 0x0000007F?

Yes. Operating the processor above its rated clock speed causes timing issues and CPU traps. Reverting processor settings to default in your BIOS resolves overclock-related crashes.