How can I fix "Fatal error!" at initialization 71% during UE4 Editor 4.11.2 launch via MYGAME.uproject?
I'm developing a C++ project, using a source build of UE 4.11.2. I'm using VS Community 2015, and I've verified I'm using the Development Editor configuration and Win64 platform with the UnrealBuildTool.
I can no longer launch my project within the UE4 editor. The launch graphic reaches 71% initialization and consistency crashes with a "Fatal error!"
I've rebuilt my project, regenerated project files, removed code modifications made after the previous successful, regenerated project files and rebuilt the project again - all successful compiles without error, but I still can't open the project in the editor.
I often get a warning that my project .dlls have been built with a different version or are unavailable. The dialogue warning prompts me to rebuild them, and I do. Sometimes it then goes on to begin initializing the editor (and then crashes at 71%), other times it says the build failed and prompts me to rebuild the source manually. When I do, I get no errors in my compile and can verify that the .dlls have all been modified, but the launch behavior does not change.
Looking at the log file (link text) it seems to crash while loading a file: "/Engine/Content/Editor/Slate/Common/Selection_16x.png" which I verified does not exist. I have "selection.png" and "selector.png" but nothing with "_16x".
I tried associating the project with a 4.11.release source build, and with a new build of 4.11.2, and I tried associating it with a prebuilt (downloaded and installed via the Epic/UE4 launch utility) 4.11 engine - all with the same result (the "selection_16x.png" file does not exist in either).
When I launch the editor alone (not via the .uproject file) it launches without error. I can start and build a new, blank c++ project without error, and I can launch the editor from that .uproject without error.
If I open my project from within the already launched editor, it crashes.
Do I need this image file? Can I replace it with something similar (guessing it's 16x16)? Is this a legacy bug from renamed slate content? Am I missing another (un)related error that's actually causing the crash? Did I only notice this missing file in my log because it isn't actually a problem?
I've been fighting this for three days now and I'm getting to my wits end.
The problem was in my use of a TMap to store gameplay update times. The GetAuthGameMode call (the only one remaining in my code base that hadn't been replaced by GetGameMode!) was in the game's custom character class. After the character is loaded into the level it performs some initialization actions and, when finished, informs the active GameMode it is ready to play. When the GameMode recieves the update from the character it triggers some final actions before beginning actual gameplay (removes loading screen, plays quick animation etc.). At this point it also logs a time duration within a TMap.
Here's where my problem happened: if a duration for the current level already exists, it pulls the existing duration and adds the current duration to the existing value and stores the new total; if the duration doesn't exist for the current level, it stores the current duration to the TMap under a new label.
There was a typo in the code, though. Rather than adding a new label if the level duration didn't exist within the TMap, the code tried to pull the value and add it to the current duration. When you pull a value from a TMap with Find() you don't get the actual value, you get a pointer to the value, but I was ensuring the label didn't exist before I called it! Thus, I got a null pointer and caused my crash every time the game tried to load the first level.
I lost three days to an errant exclamation point!
Originally, the code here was set up as an if->else, with the FALSE condition first. When the code was restructured to its current form the conditional wasn't modified, resulting in the logical error.
As a side note, avoiding problems like this is probably one of the best parts of Blueprints. Thanks, Epic, for the platform and all the support.
Special thanks to Jamie Dale for seeing what I missed, getting me pointed in the right direction, and presenting alternatives to jumping out a window.
answered May 24 '16 at 08:02 AM
That warning is unrelated to your crash.
Here's your callstack:
So it looks like a CDO is causing a crash. Given the memory address in the error I'm guessing it's a null pointer access.
answered May 23 '16 at 11:07 PM
Jamie Dale STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here