Crash on project startup

Hey guys!

I’m doing a snake game using C++. It’s my first game and I’m trying to learn as I go. Yesterday my project crashed after compiling and couldn’t open it again without it crashing. I created a second project and copy/pasted the code I had. The same thing happened with this second project. I don’t know what’s happening, I can’t open either project.

Thank you very much for the help!

Hey EmilioF-

Can you provide the callstack and log file from the crash? Additionally, what was added to the project prior to the crash occurring? Are you able to compile/open the project if you remove this added code?

Hi! It says that I do not have the debugging symbols required to display the callstack. I did try to remove the last piece of code I added, but it didn’t change anything. link textHere is the log file:

If the editor is crashing it means you have an issue in your C++ code. But you already know that right ? So you have to actually fix your C++ code crash before trying anything else (cause you won’t be able to do anything else at this point anyway).

So there are two solutions but I suggest you go for the first one:

  1. Install the debug symbol and run the editor from Visual Studio (you can install the debug symbol from the launcher, by clikcing on the arrow next to your engine version, then options, then select the debug symbol and click apply). This way you will be able to catch the crashing code and fix it.
  2. Comment all your code (or only the recent code part) then try to run the editor again (after rebuild of course). See if that fixes. Then uncomment part by part the previously commented code and indentify the faulty part, and of course fix it :slight_smile:

Good luck !
Best regards.

I found the problematic line:

MyController = UGameplayStatics::GetPlayerController(GetWorld(), 0);

Clearly I don’t understand fully how controllers work… so I’ll up on that. Thank you very much!

Glad to hear you’ve made some progress ! Time to fix it now :slight_smile:
Don’t forget to close your question.

Good luck :slight_smile: