Description

I've reproduced this crash in 4.16, 4.17, 4.18, 4.19, and Main.

 

Per licensee:

The editor crashes if distance field ambient occlusion is enabled and a viewport is resized to have zero height.

The issue stems from FTileIntersectionResources::InitDynamicRHI() in DistanceFieldObjectCulling.cpp. When TileDimensions.X * TileDimensions.Y evaluates to zero, it attempts to allocate zero size buffer and crashes.

It's easy to reproduce this by enabling DFAO in the project, opening Window>Viewports>Viewport 2, and resizing the new window until the 3D area's height is zero.

Steps to Reproduce
  1. Open new project, Enable "Generate Mesh Distance Fields" in Project Settings > Rendering, then restart editor.
  2. Place skylight in level set to Movable with Casts Shadows enabled
  3. In Window> Viewport open up a second viewport and resize it to have zero height. You may need to wiggle mouse a bit near the top, as there is a specific height that attempts to render, fails, and crashes.

Result: Crash

Callstack
LoginId:77ac66cf4b506a51a458c382c4ec63c2
EpicAccountId:5caf2c99925243e8b9b1bdcc9cd0e6cf

Assertion failed: Size > 0 [File:D:\Build\++UE4+Release-4.19+Compile\Sync\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11VertexBuffer.cpp] [Line: 12]

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:419]
UE4Editor_D3D11RHI!FD3D11DynamicRHI::RHICreateVertexBuffer() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\windows\d3d11rhi\private\d3d11vertexbuffer.cpp:15]
UE4Editor_RHI!FDynamicRHI::CreateVertexBuffer_RenderThread() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rhi\private\rhicommandlist.cpp:2039]
UE4Editor_RHI!FRHICommandListImmediate::CreateVertexBuffer() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rhi\public\rhicommandlist.h:3824]
UE4Editor_Renderer!RHICreateVertexBuffer() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rhi\public\rhicommandlist.h:4668]
UE4Editor_Renderer!FRWBuffer::Initialize() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rhi\public\rhiutilities.h:70]
UE4Editor_Renderer!FTileIntersectionResources::InitDynamicRHI() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\renderer\private\distancefieldobjectculling.cpp:81]
UE4Editor_RenderCore!FRenderResource::InitResource() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rendercore\private\renderresource.cpp:39]
UE4Editor_Renderer!BuildTileObjectLists() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\renderer\private\distancefieldobjectculling.cpp:632]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::RenderDistanceFieldLighting() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\renderer\private\distancefieldambientocclusion.cpp:833]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::RenderDynamicSkyLighting() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\renderer\private\distancefieldambientocclusion.cpp:1064]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::Render() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\renderer\private\deferredshadingrenderer.cpp:1208]
UE4Editor_Renderer!RenderViewFamily_RenderThread() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\renderer\private\scenerendering.cpp:2749]
UE4Editor_Renderer!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`33'::EURCMacro_FDrawSceneCommand>::ExecuteTask() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:829]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:665]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:574]
UE4Editor_RenderCore!RenderingThreadMain() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:331]
UE4Editor_RenderCore!FRenderingThread::Run() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:465]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.19+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-58000 in the post.

2
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.16.34.17.24.18.34.19.14.20
Target Fix4.20
Fix Commit4016086
CreatedApr 19, 2018
ResolvedApr 20, 2018
UpdatedMay 1, 2018
View Jira Issue