UE5 crashes everytime i compile

So, the problem is caused by some sort of a broken texture asset, not your code. In my case it was the landscape texture I had on my landscape which, after removing it, also crashed the editor with the same error message. Carefully deleting this texture, by first deleting all references to and from it, then deleting the texture got rid of this problem, so my steps would be:

  1. Identify the problem, meaning you have to find out what asset/texture(I’m 90% sure it’s an only a texture related problem) makes the editor crash when it’s saved(this apparently always happens when you compile your C++ code)
  2. Carefully remove this asset/texture. You’ll have to start by deleting it from everywhere from where it is referenced, then deleting it from your content browser. I tried deleting it from the content browser first, which also crashed the editor and reset the state it was in, so this should probably be the last step

If you know how to use the debugger in VS or Rider, then launch the editor in debugging mode and compile from within the editor, this should crash it, but first show you what engine code caused that crash. You might be able to find out what type of object causes the problem, or maybe even the name

2 Likes