Summary
I am trying to find a solution for why Space Marine 2 crashes constantly
Nvidia Graphics Card RTX 5090
Nvidia GeForce Driver 595.71
Gsync Monitor 5120x1440
Space Marine 2 latest patch
Assertion failed: (((HRESULT)(::DwmExtendFrameIntoClientArea(HWnd, &Margins))) >= 0) [File:D:\build++Distro\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsWindow.cpp] [Line: 359]
Please select what you are reporting on:
Creative
What Type of Bug are you experiencing?
Other
Steps to Reproduce
Difficult to reproduce but after the latest Space Marine hot fix it crashes almost every game. It can happen in menu, in the lobby or during gameplay
Space Marine 2 closes and the Epic Games Crash Reporter opens with the error
Expected Result
Space Marine 2 crashes to the deskop
Observed Result
Space Marine 2 crashes to the deskop
Platform(s)
Windows PC Windows 11
Additional Notes
Claude Research
Fixing the DwmExtendFrameIntoClientArea crash in Space Marine 2
The crash is a confirmed Unreal Engine bug where the engine fatally asserts instead of gracefully handling a transient Windows DWM failure — and your RTX 5090 driver 595.71 is almost certainly triggering it. The assertion in WindowsWindow.cpp line 359 fires whenever DwmExtendFrameIntoClientArea returns a negative HRESULT, typically because Desktop Window Manager composition was momentarily disrupted by a GPU driver reset (TDR event). Driver 595.71 is one of the most problematic Nvidia releases in recent memory, with documented voltage capping, TDR crashes, and black screen issues that directly cause DWM disruptions. The good news: there are multiple proven fixes, and Epic has acknowledged the underlying bug (tracked as FORT-1060673, moved to “Ready for QA” on February 26, 2026).
Why the engine crashes instead of recovering
The crash originates in Unreal Engine’s Windows platform layer, not in Space Marine 2’s game code. At line 359 of WindowsWindow.cpp, Epic uses a hard verify() assertion on the return value of DwmExtendFrameIntoClientArea, a Win32 API that extends the window frame into the client area for transparency and compositing effects. When this API returns any failure HRESULT — most commonly DWM_E_COMPOSITIONDISABLED (0x80263001) — the engine immediately terminates.
The trigger sequence works like this: a GPU driver reset or TDR event occurs (the screen may briefly flicker or go black), which causes DWM to lose its Direct3D device and temporarily disable composition. If Unreal Engine happens to call DwmExtendFrameIntoClientArea during this brief window of DWM recovery, the API returns a failure code, and the assertion kills the application. Microsoft’s own Windows Terminal team fixed this identical pattern in their code (PR #3460), converting their crash-on-failure to a log-and-continue approach. Unreal Engine has not yet shipped this fix, though Epic’s internal ticket suggests a patch is in progress.
Critically, this crash affects the Epic Games Launcher itself (the call stack shows EpicGamesLauncher frames), which means the launcher can crash before or alongside the game. This is not a Space Marine 2-specific bug — it affects any application built on this Unreal Engine code path, including UEFN.
Driver 595.71 is the likely primary culprit
Nvidia driver 595.71 is widely documented as severely problematic. Released March 2, 2026 as an emergency replacement for the recalled 595.59 (which caused GPU fans to stop spinning entirely), version 595.71 introduced a new set of critical issues:
- GPU voltage capping that limits boost clocks below 3,000 MHz, causing up to 16% performance loss in benchmarks. This is particularly severe when GPU core offset exceeds 150 MHz in overclocking tools.
- TDR crashes and black screens (nvlddmkm Event ID 153, Kernel-Power Event ID 41) — exactly the kind of GPU driver resets that trigger the DWM assertion failure.
- HDR signal loss, refresh rate switching problems, and hard restarts even at idle.
- Specific UE5 game crashes on RTX 5090, including documented issues with Silent Hill f, Metal Gear Solid Δ, and Space Marine 2 itself.
Multiple RTX 5090 users report Space Marine 2 crashes within minutes of gameplay, with some finding that loading BIOS optimized defaults (removing CPU overclock/PBO) or reducing GPU power limit to 80% resolved the issue. The driver instability creates a perfect storm: TDR events from 595.71’s voltage/performance bugs disrupt DWM, which then triggers the Unreal Engine assertion.
Nvidia released hotfix 595.76 on March 4, 2026, which specifically addresses the voltage capping issue and restores 7% higher benchmark scores and 15–30 FPS gains over 595.71. If rolling back further, 591.86 is the last stable WHQL-certified driver before the troubled 595.xx branch.
The confirmed fix and a prioritized troubleshooting checklist
A user on the Unreal Engine forums (AuraSV, February 25, 2026) discovered that disabling Windows 11 Transparency Effects completely eliminates the crash. This works because with transparency disabled, the engine either skips the DwmExtendFrameIntoClientArea call or the call becomes a no-op, removing the crash trigger entirely. This is the single most reliable fix for the assertion failure specifically.
Here is a prioritized action plan, ordered from highest-impact to supplementary:
- Disable Windows 11 Transparency Effects: Settings → Personalization → Colors → toggle off “Transparency effects.” This directly prevents the assertion from firing.
- Update to driver 595.76 hotfix or roll back to 591.86: Either install the March 4 hotfix (fixes voltage capping and TDR issues) or use DDU in Safe Mode to clean-install 591.86, the last stable WHQL release. The oldest RTX 5090-compatible driver is 572.16.
- Disable Hardware-Accelerated GPU Scheduling (HAGS): Settings → System → Display → Graphics → Change default graphics settings → toggle off HAGS. This is specifically recommended for UE5 games on RTX 5090 and resolves DWM-related GPU scheduling conflicts.
- Disable “Optimizations for windowed games” in the same Graphics settings menu. Combined with disabling HAGS, this fixed the RTX 5090 crash in Silent Hill f (another UE5 title with identical symptoms).
- Run Space Marine 2 in exclusive Fullscreen mode (not Borderless). This bypasses DWM compositing entirely, eliminating the API call that causes the crash. G-Sync also works more reliably in exclusive fullscreen since DWM no longer sits between the game and the Nvidia driver.
- Disable all overlays: Steam overlay, Discord overlay, Nvidia GeForce Experience/App overlay, and especially close RivaTuner/MSI Afterburner entirely. These inject into the rendering pipeline and can provoke DWM disruptions.
Your ultrawide G-Sync setup compounds the problem
The 5120x1440 (32:9) resolution creates additional strain through multiple mechanisms. Unreal Engine 4’s render resolution calculation algorithm produces anomalous results at extreme aspect ratios — one documented case showed an RTX 4090 dropping to 6–8 FPS at 5120x1440 while running at 110 FPS at 2560x1440, even on lowest settings. The horizontal resolution exceeding 4096 pixels also triggers hard crashes in some engine configurations.
Space Marine 2’s ultrawide support, added in Patch 3.0, only properly supports 21:9. At 32:9, the game exhibits severe vertical FOV cropping (Vert- scaling), horizontal stretching, mouse sensitivity imbalance, and heavy vignetting while aiming. There is no FOV slider — the developers explicitly stated FOV changes are “a no-no.”
G-Sync in windowed/borderless mode requires DWM workarounds that the Blur Busters community describes as “basically a hack.” G-Sync + DWM + multi-monitor setups are especially crash-prone, and Windows 11’s compositor has confirmed bugs with Nvidia VRR on high-refresh monitors. For gaming, exclusive fullscreen with G-Sync enabled only for fullscreen applications is the most stable configuration. If crashes persist, temporarily disabling G-Sync entirely (Nvidia Control Panel → Manage 3D Settings → set Monitor Technology to “Fixed Refresh Rate” for Space Marine 2’s profile) will isolate whether VRR is contributing.
For the best playable experience at 32:9, create a custom 3440x1440 or 3600x1440 resolution in Nvidia Control Panel and run the game in Fullscreen at that resolution. You’ll get black bars on the sides but proper FOV and dramatically reduced GPU load.
Additional Space Marine 2 stability fixes
Beyond the DWM-specific crash, Space Marine 2 has several other known crash vectors worth addressing:
- Cap framerate to your monitor’s refresh rate or 60 FPS — widely reported as the single most effective general crash fix for SM2. Uncapped framerates cause GPU power spikes that can trigger TDR events.
- Delete the local settings folder at
%LocalAppData%\Saber\Space Marine 2to clear corrupted configuration or shader cache data. - Disable Ray Tracing in graphics settings — RTX 5090 users specifically report improved stability with RT off.
- Skip the intro cutscene by pressing ESC then holding Enter — crashes during the first cutscene are extremely common.
- EOS (Epic Online Services) overlay conflicts: If using the Epic Games Store version, navigate to
C:\Program Files (x86)\Epic Games\Launcher\Portal\Extras\Overlayand move theEOSOverlayRenderer-Win64-Shipping.exefile to a backup folder. - Remove CPU/memory overclocks when troubleshooting, and consider setting PCIe to Gen 4 instead of Gen 5/Auto in BIOS, as RTX 5090 PCIe Gen 5 signaling has caused instability on some motherboards.
- Increase TDR timeout via registry: at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers, create a new DWORD valueTdrDelayset to10(decimal). This gives the GPU more time before Windows resets the driver, reducing the frequency of DWM disruptions.
Conclusion
This crash sits at the intersection of three problems: an Unreal Engine bug that treats a recoverable DWM failure as fatal, an Nvidia driver release (595.71) that’s uniquely prone to causing the GPU resets that trigger that failure, and a super-ultrawide G-Sync configuration that maximizes GPU stress and DWM complexity. Disabling Windows transparency effects is the immediate fix — it’s simple, costs nothing visually in-game, and directly eliminates the crash trigger. Upgrading to driver 595.76 or rolling back to 591.86 addresses the root instability, and switching to exclusive fullscreen at a 21:9 custom resolution sidesteps both the DWM compositing path and the 32:9 rendering issues. Epic’s internal fix (FORT-1060673) should eventually make the assertion non-fatal, but until that ships, these workarounds are reliable and well-tested across the affected user community.