UE5 crashes everytime i compile

For some reason evertime i compile i get -

Assertion failed: UnderlyingArchive.IsSaving() || UnderlyingArchive.IsCountingMemory() [File:D:/build/++UE5/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/Class.cpp] [Line: 1510]

This has only started happening over the last couple of days, i’ve done the usual - deleting Intermediate, Binaries, .vs, Saved folders. i even completely reinstalled UE5 But the problem still persists. Can anyone point me in the right direction.

Thanks in advance

I also have the same problem, obviously did the same and also tried regenerating VS project files, but it still always crashes when I compile. After it crashes everything works fine after restarting, but compiling again makes it crash, both by compiling through engine and IDE(Rider in my case). The code doesn’t seem to be the problem, unless it’s caused through some code that’s in the provided engine functions/classes

Soooooooo, after digging through the engine code I’ve found out that in my case this crash happens when I compile(what we knew), but that it’s caused by a landscape texture I have. When I try to remove the texture(force delete) the same error occurs. After restarting the engine it undeletes itself. After deleting the file for the landscape material the error persists

After carefully deleting all the references in editor and then deleting the material and the connected materials it works!

I got same problem, can u be more specific? I just start learning ue and I really don’t know what should I do, thanks.

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

Oh thank u!!! :+1: :+1: :+1: