(4.17.1) Editor Crashes when I click paint in Landscape Mode

I’ve recreated the landscape in a new project with the same result. It seems to only crash on landscapes with layers in the material as soon as I click the Paint button under the Landscape mode. The crash log mentioned the skylight, so I deleted it with the same result as well. It crashes every single time.

Here is the crash log:

Fatal error: [File:D:\Build\++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp] [Line: 1867] Couldn't find Shader TBasePassPSFCachedPointIndirectLightingPolicySkylight for Material Resource M_FortBraggSurface! RenderMeshShaderMap 1, RenderThreadShaderMap 1 GameMeshShaderMap 1, GameThreadShaderMap 1, bShaderWasFoundInGameShaderMap 0 With VF=FLocalVertexFactory, Platform=PCD3D_SM5 ShouldCache: Mat=0, VF=1, Shader=1 MaterialUsageDesc: LightingModel=MSM_DefaultLit, BlendMode=BLEND_Opaque, SpecialEngine=0, TwoSided=0, TSNormal=1, Masked=0, Distorted=0, WritesEveryPixel=1, ModifiesMeshPosition=0, Usage={bUsedWithStaticLighting}

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_Engine!FMaterial::GetShader() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\materials\materialshared.cpp:1854]
UE4Editor_Renderer!GetUniformBasePassShaders<2>() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\basepassrendering.cpp:778]
UE4Editor_Renderer!GetBasePassShaders<FUniformLightMapPolicy>() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\basepassrendering.cpp:834]
UE4Editor_Renderer!TBasePassDrawingPolicy<FUniformLightMapPolicy>::TBasePassDrawingPolicy<FUniformLightMapPolicy>() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\basepassrendering.h:1040]
UE4Editor_Renderer!FDrawBasePassStaticMeshAction::Process<FUniformLightMapPolicy>() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\basepassrendering.cpp:462]
UE4Editor_Renderer!ProcessBasePassMesh<FDrawBasePassStaticMeshAction>() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\basepassrendering.h:1563]
UE4Editor_Renderer!FBasePassOpaqueDrawingPolicyFactory::AddStaticMesh() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\basepassrendering.cpp:511]
UE4Editor_Renderer!FStaticMesh::AddToDrawLists() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\scenecore.cpp:366]
UE4Editor_Renderer!FPrimitiveSceneInfo::AddStaticMeshes() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\primitivesceneinfo.cpp:151]
UE4Editor_Renderer!FPrimitiveSceneInfo::AddToScene() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\primitivesceneinfo.cpp:204]
UE4Editor_Renderer!FScene::AddPrimitiveSceneInfo_RenderThread() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\rendererscene.cpp:517]
UE4Editor_Renderer!<lambda_0628b7e343e078d62bb69bb7a0b80e2d>::operator()() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\renderer\private\rendererscene.cpp:787]
UE4Editor_Renderer!TGraphTask<TEnqueueUniqueRenderCommandType<`FScene::AddPrimitive'::`2'::AddPrimitiveCommandName,<lambda_0628b7e343e078d62bb69bb7a0b80e2d> > >::ExecuteTask() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:784]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:650]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:559]
UE4Editor_RenderCore!RenderingThreadMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:325]
UE4Editor_RenderCore!FRenderingThread::Run() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:459]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]

I have the same issue. Haven’t been able to find a fix. Hopefully Epic will look into it:

Fatal error: [File:D:\Build++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp] [Line: 1867] Couldn’t find Shader TBasePassPSFCachedPointIndirectLightingPolicySkylight for Material Resource MAT_Landscape_Island_Beach! RenderMeshShaderMap 1, RenderThreadShaderMap 1 GameMeshShaderMap 1, GameThreadShaderMap 1, bShaderWasFoundInGameShaderMap 0 With VF=FLocalVertexFactory, Platform=PCD3D_SM5 ShouldCache: Mat=0, VF=1, Shader=1 MaterialUsageDesc: LightingModel=MSM_DefaultLit, BlendMode=BLEND_Opaque, SpecialEngine=0, TwoSided=0, TSNormal=1, Masked=0, Distorted=0, WritesEveryPixel=1, ModifiesMeshPosition=0, Usage={bUsedWithStaticLighting}
6]

I just have the same problem with you, can’t paint on my landscape in 4.17.1 it always crashes the editor :frowning:

Hi all.

The crash you are experiencing appears to be due to the issue we are tracking as UE-44076 (Crash When Opening Static Mesh After Enabling Forward Shading And Disabling “Support Stationary Skylight”). It is reproducable when “Forward Shading” and “Support Stationary Skylight” are enabled. You could try disabling these as a temporary workaround. If you continue to experience the crash afterwards with different reproduction steps, please let us know.

Cheers

I’ve disabled “Support Stationary Skylight” and it works now. Thanks!

Thanks Stephen, in the time being, I disable the “support stationary skylight” and change the skylight to movable and it work. Will there be a bug fix patch in version 4.17 for this problem? or it will be fix in 4.18?

The fix is currently targeted for the 4.18 release. I’ll discuss if there is an opportunity to get the fix for a 4.17 hotfix, but there is no guarantee.

This was driving me crazy too. Thanks for the help everyone. Disabling the “support stationary skylight” in project settings stopped the crashing.

In 4.20.1 if you enabled “Forward Shading” and disabled “Support Stationary Skylight”, you will get crash(same error).

Yes, the fix for this crash had been delayed. Now currently targeting the 4.21 release.

Just tried this on 4.20.1 with both Forward Shading and Stationary Skylight disabled, still produces the same error and crashes.

Have the same problem with the Oculus Source Distribution 4.20.2 ion my VR project.
Do I have to work without the forward shading also ?

UPDATE:
I just change the Support Stationary Skylight to enabled and kept my Forward Shading and now I can access the material without crash !

I’m having this issue on 4.21.3. If I disable Support PointLight WholeSceneShadows, every time I try to drag a point or rect light in the level, it crashes. Unless there’s nothing with a lit material in it.

I fixed the issue by setting the scene to unlit, and switching the landscape material back and forth with another material a few times, for some reason it just finally starting working right. At best guess I think it has something to do with the shaders.