# 4.17 (release) Painting on landscape crashes editor

**URL:** <https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426>\
**Category:** World Creation\
**Tags:** UE4-17, crash-editor, unreal-engine, Landscape, editor, question\
**Created:** [August 8, 2017, 4:31pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426 "2017-08-08T16:31:15Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_bb2c1c15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bb2c1c15](https://forums.unrealengine.com/u/anonymous_user_bb2c1c15)\
**Post date:** [August 8, 2017, 4:31pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/1 "2017-08-08T16:31:15Z")

</div>

4.17 (release) Painting on landscape crashes editor every time.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_565e242f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_565e242f](https://forums.unrealengine.com/u/anonymous_user_565e242f)\
**Post date:** [August 9, 2017, 2:43pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/2 "2017-08-09T14:43:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bb2c1c15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bb2c1c15](https://forums.unrealengine.com/u/anonymous_user_bb2c1c15)\
**Post date:** [August 9, 2017, 2:49pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/3 "2017-08-09T14:49:23Z")

</div>

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}

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_565e242f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_565e242f](https://forums.unrealengine.com/u/anonymous_user_565e242f)\
**Post date:** [August 9, 2017, 3:11pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/4 "2017-08-09T15:11:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bb2c1c15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bb2c1c15](https://forums.unrealengine.com/u/anonymous_user_bb2c1c15)\
**Post date:** [August 9, 2017, 3:28pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/5 "2017-08-09T15:28:06Z")

</div>

It works fine in 4.16 with the exact same setup. What is the best way to provide the material?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_565e242f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_565e242f](https://forums.unrealengine.com/u/anonymous_user_565e242f)\
**Post date:** [August 9, 2017, 3:38pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/6 "2017-08-09T15:38:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Teiwaz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teiwaz](https://forums.unrealengine.com/u/Teiwaz)\
**Post date:** [August 11, 2017, 8:56pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/7 "2017-08-11T20:56:38Z")

</div>

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](https://cdn2.unrealengine.com/HostForForums/2017/Landscape-Twitch-Stream-20170118T165040Z-f60e197f28668f8a14ecdd021d6d598672404573.zip)) just with different textures and layer names.

---

<div class="post-metadata">

**Author:** ![ziga.osolin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ziga.osolin](https://forums.unrealengine.com/u/ziga.osolin)\
**Post date:** [August 14, 2017, 8:40pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/8 "2017-08-14T20:40:52Z")

</div>

I am experiencing the same issues with my maters.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_565e242f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_565e242f](https://forums.unrealengine.com/u/anonymous_user_565e242f)\
**Post date:** [August 15, 2017, 3:41pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/9 "2017-08-15T15:41:56Z")

</div>

Thanks all, i’ll see what i can find using the provided material, and hopefully will be able to provide a quick fix.

---

<div class="post-metadata">

**Author:** ![ziga.osolin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ziga.osolin](https://forums.unrealengine.com/u/ziga.osolin)\
**Post date:** [August 19, 2017, 7:50am UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/10 "2017-08-19T07:50:01Z")

</div>

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)](https://issues.unrealengine.com/issue/UE-47531)

---

<div class="post-metadata">

**Author:** ![ziga.osolin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ziga.osolin](https://forums.unrealengine.com/u/ziga.osolin)\
**Post date:** [August 19, 2017, 9:24am UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/11 "2017-08-19T09:24:15Z")

</div>

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)

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bb2c1c15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bb2c1c15](https://forums.unrealengine.com/u/anonymous_user_bb2c1c15)\
**Post date:** [August 22, 2017, 4:28pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/12 "2017-08-22T16:28:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_565e242f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_565e242f](https://forums.unrealengine.com/u/anonymous_user_565e242f)\
**Post date:** [August 23, 2017, 3:08pm UTC](https://forums.unrealengine.com/t/4-17-release-painting-on-landscape-crashes-editor/398426/13 "2017-08-23T15:08:05Z")

</div>

See this other post for more info on how to resolve your issue for now.

> **[(4.17.1) Editor Crashes when I click paint in Landscape Mode](https://forums.unrealengine.com/questions/697254/4171-editor-crashes-when-i-click-paint-in-landscap.html)**
>
> 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...
