Ensure condition failed: InSizeAfterCompaction > 0 [File:D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp] [Line: 3456] LogOutputDevice: Error: Compacted acceleration structure size is expected to be non-zero. This error suggests that GPU readback synchronization is broken.
There are two solutions
Fixed by setting DirectX11 instead of DirectX12 in the DefaultGame.ini
Another fix is to keep using DirectX12, but set the Editor window not to fullscreen, the window can be scaled as large as needed, the crash no longer occurs.
The error you’re encountering in Unreal Engine (UE5) with an AMD GPU and DirectX 12 (DX12) occurs due to issues with GPU memory allocation and synchronization when moving the Editor window. There are two potential solutions:
Switch to DirectX 11: Change the graphics API in your DefaultGame.ini to use DX11 instead of DX12, which avoids the synchronization problem
Avoid fullscreen mode in DirectX 12: Keep using DX12 but ensure the Editor window is not in fullscreen mode, as the crash doesn’t occur when the window is resized instead of fullscreen
We’ve recently ran into this situation and currently using DX11 as the temp fix. It’s weird though because we have other computers with the same specs and drivers and it’s not experiencing the same issues on the same project. Not sure if there are other discprepancies to check for the cause. In our scenario this is specifically happening when we have control rigs open and switching the selection context between controls, and randomly it would crash shortly afterwards. During this time, GPU memory usage is only around 50-60%.
I may have semi resolved it in my case but not sure if others will find this helpful. It seems like the viewport gets into a weird lighting model state that is inconsistent with defaults lighting model. Even adjusting it to use defaults didn’t kick it back, and this was the case in a default Basic level.
The fix was to split the viewport into left and right mode, and the you’ll see the lighting fixed on one of the split viewports (note that ever viewport can be split on their own into sub viewports). From there, maximize the correctly lit viewport and it should look like default settings again and it stopped crashing. It seems like when it’s in that weird lighting model, exposure was super blown out as if the shading was continually accumulating additive alphas. I’m not sure how to get it back to that original state again but it seems like that is causing some weird buffer accumulation/allocation that cause the error in the logs.
Roughly 2 weeks ago (min-May), out of nowhere, I started to have similar UE (5.5.4) crashes when a certain DT was opened (or its existing tab was switched to if already opened). Coincidentally this started after the recent Windows 11 update (not saying it is or is not related).
I have an Nvidia GPU, not AMD. It had the previous version of the studio driver, but after the first week of this issue, I upgraded to the latest studio driver and rebooted. I also deleted all temporary folders in the project. But the problem returns sometimes, but not every time.
The crash can occur with no other assets open, simply opening that one DT would initiate a crash. Opening other DTs dirst did not have this problem, but then opening that one crashed. Keeping windows at full screen did not prevent crashes in my case.
The specific (and consistent) error from the crash log: LogWindows: Error: appError called: Assertion failed: TryAllocateInternal(InSize, AllocationAlignment, AllocationResourceType, AllocationData) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12PoolAllocator.cpp] [Line: 375]
At this point I do not have a confirmed work-around (I do not wish to change to DX11), but wanted to provide additional information on the issue.