Crash on editor startup 4.7 after convert 4.6.1

My UE4 editor will not open anymore after converting my 4.6.1 project to 4.7.0

I tracked the issue down to the MyCharacter blueprint. When removing this blueprint from the project directory, the editor will launch. When launched i’m greeted with quite some reference errors as expected.

However 6 out of the 8 reference errors make no sense to me and even when i open these 6 blueprints they compile fine. When trying to play the game it only warns me about the two faulty blueprints that do indeed have a MyCharacter reference. These other blueprints should NOT have any reference to MyCharacter. So maybe this is the root of the problem where something is going very wrong at the editor compile time with the new cyclomatic dependency fix in 4.7. In the past i have had quite some issues with this problem and fixed it by placing a lot of logic in the MyCharacter blueprint instead of all the blueprints it interacts with.

EDIT: Isn’t there some way to cleanup blueprints or see if they are corrupted? And is it normal to have reference assets left that can only be seen in windows explorer when renaming/moving blueprints to other folders?

Error log.txt

Hey Rashura,

Unfortunately there’s no utility for identifying/fixing corrupt assets. I’ve looked into that possibility myself, and ‘corrupt’ can refer to many different problems (which means that creating a tool to find/fix corrupt assets would take an enormous amount of time, which could be better spent fixing the cause of the corruption).

As for your situation, if the problem is your MyCharacter blueprint, I would recommend removing the blueprint from your project and then recreating it in 4.7 based on the 4.6.1 copy. If you converted your only 4.6.1 copy to 4.7, things get a little more complex. Trying to import the 4.7 version back to 4.6.1 is possible but often buggy.

To respond to your question about reference assets, I would recommend reading the documentation on redirectors: Asset Redirectors in Unreal Engine | Unreal Engine 5.1 Documentation

Using the FixupRedirects may clean up those errant reference assets you’re seeing in windows explorer.

Let me know if that helps,

Jonathan

Thanks for your reply, i’m glad the redirectors are simple to remove. I wasn’t aware of the FixupRedirects function.
Now for recreating the Mycharacter blueprint, i’m afraid that will require quite some time. Like i said i had cycl dep issues earlier on when interacting with objects, so i moved alot of logic back to the character bp. But if thats my only option, i guess i’ll try and give it a shot.

PS: when copying bp nodes (like from functions) is there a risk of bringing over “corrupt” data to the new bp? (if such a thing exists)

So i found the cause of the 4.7.1 editor crashing.

While rebuilding my faulty blueprint, i restarted the editor at certain points.

  • After adding all variables.
  • After creating all functions (empty).
  • After copying 3-4 functions

While adding these functions i came across an editor crash. So i assume this meant my blueprint wasn’t corrupt after all.
I tracked down the faulty function and a macro call was what caused the crash. This was something totally unexpected. It seems that when using the follwing nodes: GetAllActorsOfClass > GET 0 > Cast to blueprint, inside a macro will cause the 4.7 and 4.7.1 editor to crash on startup because of null pointer references.

Now i can understand that macros should have selfcontained logic without referencing anything outside of the macro. But still this should have given me an error or warning, should it not?

Wow this has been really useful! Thanks to you I could pinpoint my crash as well! My MacroLibrary crashes the Editor on startup and I am now working to make it 4.7 compatible! This is my post. Once I have it running again, I will post my findings there.

I’m glad it helped you! :slight_smile:

Hey Rashura,

I’m trying to repro this so that I can report the bug internally. What node are you referring to when you say ‘GET 0’?

Get the element at index 0 from the array you get when using the node GetAllActorsOfClass. When you want to find an object in the scene of which you know there is only one, its usually the first result in the array. It’s an workaround i used occasionally.

I’m not able to create a ‘Cast to Blueprint’ node from the output of Get (0) in 4.6.1. How did you get it?

Cast to “blueprint” means a blueprint class i made, for example Cast to MyTestBlueprint. It’s about finding an actor of a certain blueprint class, getting an actor array and casting the result to the same class you searched for… because you cant call any specific functions you made from an actor if you dont cast it first.

Still no luck for reproducing the crash.

I’m taking a 4.6 Rolling Ball Template (just a random starting point), creating a new Blueprint class (BlueprintType1), creating a macro in the level blueprint that includes the following nodes:

Then I’m converting that project to 4.7.2 and trying to Play In Editor. It’s simply not crashing for me.

  1. My macro was in a custom macro library
  2. Make sure you use the casted blueprint actor inside the macro (my crash report spoke of an null pointer error) Try to get the blueprint type 1 location and maybe even hook that up to the output.
  3. Make sure the macro is called from somewhere, because when i removed my MyCharacter blueprint (which was calling that macro) the editor didnt crash

Okay, we’ve got a repro project now and we’ll get to work on a fix.

Thanks, Rashura!

I’m glad i could help! ^^