Opening blueprints in converted project crashes

I have a project in 4.5 which works. All blueprints can open correctly. If I convert it to 4.6 however opening most (possibly all) blueprints causes UE4 to crash immediately with the following error:

Cast of nullptr to Blueprint failed

I can copy the callstack here if needs be. I’ve submitted a crash report however I’m unable to work in the new version which has several features I’d really want to use. Anyone know what might be up?

Hi ,

Is this limited to a specific blueprint/blueprints or is it any blueprint? For instance, have you attempted to open any of the starting content blueprints? Can you post your callstack and logs here so we can take a look? Thank you!

Its not every blueprint. But most of the ones that I have added.

I’m running UE4.6.0 with some very minor modifications to AIController.h and BehaviourTreeComponent.h to allow for stopping the currently behaviour tree to abort the currently executing task.(I am unsure why this isn’t standard behaviour.)

I’ve setup a dropbox with the logs:

Please let me know if I should get these to you another way.

Hi TinyAngryCrab,

If you can open them, can you show me screenshots of your blueprints that are causing the crashes? Are you casting to any objects or actors in the blueprints? Additionally, do these blueprints crash if you migrate them to a new, clean project with no additional content or can you open them there?

I’m think all (possibly only most) of them use a cast at some point, but I can’t even open them to check. If I right click them they crash too. So I can’t export that way.

Migrating from the working 4.5 version into a new 4.6 project works. But I really don’t want to have to migrate everything.

What you might be able to do is migrate just the blueprints you have. What the logs state is occurring is you are attempting to use an object or actor that is a null reference, so it isn’t valid. There is a known issue that is currently being assessed where some references are deleted in blueprints. However, if you have any cylclic dependencies (a blueprint referencing another blueprint that is referencing the first blueprint, or any other combination of circular dependencies) it may be crashing because of this as well.

There are at least a few cyclic references like that if Casts count. Thanks for the answer. I guess I will migrate from 4.5 to fix it. Thank you for the help.

If you can, try to remove the cyclic references as much as possible to avoid future complications.

Hmm even with migrating any blueprint is related to the Player (and possibly others but the player for sure) will crash UE4. I think there are cyclic dependencies but I’m not sure exactly what constitutes one. For example the player has a list of PlayerAttack actors and each playerAttack actor has a Player variable- is this cyclic?
Some casts are unavoidable as SpawnActor doesn’t return a type. But I have managed to get rid of a lot. It still is yet to work however.

A cyclic dependency is when one blueprint casts to another blueprint, then that blueprint casts back to the first. For instance if you have a player character that casts to an attack blueprint, then that attack blueprint immediately casts back to the player character, they create a circular loop that causes the engine to crash because it doesn’t know exactly what to do in that situation. This is being looked at. Another thing to check is make sure that your variables are not null. There is a known bug where variables are having their references deleted which can cause severe errors.

Most of the variables get set at creation since everything is dynamically generated. Would blueprint interfaces be a better way of doing all of this?
Thank you for your help with this issue!

Blueprint interfaces is look like broken now:

Hi TinyAngryCrab,

Can you post a screenshot of your blueprints so I can take a look at what may be occurring?

Please, test if PR 682 applied on top of 4.6 fixes your issue.

Sadly 4.6 with that change does not work. However the master with PR682 doesn’t crash. Thank you for your attention on this matter.

You changed two more files and I incorporated those into 4.6 and it works! Thank you very much. I have further conversion bugs to sort out but at least it opens!