I saved my project, restarted engine, and now i cannot open my work because its crashing engine.
I made a little research on google and this answerhub but founded nothing helpfull.
I can give access to my project for unreal dev stuff if needed.
Earlier today i had similar problem, but in this case there was information in log which file is causing crash, so i restored backup (it were BP of Player Controller and level file), and all work good.
Common thing for this two files is that i added switch enums, after backup restore i changed it to normal int switch.
Level map have few BP on it and point of light, no matinee, no land or whatever (primitive 2d game level).
First thing I noticed was you are using a Object to set a Variable for Game Mode, Game State, and Player Controller. Is there a reason you aren’t using the pre-made Get nodes for these.
Also, I’m having trouble reproducing your issue from these files alone, it seems you are referencing a function library. Could we get a link to download the function library or the project as a whole? Feel free to Private Message me on the Forums if you’re not comfortable posting it here.
I’m unsure of what caused your project to become corrupted so I have submitted it to our developers to look into further. I’ll keep you posted as soon as I hear something.
Thank you for reporting the issue. The problem is caused by circular dependency. The BP loading system is going to be rewritten, and in the future the issue will be fixed (details).
For now there is an unsafe fix/hack you can use to open the broken project (if you want to recompile the whole editor).
In function PreloadAndLinkIfNecessary in class FRegenerationHelper add folowwing lines:
static void PreloadAndLinkIfNecessary(UStruct* Struct)
{
// >>> THE TEMPORARY FIX
{
auto ChangedClass = Cast<UClass>(Struct);
UObject* OldCDO = ChangedClass ? ChangedClass->ClassDefaultObject : NULL;
if (OldCDO)
{
bool bShouldBeChanged = Struct->HasAnyFlags(RF_NeedLoad);
for (UField* Field = Struct->Children; Field && !bShouldBeChanged; Field = Field->Next)
{
bShouldBeChanged |= !Field->HasAnyFlags(RF_LoadCompleted);
}
if (OldCDO && bShouldBeChanged)
{
UE_LOG(LogBlueprint, Warning, TEXT("The CDO was removed during PreloadAndLinkIfNecessary: %s"), *OldCDO->GetFullName());
ChangedClass->ClassDefaultObject = NULL;
OldCDO->Rename(NULL, GetTransientPackage(), REN_DontCreateRedirectors | REN_ForceNoResetLoaders);
OldCDO->MarkPendingKill();
}
}
}
// <<< THE TEMPORARY FIX
bool bChanged = false;
if (Struct->HasAnyFlags(RF_NeedLoad))
The only advice is to restrict circular dependency. For example in gameData the PlayerCharacter variable could be simple Pawn (afaik that would fix the issue). Sorry for inconvenience.
Hey I was having a similar issue with the editor crashing on load, but only after adding functionality to a blueprint that casts a characters anim instance to an inherited anim BP type that I created. I believe this crash happens for the same reason mentioned above, as the anim BP also references the blueprint from which this cast takes place thus a circular include ensues. I implemented this fix, and it did nothing to solve this issue unfortunately but this fix now causes the editor to crash when changing .umaps
The code above is just temporary fix/hack for very specific case. Unfortunately it’s not 100% safe and it won’t help most cyclic dependency issues.
The BP loading system is going to be rewritten (this is our top priority task), and in the future cyclic dependency issues will be fixed. Currently the best advice is to restrict cyclic dependency (Details). Sorry for inconvenience.