Crash on startup in C++ project

Hello! I was trying out some stuff with my HUD, pretty basic stuff.

I compiled on VSE with F7 (Build successful) and while I was still coding UE4 crashed on me. Since then, I haven’t been able to open the project back up. Any way I could open it, if only to remove the code that’s probably causing the problem?

Here’s the logs from my latest attempt.

[link text][1]

Any help would be great. Also, it would be great to know what can cause those kinds of crashes.

Hey Xylord,

Looking at the callstack in your log, looks like the problem is on line 83 in muhhud.h. It seems like you’re calling GetFirstPlayerController() and that is crashing for some reason. You should be able to open up your project simply from Visual Studio (it’ll most likely be in your project history tab - otherwise look for the .sln in your project folder and double click on that), and then fix and rebuild your project and launch the editor again.

Awesome! It worked!

To be specific, I removed a PController declaration at the top of the HUD class, and instead pasted it in every function where I needed it.

I guess having a global-ish PController is a no-no.

Thanks again!

For those who get this error, here are the steps how to solve this issue :

Step 1 : Debugging infos

First of all, make sure that the debugging infos are installed on you engine, if you get this error message instead of your stacktrace:

You do not have any debugging symbols required to display the callstack for this crash.

Then you need to install them, click on the little arrow next to the engine version, then click on option (see screenshot bellow)

249498-ue4.png

And make sure that the “debugging symbol” field is checked, it will download the debugging infos (around 2GB).

Step 2 : Start the project

Now when you start the project, you’ll see a stacktrace in the crashlog, this should help you to localize the problem.

Step 3 : Fix the issue

In Visual Studio, open your project and comment out the problematic code.
To compile the code you can either compile it directly on Visual Studio, or you can also delete the .dll and the .pdb file in your Project Folder/Binaries/Win64 Folder

Now restart the project (if you deleted the dll file, it will recompile your project now), if it still doesn’t work, repeat Step 2 (the stacktrace is probably different), but it should work.