0XC0000028

STATUS_BAD_STACK (0xC0000028) – Stack Unwind Alignment Fix

Programming & Dev Tools Advanced 👁 2 views 📅 May 29, 2026

Happens when a driver or DLL corrupts the stack alignment during exception handling. Usually triggered by bad Win32 API calls or buggy anti-cheat software.

When You'll See This Error

You're running a game or a graphics-heavy app on Windows 10/11 (x64). Everything's fine until the app crashes with 0xC0000028. Sometimes you get a blue screen, sometimes just a crash dump in Event Viewer under WER (Windows Error Reporting). The trigger is almost always a misaligned stack pointer during an exception unwind — usually when the app catches an exception or calls a callback function from a poorly-written driver or a packed DLL.

Root Cause

The x64 architecture requires the stack pointer (RSP) to be 16-byte aligned at function call boundaries. If a driver, a third-party DLL (like anti-cheat, overlay software, or a buggy GPU driver), or a manually written assembly stub pushes data on the stack incorrectly, the unwind operation (used during exception handling) sees an odd address and throws STATUS_BAD_STACK.

The culprit here is almost always something that injects code into your process — anti-cheat software (EAC, BattlEye, Vanguard), overlays (Discord, MSI Afterburner, RivaTuner), or outdated GPU drivers. Rarely, it's a bug in the app itself (like a custom exception filter in C++).

How to Fix It

  1. Update your GPU drivers. Remove the old ones completely with DDU, then install the latest from NVIDIA or AMD. Do NOT use Windows Update drivers — they're often outdated and missing stack alignment patches.
  2. Disable all overlay software. Turn off Discord overlay, GeForce Experience overlay, MSI Afterburner/RivaTuner Statistics Server, and any game bar overlays. Uninstall RivaTuner if you have it — it's notorious for breaking stack alignment on 64-bit apps.
  3. Check for anti-cheat conflicts. If the crash happens in a game with anti-cheat (like Valorant, Fortnite, or PUBG), disable any third-party DLL injectors, macros, or mouse software that hooks into processes (Logitech G Hub, Razer Synapse). Sometimes you need to uninstall them completely.
  4. Run a stack alignment test. Use WinDbg (from Windows SDK) to analyze the crash dump. Open the dump file and run !analyze -v. Look for the FAULTING_IP — it'll point to a module. If it's a third-party DLL, that's your culprit. Example output:
FAULTING_IP: 
overlay64+0x1234
mov qword ptr [rsp+8], rcx

That overlay64 module = your overlay software.

If it's a driver or kernel module

Same process, but look for .sys files in the stack trace. Update or remove that driver. For example, e1i63x64.sys (Intel network driver) had alignment bugs in older versions — update from Intel's site, not from Dell/HP.

Still failing?

Three things left to try:

  • Disable Control Flow Guard (CFG) for that specific app. Go to Windows Security > App & browser control > Exploit protection settings > Program settings > Add the EXE, then set Control flow guard (CFG) to Off. This forces the OS to not use the hardened stack unwinder, which sometimes works around the bug.
  • Switch to a clean boot. Run msconfig > Services tab > Hide all Microsoft services > Disable all > Restart. If the error goes away, enable services one by one until you find the offender.
  • Check for packed DLLs. Some apps (especially older games) ship with UPX-packed DLLs. Unpack them with upx -d (from your command line, not the Windows store version), or replace with the original unpacked version if available.

If you've done all that and it still crashes, file a bug with the software vendor. Include a full memory dump from %LOCALAPPDATA%\CrashDumps — don't send a mini dump, it won't show the stack unwind info they need.

Was this solution helpful?