When a game switches between Windowed and Windowed Fullscreen (borderless), or is minimized and restored, a deferred WM_SIZE message can be processed after the window state has already changed. FWindowsApplication::ProcessDeferredMessage uses the client size stored in that message's lParam, which is no longer current. That stale size goes through FSlateApplication::OnSizeChanged, then FSlateRHIRenderer::RequestResize and FSlateViewportInfo::ResizeViewport, and finally RHIResizeViewport. IDXGISwapChain::ResizeBuffers then fails with DXGI_ERROR_INVALID_CALL and the game hits a fatal error.
The problem is reportedly more frequent with frame generation enabled (FSR 3 FG or XeSS FG), because their swapchain proxies may not tolerate unexpected resizes well.
In Engine/Source/Runtime/ApplicationCore/Private/Windows/WindowsApplication.cpp, FWindowsApplication::ProcessDeferredMessage, case WM_SIZE: use the window's current client size and minimized state instead of the values in the deferred message.
case WM_SIZE: { if( CurrentNativeEventWindowPtr.IsValid() ) { // @todo Fullscreen - Perform deferred resize // Note WM_SIZE provides the client dimension which is not equal to the window dimension if there is a windows border int32 NewWidth = (int)(short)(LOWORD(lParam)); int32 NewHeight = (int)(short)(HIWORD(lParam)); bool bWasMinimized = (wParam == SIZE_MINIMIZED); // WM_SIZE is deferred while messages are pumped outside the main loop (e.g. in FlushRenderingCommands), so it can be // processed after the window was resized, minimized or restored again, e.g. by a switch to borderless fullscreen. // Use the window's current state so a stale size doesn't resize the back buffer away from the window's actual size. RECT ClientRect; if (::GetClientRect(hwnd, &ClientRect)) { NewWidth = ClientRect.right - ClientRect.left; NewHeight = ClientRect.bottom - ClientRect.top; bWasMinimized = ::IsIconic(hwnd) != FALSE; } const FGenericWindowDefinition& Definition = CurrentNativeEventWindowPtr->GetDefinition(); if ( Definition.IsRegularWindow && !Definition.HasOSWindowBorder ) { CurrentNativeEventWindowPtr->AdjustWindowRegion(NewWidth, NewHeight); } const bool bIsFullscreen = (CurrentNativeEventWindowPtr->GetWindowMode() == EWindowMode::Type::Fullscreen); // When in fullscreen Windows rendering size should be determined by the application. Do not adjust based on WM_SIZE messages. if ( !bIsFullscreen ) { const bool Result = MessageHandler->OnSizeChanged(CurrentNativeEventWindowPtr.ToSharedRef(), NewWidth, NewHeight, bWasMinimized); } } } break;
If GetClientRect fails (for example, the window was already destroyed), the code falls back to the message values.
1. Launch a D3D12 Windows game build (Shipping or Test) in Windowed mode.
2. Enable frame generation (FSR 3 Frame Generation or XeSS Frame Generation). This makes the issue much more frequent, but it also reproduces without FG.
3. Repeatedly toggle the window mode between Windowed and Windowed Fullscreen (borderless), e.g. with Alt+Enter or the video settings menu. Do this quickly and several times in a row.
4. Optionally, also minimize and restore the window during or just after a toggle (Win+D or the minimize button), with the game window losing focus.
5. Expected: the window mode changes and rendering continues at the new size.
6. Actual: the game crashes with a fatal error: "SwapChain1->ResizeBuffers(...) failed ... with error DXGI_ERROR_INVALID_CALL", with a callstack through FWindowsApplication::ProcessDeferredEvents -> ProcessDeferredMessage -> FSlateApplication::OnSizeChanged -> FSlateViewportInfo::ResizeViewport -> RHIResizeViewport. The Size in the error often does not match the window's actual size (e.g. 160x28, approximately a minimized window).
Repro rate: intermittent. It depends on timing, because the WM_SIZE message has to be deferred while messages are pumped outside the main loop (e.g. during FlushRenderingCommands).
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-411145 in the post.
| 0 |
| Component | UE - Rendering - RHI |
|---|---|
| Affects Versions | 5.8, 6.0 |
| Created | Nov 5, 2026 |
|---|---|
| Resolved | Nov 6, 2026 |
| Updated | Dec 4, 2026 |