Material editor crashes engine all the time

Hi guys,
so when I open the material editor, the engine always freezes and crashes in around 20 seconds. Some other people seem to have this problem too, but no real solution came out, I’d be really thankful if anybody could help me, this really hurts my productivity.

This is the crash log that appears after the engine shuts down:

We can confirm that this is an issue when working within the material editor. There does not seem to be any consistency as to what you’re doing, what material’s you’re working with. We can make it crash just by altering the view box. 4.25.1. The check that fails each time points to MaterialShader.cpp line 1720. I cannot figure out why this check is failing, though, an engineer on our team feels that it is some sort of race condition as he cannot reproduce it on his own box and thought perhaps on slower boxes it will fail.

@erol_demicri Our team is experiencing a very similar issue. Does this crash happen the moment you open the material editor? Or does this happen purely when messing around with components inside the material editor?

It only happens when you’re using the material editor. It isn’t anything specific, like, using color. I’ve seen it crash just moving around in the viewport. It seems to be an issue with moving from 4.23 to 4.25 in source in our perforce environment, but I cannot confirm that.

I have this problem too, it crashes upon opening. Im on macOS Catalina

Same here using 4.25.1 on win10. random crashes when changing links/ adding texture sample, etc in material function graph.
** copied same nodes from material function to the main material and everything works fine, seems a problem with material functions

Same here, using latest 4.25.3 on win10. Have noticed that crashes appear more frequently if uses shortcuts pretty fast and create nodes with overlap.

This happens to me, too. 4.25.3 on MacOS Mojave. Material Editor crashes to desktop upon opening.

I have the same issue. 4.25.3 on Windows 10 version 2004 OS build 19041.450. Dell Inspiron Intel i5-8400, 8GB RAM. The material editor hangs Unreal Engine 4 (I have to use the task manager to close UE4) after saving and only after saving - it does so every single time.

Similar issue here as well on 4.25.3 and Win 10. Random crashes mainly upon connecting nodes. Sometimes I notice that it crashes when I try to make a backwards connection to a node but that is not consistent . A couple of times I noticed that the material editor did not crash after doing saves every few steps but that could be my imagination.

Volkin still seems a bit unstable right now. I build out the custom SDL2.0 and switched to openGL. Seems to have stabilized my Linux builds for the moment.

I believe we have enough people here with the same and/or a very similar issue: instability using the material editor.

Could we please obtain some help?

1 Like

Thank you for your input. May I ask where this setting is located?

Not sure if this is relevant to any of you. I was just running a few more tests on the editor and in my case the problem seems to be related with raytracing on an Nvidia 2070 super. I disabled raytracing and I started doing few materials connecting random nodes. So far everything looks ok and there were no crashes whilst playing in the material editor. Before it would definitely crash within a minute or 2. Without RT it was stable but I only tested it for 5-10 mins.

Raytracing should be off by default but it is located in project settings. You can search for raytracing in the project settings search bar.

After some extreme testing the issue for me appears less without raytracing . I did experience two crashes but this was when I was “stressing” the material editor with live nodes and constant changes and recompilation. It definitely behaves much better now. My suspicion is that this is hardware/set up related but then again crashes like this were not something I have encountered be prior to 4.24/4.25.

Also this appeared on the debug window after the crash
Assertion failed: (ShaderMap && Materials) || ProcessIt.Key() == GlobalShaderMapId [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 2316]

Had similar issues however my card doesn’t support ray tracing. If it’s a flag in the build itself creating issues I suppose that could be a thing though. Did you rebuild or change a INI setting?

erol_demirci - you may have to build a new version from source to access that setting or kill it properly. However I still think if you re-enable opengl in BaseEngine.ini will fix most issues for now if you just need to get running. Although the performance will be good it will not be optimal is the only thing.

In BaseEngine.ini by removing the ; to enable opengl
As shown here

[/Script/LinuxTargetPlatform.LinuxTargetSettings]
; When neither -vulkan nor -opengl4 are passed on the commandline, the engine will default to the first targeted RHI.
+TargetedRHIs=SF_VULKAN_SM5 

; OpenGL4 is deprecated, you can comment this back in to add it to your targeted RHI list
+TargetedRHIs=GLSL_430

and run UE4Editor command line as UE4Editor -opengl4

Hey there,

I had a similar issue, and here’s what worked for me:

  1. Hide any meshes or actors tied to the material in your outliner.
  2. Go ahead, make your material edits, apply them, and save.
  3. Once done, unhide those meshes or actors in your outliner.

Hopefully, this helps get your engine running smoothly again!