Changes adding variables to structs once they are in use causes unpredictable behavior in blueprints

Win 7, UE 4.6.1

This is something I have run into many many times, but haven’t made a report on because it is hard to repro it consistently.

Basically, it is unsafe to add or change the structure of a struct in the editor once its being used in blueprints. (Talking about editor-created structs).

Symptoms:

Some of the time, some blueprints where the struct is being used will disconnect from the struct node upon reopening the project after having made a change to the struct definition. There’s no readily apparent fix for this, sometimes replacing the node helps, sometimes you have to replace the variable itself, sometimes there doesn’t seem to be a fix, and sometimes the struct definition itself seems to have been corrupted, and you have to go through and remove variables one by one to find the corrupted variable in the struct definition, which leads to further issues in the blueprints.

It doesn’t happen across all blueprints that use the struct, nor does it happen every time you edit a struct definition.

It’s a really nefarious bug though because depending on how you are using the struct you may have no idea that a given blueprint is broken so the only solution is to go through every single blueprint where a struct is being used and re-test them all after every change to the structure definition. Even then there’s still the risk that you’ll corrupt either the struct or the blueprint irreparably.

All in all, it means that you basically never want to make changes to a struct that is defined in the editor, which limits the usefulness quite a lot.

Hi Hyperloop,

There are a number of Struct issues in 4.6.1, some of which have been fixed and others not. This one sounds familiar but I can’t seem to find anything on it, and I can’t seem to reproduce it. Aside from struct nodes becoming disconnected on reopening the project and occasional corruption, have you seen any other issues? Were you able to get a consistent reproduction on any of them? Do you have a test project with which any of this happens that we can take a look at?

I would also recommend making a copy of the project in 4.7.3 when you get one of these bugs to see if it reproduces there. A number of Struct issues have been fixed, and I believe the disconnecting wires was one of them. I’d be curious to see if any of this behavior still occurs. Thanks for any additional information you can provide.

Thank you Ben, I’ll migrate a copy to 4.7.3 and see how things fare. It’s a hard one to track down because it doesn’t seem to happen with consistency, in fact a struct that breaks in one blueprint might be perfectly ok in another. The next time I run into it I’ll try to share the project.

As always, thank you for the help!

Hi Hyperloop,

I’m resolving this issue for tracking purposes, but please feel free to reopen when you have some more information or a test project for us. Thanks!

This is still a problem in 4.11, and no I wont debug for Epic anymore. Epic needs to start testing their engine. It’s a pathetically unstable engine now. It seems like anyone decent at development left Epic when they sold out to Tencent. Epic should come with a “Made in China” sticker now. Its just sad.

I wouldn’t go as far as Stunt Thumper, by and large I’m really incredibly happy with Unreal and Epic, but I’d like to confirm that this is still a big problem in 4.10 and beyond. Just today I have an issue where editing the default values of a struct won’t update on any array of that struct. Structs are generally still a bit scary to work with in blueprint.

Hello Hyperloop,

If you are still having this issue, do you have any information or a test project that could help us reproduce this issue?

Also, could you describe exactly what the issue is that you are having? I recently came across an issue where editing the default value of a struct variable causes the pins to disconnect in any blueprints that the variable is used in. Does this sound like something you’re experiencing?

Issues around structs have been pretty hard for me to repro consistently, it’s what makes them so difficult, because sometimes it will be fine, and other times it won’t.

I’ve definitely experienced the pin disconnection issue with some regularity, though that has gotten somewhat better in recent versions. Structs are trending towards being more stable in the later engine releases but when there are bugs they are tend to be pretty tough to pin down. I’ve experienced issues as recently as 4.10 with default values in structs not being read correctly in certain cases in blueprint.

Thanks for the additional information. Due to the multiple issues being discussed here in this post, I’m going to close this particular thread.

What you can do is open a new thread for each individual struct issue that you find yourself experiencing, that way we can focus on one issue per thread to ensure that none of them get overlooked. Please create these new posts in the Bug Reports section, and we can begin investigating and logging the issues that you are having.

Thank you for your reports, and have a great day