Need help debugging

when I open my project

You mean the editor crashes on startup? When you run it at all or only when you open your project? Or do you mean when you start your game session by hitting Play?

BeginPlay doesn’t get called until you run the game. So if you aren’t calling that code and it’s still crashing then that code isn’t the problem, or at least it isn’t anymore. Once again we need log files – and a better sense of the change you made when moving the code to BeginPlay.

Unfortunately there are no errors in there.

I know, BeginPlay should not prevent my editor from opening my project.

As I stated earlier, I believe my editor to still recall the old code that had a bug in it’s constructor. Maybe it cannot reload the new build, because it deosn’t even manage to start up…

Btw. I attached the log file!

Yeah I know… this is extremely weird…
Have you some ideas, how I can force my project to reload the code (without opening or completely abandoning it)?

Got it! You need to delete the intermediate and binary filed to force the editor to rebuild the code on startup. Now everything works just fine!

Thanks a lot guys!

Good to know :slight_smile: Please mark the answer as correct to close it :slight_smile:

Thanks for the reminder. I think I’ll just sum up all that has been said in a new answer, so people don’t have to read the entire novel :smiley:

Ok, because the “answer” is scattered all over this thread I’ll try to wrap this up nicely!

Thanks to the steady help of xlar8or and Jin_VE I was able to finally find the two errors that gave me a really hard time:

  1. Don’t use NewObject<>() in a constructor. Rather use CreateNewSubobject<>(). If you mix those up in your constructor, your editor will crash on startup!
  2. Which leads us to error two, if you manage to build a fatal error into one of your constructors your editor will not be able to start and thus reload any new code (effectively “corrupting” your .uproject file). This can be solved by deleting your /Intermediate and /Binaries folders and rebuilding your project on startup.