Completely random crashes

I’m working like a year on this project in 4.15 (on and off) and never had this but now it just keeps crashing at totally random points without any indication of what it could be. I already tried to go back to a clean backup several times but then it always starts with the crashing again.

  • It crashes after clicking play in editor
  • It crashes at random points in play in editor
  • It crashes at while having a blueprint open and doing absolutely nothing
  • It crashes at compiling a BP
  • It crashes at startup of the project

So basically it can crash everywhere and another odd thing is that it never leaves a error message popup, its just poof everything is gone. The log does not tell me anything either, just completely random points and it can also be in the middle of a log line.

Sometimes after a crash the project seems to be corrupted (even when the crash was only in play in editor) but I learned that when I change the startup map to the empty default map I can open the project again. It however often crashes again when I try to open the actual map of the game.

Here is what I keep doing:

  • Starting with my copied clean backup project
  • Adding minor things to the pawn blueprint which is inside the game map. (add editable variables and do something different with a new key input event)
  • Compile, save, save map, click play.
  • Now after some seconds or minutes it starts with the random crashes again but it can then also happen that everything seems to be fine again for a hour or so

I also tried fixing all the redirectors, rebuilding the map, deleting the intermediate folder and the temp in saved but nothing helped.

I could try to upgrade the project but I had done that some time ago and found that several things of my project did not work anymore so I rather not amd I really like to make sense of what the hell is going on here.

I have had the DestroyActor() method crash the editor, before. Consider disabling it for now if you are using it.

  1. Did you clear out the derived files every-time you “cleaned” it out. For reference, they are Intermediates, Binaries, and Saved. You want to delete those and have Unreal rebuild them. If you don’t, errors, crashes, and wonky behavior will occur.

  2. Protect your pointers. Sometimes you can select something (like a mesh) blueprint, recompile the project, and what you selected will no longer be set after recompile. The net result is that some pointer you think has a value is null, and causes a crash. To stop this, delete the component that keeps forgetting, and then re-add it. Based on what you described, I think you have a null pointer somewhere.

  3. Upgrade your project. In the words of Shia labeouf, JUST DO IT.

I probably should have mentioned this is a blueprint only project, I did not do anything in C. I have some DestroyActor nodes in there but it is not like it crashes when that is done.

You mean derived data cache folder that is somewhere on C where all the compiled shader stuff gets saved? No, have not done that. Also worth a try to delete the whole saved folder I guess. I don’t know what binaries folder you mean though?

I’m not sure what pointers are? Are that just references or redirectors? I did right click on the root folder and selected fix up redirectors. Is there any way to see what components are affected? Just deleting all components and re-adding would be very tedious not to mention fixing all the references.

Upgrading the project is still my last option but I guess i should just give it a try to see if it even fixes it.