UE 4.7.6 Editor crash on loading project

I am very new to Unreal, started learning it a day ago. The project that I am working on keeps crashing at 70% now. I am on a macbook pro (mid 2014), with only one integrated GPU (Intel Iris Pro) so, as suggested on other forums, this issue isn’t arising form GPU switching.

The issue first occurred with I compiled from the editor. Thereafter, it keeps crashing. There was something wrong in my code, but now I have commented it all out, so its just basic skeleton code. Could it still be trying to load with the wrong code that initially caused the crash? How do I ensure that the project is loading with the latest code?

Apparently, a clone of the project opens just fine! What could be happening?

I will attempt to answer this from memory as to how I fixed it. The editor does not recover from adding code in, that for one reason or another, will not reload after closing the project. There are other types of project corruptions and this answer only applies to someone making C++ changes that work fine, yet will not allow you reopen the project. In my case, I was using GEngine calls from the constructor, but it appears there are many undocumented combinations you can put into C++ that will create a project that can’t be reloaded. The solution was:

  1. Be sure first, that you have run XCode outside of the editor so it completes it’s install (not related to the solution but important if you installed XCode without ever running it prior to opening the Editor and using it)
  2. Back out any changes you made during the session prior to opening the editor and having it fail
  3. Delete the Intermediate directory in your project folder
  4. Delete the *.dylib files in the Binaries/Mac directory of your project folder
  5. If possible, start XCode from the *.xcodeproj in your project folder, do a Clean and then a Build
  6. open the project as normal

Note: your project folder is /Users/youruserid/Documents/Unreal Projects/yourprojectname if you have a default setup.

Not all of those steps are necessary in every situation, but I have had situations where it was necessary to work through all of them to recover.

Since you have a backup as of before corrupting the project, it may be simpler to just use the backup and carefully begin to insert your statements in until you find out what the offending code was. You might want to make a copy of your project folder’s Source statements from the corrupted version, just so you remember the changes you had attempted.

My guess as to the direct answer to your last question is that Yes, there is likely something wrong with your code. It seems that many things, that make good sense to me as an outsider, can’t be done. My example of putting a GEngine call is exemplary, I thought it was logical to put a display in the constructor, but those in the know, point out that it is too early in the process. It wasn’t relevant that I could compile and run, I still would not be able to reopen the project. I still move cautiously, save often, close and reopen, and pick my way through discovering what is okay and what is not. I’ve been unable to find any list or document that provides that type of insight. Just getting a clean compile, then being able to execute successfully, and save, does not guarantee that you will be able to reopen the project on the Mac.

Thanks! It worked just fine :slight_smile:

Have my upvote !
in my case i was using

GEngine->AddOnScreenDebugMessage

on my PlayerController constructor
after i remove it i finally could open my project on the UE editor.
hope others add their offending code in here so we can have a list

I believe that any reference to a GEngine object in the constructor will cause the project to appear corrupted when you attempt to reopen it. This is highly counterintuitive since such references will often compile and run just fine and give you a false sense of security that all is well… until you close and reopen. It’s possible to keep them in there for debugging use as long as you remember to comment them out before closing the project and then uncomment them and recompile after you reopen the project…