4.17 (release) Painting on landscape crashes editor every time.
Sure,
I open the editor, click on my landscape, select the paint tool, and the editor crashes every time. Here is the error.
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 Landscape_Shader_Main! 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}
It works fine in 4.16 with the exact same setup. What is the best way to provide the material?
I am experiencing the same issues with my maters.
Hi,
Would it be possible to provide more info on what exactly you’re doing to get it to crash? Is it 100% of the time?
Are you using a custom material to paint on the landscape?
What are the settings for the landscape you’re using?
Thanks
Was it happening in 4.16 with the same material and landscape map?
Can you provide the material in question so i can debug and see what is actually happening and provide support for it?
Thanks
Upload the material on dropbox (for example) or any other website like this. So i’ll be able to fetch it.
If you can’t, provide a screenshot of how you’re material is setup in the Material Editor.
I’m seeing this as well in 4.17, on terrains that worked fine in 4.16. The material hasn’t changed.
My material is exactly the same as the twitch training stream - currently it’s just a copy-paste of the provided landscape material (here: https://cdn2.unrealengine.com/HostForForums/2017/Landscape-Twitch-Stream-20170118T165040Z-f60e197f28668f8a14ecdd021d6d598672404573.zip) just with different textures and layer names.
Thanks all, i’ll see what i can find using the provided material, and hopefully will be able to provide a quick fix.
I created a debug editor build and found that the crash occurs when trying to find a s shader (and failing). I guess this is this bug: Unreal Engine Issues and Bug Tracker (UE-47531)
I experimented some more. The issue is that thumbnail materials do not get cached. You can use this “easy fix” for now but be sure to revert to the correct one once they solve this issue (this fix will just create all thumbnail permutations, thus leading to more memory/performance loss):
In LandscapeRenderer.cpp
bool ShouldCache(EShaderPlatform Platform, const FShaderType* ShaderType, const FVertexFactoryType* VertexFactoryType) const override
{
if (VertexFactoryType)
{
if (bIsLayerThumbnail)
{
return true; //< This is the added line, always cache the layer
// Thumbnail MICs are only rendered in the preview scene using a simple LocalVertexFactory
static const FName LocalVertexFactory = FName(TEXT("FLocalVertexFactory"));
if (VertexFactoryType->GetFName() == LocalVertexFactory)
Upon upgrading to the 4.17.1 hotfix my crash issue has gone away. Has anyone else experienced this? I don’t believe it was listed as a fixed problem, but its seems to be fixed now.
See this other post for more info on how to resolve your issue for now.