Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial!

Is there a simple way of fixing this Fatal error:

[File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 2397] Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial!
, would just deleting gridmaterial fix it or …
not sure why its referencing d , c is where engine is
I guess I shouldn’t have added point cloud plugins , one for AR, maybe thats it

Trouble is, engine is on C drive, why the D reference ?
How do I go about fixing this, tried getting rid of material mentioned but crashing continued …?

Thx

3 Likes

Hi, I have the same issue. Investigating it right now.

Progress so far:
The exact same project and source built engine works on a different machine that uses visual studio 2019 instead of 2017.
installed latest driver update -> no change.
deleted all generated code and stuff from my project -> no change

[2020.05.25-14.11.45:306] 0]LogShaderCompilers: Warning: 0 Shader compiler errors compiling WorldGridMaterial for platform PCD3D_SM5:
[2020.05.25-14.11.45:306] 0]LogShaderCompilers: Warning: D3DCompile exception
Fatal error: [File:X:/Unreal/UnrealEngine-4.25/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 2397]
Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial!
UE4Editor.exe has triggered a breakpoint.

I don’t understand what the platform PCD3D_SM5 is.
File for the world grid material is present at the location.

help please.

2 Likes

Did you find a any solution for this?

2 Likes

You can try to verify that the UE engine solves, I have solved, the version is 5.0.0

1 Like

I’m getting this in the latest version. 5.0.1
Fatal error. default material WorldGridMaterial! Crashes engine every time.
Isn’t there a Git or another place where we can download these single files and replace on our machines to see if it fixes it?

Otherwise, what, uninstall/reinstall?

1 Like

How do you solve? I have this error now.
I’m on 5.0.1

1 Like

Im getting the same error message:
LoginId:042705d244d011ce1a0a0aacd84a4268
EpicAccountId:8f45c96e34154ff7a5438b34bc24b429

Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 4408] /Engine/Private/Random.ush(536,141): error X3000: syntax error: unexpected token ‘?’ /Engine/Private/SceneData.ush(70): warning: No space between macro name “PRIMITIVE_SCENE_DATA_FLAG_VISIBLE_IN_SCENE_CAPTURE_” and repl-text #define PRIMITIVE_SCENE_DATA_FLAG_VISIBLE_IN_SCENE_CAPTURE_?NLY 0x100000 from /Engine/Private/Nanite/NaniteRasterizer.usf: 4: #include “…/SceneData.ush” /Engine/Private/DeferredShadingCommon.ush:604:2: error: use of undeclared identifier ‘GBuffe’; did you mean ‘GBuffer’? GBuffe?.IndirectIrradiance = DecodeIndirectIrradiance(InGBufferC.a); ^~~~~~ GBuffer /Engine/Private/DeferredShadingCommon.ush:577:15: note: ‘GBuffer’ declared here FGBufferData GBuffer; ^ /Engine/Private/DeferredShadingCommon.ush:604:9: error: expected expression GBuffe?.IndirectIrradiance = DecodeIndirectIrradiance(InGBufferC.a); ^ /Engine/Private/DeferredShadingCommon.ush:604:9: error: expected ‘:’ GBuffe?.IndirectIrradiance = DecodeIndirectIrradiance(InGBufferC.a); ^ : /Engine/Private/DeferredShadingCommon.ush:604:8: note: to match this ‘?’ GBuffe?.IndirectIrradiance = DecodeIndirectIrradiance(InGBufferC.a); ^ D3DCompileToDxil failed. Error code: Unspecified error (0x80004005). /Engine/Generated/Material.ush(1319,8): error X3000: syntax error: unexpected token ‘?’ Unsupported builtin in HLSL: 7 Compile Failed without errors! /Engine/Private/SceneData.ush(998,46-69): error X3004: undeclared identifier ‘LoadInstancePayloadDataE’ /Engine/Private/PhysicsFieldSampler.ush(48,9-10): error X3004: undeclared identifier ‘Ph’ Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial!

UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Engine
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

My device specs are the following:

Device name IPA-MINI-ITX
Processor 11th Gen Intel(R) Core™ i9-11900 @ 2.50GHz 2.50 GHz
Installed RAM 64.0 GB (63.8 GB usable)
Device ID BE782B86-EFA7-420B-AC86-C95BA44AD53A
Product ID 00330-52454-55195-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch Pen support

has anyone solved this yet, i am having the same problem, every time I open unreal it crashes on startup, the only way i can open unreal is to verify it every time before opening it.
Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp] [Line: 2327] Failed to compile default material WorldGridMaterial!

1 Like

delete Engine/Shaders/shaders.pak, then it will OK

i meet the same issue these days. i am pakcaging on switch platform and meet some shader compiled failed errors when cook.
finially i sloved this problem.
wise helpful for someone.

first i meet this :blush: Failed to compile default material /Engine/EngineMaterials/Default PostProcessMaterial.Default PostProcessMaterial!
image

then i set use with skeleton off in material, than ok. Default decal material has the same problem.

last i meet Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMateriall!

i try to copy this material,and than found that this material’s copy has no problem, i think maybe there are something wrong with this material.
so i open BaseEngine.ini and than change the default grid material path(many places) to the copy which has no problem, finally i successfully packaged the game.

maybe changing render api will be helpful too.

sorry, i had found that this way alse had some problems.
engine default material has a special flag named bUsedAsSpecialEngineMaterial,
ctrl cv copy a special material will be not effective.
so when i changed default grid material to copy, scene become bad.
i finally found that bUsedAsSpecialEngineMaterial material will use skeleton shaders which lead the error of my project, so i changed the engine code to remove skeleton shaders in default grid material.
finnally, i succeeded , and removed errors.
wish helpful.

1 Like

Hey I had this same problem when packaging to Android ASTC. For me switching of ES3.2 and turning on vulkan rendering, then deleting my saved and intermediate files solved the problem (UE 5.1.1)

I am getting this exact same error, word for word. Did you ever find a solution for this? I’ve tried some of the other solutions in this thread, but haven’t had any luck.

The thing that worked for me was deleting the material that’s causing the trouble on the disk where Unreal is installed

(\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp),

and then launching the epic game and verifying the version. Now it works normally.

Tried this, but no luck. My situation might be a bit different. I’m using source control and am trying to open the project on another machine. I can open the project just fine on my PC, but when I try to open the same project on my laptop, I am getting that Fatal Error.

I’ve tried a few things, such as verifying the version, copying engine files from my PC to my Laptop, copying the WorldGridMaterial from PC to Laptop. None of these have seemed to work. I’m wondering if I somehow enabled a engine setting on my PC that altered the overall project and that’s causing the Laptop to crash when trying to open said project.

I found a solution that worked for me. All I had to do was run the “Fix Up Redirectors in Folder” function on my entire “Content” Folder. Hopefully this helps someone else.

I’m not exactly sure what created my “Fatal Error” to begin with though. It could be that I edited the project name outside of the editor, edited a file name outside of the editor, or deleted a project file outside of the editor.

28a6fd6fa6f4b67f34519e3f51565f24ec476929

I was getting the similar crash when trying to make a installed build.

It was me excluded some shader files(which also has the suffix “.h”), so shaders can’t build.