- Software and digital services
- Operating system
UNEXPECTED_KERNEL_MODE_TRAP
Windows UNEXPECTED_KERNEL_MODE_TRAP: uncaught CPU trap
Risk level
Medium
Proceed carefully and stop if the check is unclear.
Urgency
High
Quick answer
UNEXPECTED_KERNEL_MODE_TRAP (0x7F) appears when the processor generates a trap the kernel fails to catch. If you added hardware, especially memory, remove it first and check whether the error goes away.
Safety first
Stop and check this first
- If your drive is encrypted with BitLocker, locate the recovery key before changing UEFI settings or updating the BIOS.
- Do not open the tower or laptop to swap modules: just disconnect the external items you added and leave the rest to a technician.
- Save your files elsewhere before uninstalling drivers or going back to a restore point.
Safe checks you can perform
- Hardware removed and memory tested
- Overclocking turned off
- Recent driver and the System log
- If the crash hits during a Windows upgrade
Leave these tasks to a qualified professional
- Do not attempt this professional task: Dump and trap number analysis
- Do not attempt this professional task: Motherboard, power supply and memory diagnosis
What a technician must be able to justify
Technician visit
These are the steps they must carry out and show you. Tick them as they work: if steps are skipped, do not accept a part swap.
These are not instructions for opening or handling the equipment yourself. They are the checks that should support a technical conclusion.
Dump and trap number analysis
What they doThe technician opens the dump in WinDbg, runs !analyze -v, reads the trap number and reviews the stack with kv to tell a stack-overflow double fault from a hardware problem.
They must show youthe !analyze -v output, the trap number and the driver or component involved.
In writingwhether the cause is hardware or software and the repair carried out.
Motherboard, power supply and memory diagnosis
What they doIf the tests point to hardware, the technician checks memory, motherboard and power supply with the maker's tools.
They must show youthe hardware test report naming the failing component.
In writingthe part replaced, the reason and the warranty.
Before accepting a part or repair
Nothing has been shown yet. Do not accept a part swap based on the code alone.
Follow these steps
Note: Follow the documented order. An error code identifies the affected system, but it does not prove by itself which part has failed.
Hardware removed and memory tested
- Who:
- you.
- How:
- shut down, disconnect anything you added recently that comes off without tools, start up and run Windows Memory Diagnostic on all of the RAM.
- Result that matters:
- knowing whether the error depends on the added hardware or on memory.
- If it does not return without the device or the test shows errors:
- leave the suspect part out and ask a technician to confirm.
- If it keeps failing and memory passes:
- review drivers and speed settings.
- Evidence to keep:
- what you disconnected and the memory diagnostic result.
Evidence: Troubleshooting Windows unexpected restarts and stop code errors · Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
Overclocking turned off
- Who:
- you, only if you set up the overclock yourself.
- How:
- if you raised the processor or memory speed with the maker's utility or in UEFI, return it to the default values with that same tool.
- Result that matters:
- the processor running within its specification.
- If with factory values 0x7F disappears:
- overclocking was the cause.
- If you never touched those settings or nothing changes:
- leave them alone and move on to drivers.
- Evidence to keep:
- photo of the CPU and memory speed screen before and after.
Before entering UEFI, have your BitLocker recovery key at hand if your drive is encrypted.
Evidence: Find your BitLocker recovery key · Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
Recent driver and the System log
- Who:
- you.
- How:
- open Event Viewer, System log, and look for errors next to the crash; if it started after installing or updating a driver, uninstall it or roll it back in Device Manager, in safe mode if needed.
- Result that matters:
- removing the new driver as a cause.
- If removing it ends the crashes:
- wait for a fixed version from the maker.
- If there were no new drivers:
- check with the maker for BIOS, disk controller and network driver updates.
- Evidence to keep:
- System event and the name of the driver removed.
Evidence: Troubleshooting Windows unexpected restarts and stop code errors · Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
If the crash hits during a Windows upgrade
- Who:
- you.
- How:
- before retrying the upgrade, uninstall third-party drivers and services you do not need, temporarily disable any third-party antivirus and ask the makers for compatible versions.
- Result that matters:
- the upgrade finishing without 0x7F.
- If the upgrade completes:
- turn the antivirus back on and reinstall only what you need.
- If it fails again:
- note the percentage where it stops and consult a technician.
- Evidence to keep:
- list of what you uninstalled and the point where it failed.
Evidence: Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
Still not solved
If the error persists, stop here. See what the technician must do and show you.
Where this code applies
A code is meaningful only inside the right product and version context.
Primary scope
- System
- Software and digital services
- Brand
- Microsoft Windows
- Product type
- Operating system
Known code variants
- 0x0000007F
- 0x1000007F
- 0x7F
- código de detención UNEXPECTED_KERNEL_MODE_TRAP
- STOP 0x0000007F
- stop code UNEXPECTED_KERNEL_MODE_TRAP
- UNEXPECTED KERNEL MODE TRAP
- UNEXPECTED_KERNEL_MODE_TRAP_M
What it means
Microsoft describes 0x0000007F as a processor trap the Windows kernel could not catch: either a trap it is not allowed to catch, or a double fault, meaning a fault raised while an earlier one was being handled. The first parameter gives the trap number; 0x8 is a double fault and 0x6 an invalid instruction. It usually follows installing faulty or mismatched hardware, especially memory, though drivers can cause it too. Seeing this code is not enough to declare the RAM or any other part faulty.
Warnings and stop conditions
- Mediumsource verified
If your drive is encrypted with BitLocker, locate the recovery key before changing UEFI settings or updating the BIOS.
Evidence: Find your BitLocker recovery key · Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
- Mediumsource verified
Do not open the tower or laptop to swap modules: just disconnect the external items you added and leave the rest to a technician.
Evidence: Troubleshooting Windows unexpected restarts and stop code errors · Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
- Lowsource verified
Save your files elsewhere before uninstalling drivers or going back to a restore point.
Evidence: Troubleshooting Windows unexpected restarts and stop code errors
Symptoms and causes
Probable causes · in order
- New hardware faulty or mismatchedCommon
Microsoft notes 0x7F usually comes after installing hardware that is faulty or does not match the rest, above all memory, or when an installed component fails.
Evidence: Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
- Kernel stack overflowPossible
A double fault can happen when several drivers attach to the same stack, for example two file system filter drivers that exhaust it.
Evidence: Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
- Processor pushed above its rated speedPossible
The official page lists overclocking as a possible cause and asks you to return the CPU to its default clock speed.
Evidence: Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
- Incompatible software during a Windows upgradePossible
If it shows up while upgrading Windows, Microsoft points to incompatible drivers, system services, virus scanners or backup tools.
Evidence: Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
Virtual technician
Does UNEXPECTED_KERNEL_MODE_TRAP still appear after these checks?
Answer a few questions to narrow down the likely cause and the safest next action. Guidance only - it never replaces a professional.
Sources and technical references
- 1
Stop code error or bug check troubleshooting (IT professionals)
Microsoft · 2026 · official_doc
- 2
Troubleshooting Windows unexpected restarts and stop code errors
Microsoft · 2026 · official_doc
- 3
Solución de problemas de reinicios inesperados y errores de código de detención de Windows
Microsoft · 2026 · official_doc
- 4
Find your BitLocker recovery key
Microsoft · 2026 · official_doc
- 5
Bug Check 0x7F UNEXPECTED_KERNEL_MODE_TRAP
Microsoft · 2026 · official_doc
Was this entry useful?