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 structure of a struct in editor once its being used in blueprints. (Talking about editor-created structs).

Symptoms:

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

It doesn’t happen across all blueprints that use 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 struct you may have no idea that a given blueprint is broken so only solution is to go through every single blueprint where a struct is being used and re-test them all after every change to structure definition. Even then there’s still risk that you’ll corrupt either struct or blueprint irreparably.

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

Hi ,

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 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 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 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 , 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. next time I run into it I’ll try to share project.

As always, thank you for help!

Hi ,

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 , 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 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 ,

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 issue is that you are having? I recently came across an issue where editing default value of a struct variable causes pins to disconnect in any blueprints that 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 pin disconnection issue with some regularity, though that has gotten somewhat better in recent versions. Structs are trending towards being more stable in 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 additional information. Due to 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 Bug Reports section, and we can begin investigating and logging issues that you are having.

Thank you for your reports, and have a great day