Structure Variables get corrupted

Just got my project corrupted so hard that the editor will not start anymore, even with the intermediate folder deleted. I added several variables to a structure in the last session.

Sadly guys, I think the only way to ‘Clean/Fix’ a corrupted structure is to delete it, and reimplement.

Yeah, I don’t remember exactly how I manage to make it work back, I think I created a copy of the blueprint or in the same blueprint, but I deleted the variable and created it again.

A tip: Don’t use an Array direct from a Struct in to a For Each.

Branching, complex structs (structs within structs) can create some problems, but I think we kind of found a way to replace them when they get damaged without much trouble (Blueprints). Most of you probably figured it out as well by now, but in case you haven’t…

Symptom: the project no longer finds the structs as variables, and where they are already present, they no longer “break”.

Cause: Changes in related structs, renaming, or unknown;

Before doing this, make an archive of the project.

A
0. duplicate the damaged struct (not necessary to make a new one, the duplicate will be fine);

  1. try replacing references automatically while deleting the damaged struct;
  2. if it works, fix up redirectors, rename the duplicate, etc;

B
0. if not:

  1. force delete the damaged structs (you may need to close/open the project); this may throw some errors, ignore them
  2. rename so that the duplicate ends up with the original name; with a little luck, the previous, apparently failed “replace reference” will do the trick, the system will recognize the duplicate/identical name struct as the original.
  3. replace the struct variable type in your data source at the most root level - first time it is used as “struct within struct”, and not just a collection of variables and enums;

C
0. if the project is still damaged,

  1. replace by hand everywhere (worse case scenario)
  2. select again the default values

Bump this as not fixed. Editing a variable in an underlying struct caused the entire project to become corrupted. Trying to set it right was uneffective, had to go back to a previous version.

I can confirm the problem still exists in 4.22.0-5660361+++UE4+Release-4.22. Variables of certain structs randomly null themselves when you close and reopen a project.

I have this issue aswell and unfortunately it hasn’t been fixed yet…

Couple of year later, but thank you very much. You are my hero! Great step by step plan and can confirm it works.

It says it’s fixed but structs always keep getting corrupted for me. ue5.1
After all these years waiting, I think I should give up and use a lot of arrays to replace my databases

2 Likes

I ran into the same exact issue in 2022. Changing default values of a struct shouldn’t corrupt every single reference in the project

5.1 Still happening. UE folks, any words at all on this? Come on…

1 Like

BP structures are the only feature you should ignore in unreal engine. If you don’t want to have problems. =(

1 Like

The structure corruption bug has cost me an entire custom inventory system and a year’s worth of work. I wish i had known structures are this fuckdd up back when i started using them. I should have known they are too good to be true, being so easy to use.

Are there any alternatives? I was recomended data tables but dont they also rely upon a struct for the row structure? What if I modify that struct? Would the data table break too?

2 Likes

New to UE, on 5.3. I am on my first big project and did not know about this bug. Now my entire project is broken because of trying to change one struct. I am going back to Unity.

Hi, if you are here about your structs getting corrupted after a post-creation modification, i’ve managed to totally fix this issue by only migrating every content folder to a fresh project. It is tedious of course, but better than nothing i guess. Somehow this procedure will fix the modified structs references and connections. Let me know if that works for you too!
Engine Version : 5.3.2

Note that this may only work in case you only added a new variable/s to a struct. If you are removing or changing type of a variable inside a struct you should be aware that some problems may persist in your blueprints even after migrating.