Seem to have had the same problem but from 4.26 → 5.0. Removing all nested blueprint structs (structs in a struct) worked for me. Not sure why, but blueprint structs were definitely the culprit.
Happened to me, I pinpointed it to either a struct or data table default value referencing to one of my animation blueprints with a character variable(I’ve tested deleting the character which changes the variable to ‘object’, and replacing the variable type with a duplicate of my character and it started crashing again.)
Duplicating the animation blueprint and deleting the original, then “Manually” replacing the references for it fixed the startup crash for me. Replacing references from the delete popup will result in crashing again.
Adding my experience to this thread as well. 4.26->5.0.0.
We had a very large number of blueprint structs in our project, many of which were nested structs. Many of our game’s blueprint actors, data-tables, anim blueprints all had references to these structs which made the prospect of going through and recreating all of them from scratch or manually updating the references not really a feasible option.
What I did that worked was the following:
go through all of our structs one by one and replace the data-type of each struct field with boolean if it was anything other than an engine default type (arrays were left as arrays and so-on).
After all the structs were updated I excited the editor and chose DO NOT SAVE when prompted to re-save all the assets in the project that referenced the structs that were modified.
Right click on the UProject and Switch Unreal Version to 5.0, followed by right clicking on the UProject again and Generating Visual Studio Project files.
Open VS 2019 and Build [Project Name]
Open the Uproject to launch UE5.
Almost all blueprints fail to compile, but the project actually opens rather than crashing on startup, and all blueprint editors can be opened.
In UE5 go through all structs one by one with an old copy of the project in UE4.26 open at the same time to change the data types back to what they were originally. The UE5 struct editor has a compilation warning at the top of the screen that would sometimes say that the struct failed to compile, when this happens I would expand whatever struct field was causing the problem and uncheck the editable checkbox and then re-check it.
7.5 There was one instance where changing the variable type from a boolean back to what it was before (in this case it was a Vector2d originally) caused the engine to crash. To solve that problem I just created a new variable, deleted the old one and then re-named it back to what it was originally.
Once all of the structs were renamed I closed the engine and once again selected DO NOT SAVE when prompted to re-save all of the otherwise modified assets that used the structs.
Upon relaunching the editor I validated all of the blueprints and went in and refreshed the nodes that were not able to be fixed automatically. Of the thousands of references to these structs in the project, I had to make 5 or so manual changes. No changes to the data-tables or anim blueprints or variable types inside of blueprint actors were required.
Had the same problem and took me 10+ hours to find this solution with nothing obvious pointing to structs (ie the "Ensure condition failed error). I wouldn’t use the RefreshAllNodes plugin since it will leave a lot of nodes disconnected when they get refreshed. For some reason the pin option (ie in a “Set members in {YourStructName}” node) will be unchecked and you will have to manually recheck the box and THEN refresh the node for it to compile. If you don’t recheck the box and just refresh the node, the pin will disappear and your nodes will remain unconnected. I learned this the hard way by using ctrl + a to select all the nodes in a graph and realized they weren’t connected anymore.
That being said, this is far from the first issue I’ve had with blueprint structs/enums. What are the alternatives here? Make them in c++?
Yeah, the RefreshAllNodes plugin does break blueprints sometimes, especially with stucts… Unfortunately, there isn’t much to be done about it because it is based entirely on the built-in RefreshAllNodes function (the one that’s accessible from the File menu). Best to just manually refresh the affected nodes and it often takes manual intervention.
Making the structs in C++ isn’t a great solution because you’ll have the same problem-- the Hot Reload after compilation often doesn’t update you structs properly and will mess them up the same way. I think the only way it would help is if you keep your structs entirely in C++ and never make/break them in BP.
Basically, yeah structs/enums are unfortunately fragile and janky in Blueprints. I wish you could simply access struct members like you can in a normal object, like it’s done in C++.
I don’t usually post here, but as someone who only knows a bit of blueprint I was devastated, I didn’t understand what was going on everytime I tried changing my 4.27 project to 5x I was crashing everytime I opened something relating to a major characterbp. Upon googling, apparently it has something to do with structs. I’m sure manually modifying the structs might help but I wasn’t trying to do something as tedious as that. Just in case any googlers come by this thread, here is another possibly more user friendly option.
First before even changing version or migrating, make sure everythings good; use tools like fix up redirectors, validate data, refresh all nodes. Search your entire content folder for structs and note which asset uses these structs. For me, I had about 10 marketplace assets that were tied to these structs.
Next, get that list of assets and simply install the 5.x versions into your project, replacing the old ones. This will get rid of any compatibility issues that a 4.x version of the asset will have in your 5.x project and effectively replaces all the problem structs with working ones.
Now open the project , validate data and fix redirectors. Now everything should be able to be opened without crashing. Instead of messing with structs you’ll have to go into each asset that used the struct and fix up error messages. For me this is easier since I know my way around the blueprints and not the structs.