Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Struct invalidating when adding array elements inside it

TL;DR Adding elements to an array within a struct within a struct corrupts the outer most struct and every blueprint that had used it.

When the struct is corrupted, this message is given: this message


So you go and delete all references to these variables in your blueprint. All calls, all functions with output/inputs, all "make structs," etc., and even deleting all variables and local variables.

After all that, it still tells you there are variables with invalid types, even though none are showing up in your variables section under "My Blueprint" because you have already deleted them.

For some reason, not even "Remove unused variables" works, saying there are no variables to search for.

The only way around this is to either recreating all the corrupt blueprints (copying and pasting doesn't work, as it is a reference error to the struct) or importing everything to a new project.

Steps to Reproduce:

I have reproduced this problem in a clean project, and the steps are as follows:

  1. Create a struct with an array in it. We'll call this Struct1.

  2. Create a struct that has a Struct1 inside it. We'll call this Struct2.

  3. Use Struct2 in any context. Parameters, variables, make nodes, etc.

  4. Go back to Struct1, expand the array, and add in more elements.

After doing all of the above, all references to Struct2 have corrupted.

EDIT: Also, God forbid you referenced these variables in your level blueprint, as now your whole level is corrupt.

Product Version: UE 4.14
message.png (21.7 kB)
more ▼

asked Jan 30 '17 at 09:27 PM in Bug Reports

avatar image

308 16 25 54

avatar image tozan Jan 30 '17 at 10:15 PM

UH oh, now I find out that what Batch code can easily do in a breeze, nest arrays inside of arrays but it looks like to me Unreal Engine runs into nesting troubles trying to do the same, and then corrupts itself. It seems the blueprints have trouble with nesting things.

avatar image jfaztk Jun 08 '17 at 04:55 AM

How are you currently dealing with this? I just got this issue and have no idea what to do, I'd probably have to spend hours just re-wiring everything...

avatar image Willard720 Jun 09 '17 at 12:22 AM

Yup, spent hours.

I haven't ran into this situation since then, as in, I've never had to create this system, but what I did do was just try to plan ahead more, and create a backup when I tried to change stuff around.

Hours wasted, indeed.

avatar image tozan Jun 09 '17 at 12:45 AM

Sounds like It might be corrupting something.

avatar image kvick Dec 28 '18 at 04:13 AM

This bug is some hot garbage it broke nearly my entire project and is definitely not fixed in 4.21 after doing a hot reload.

Just a note if anyone is stuck with the issue where you cant delete the hidden variables which prevent your scripts from running, right click on the asset in the content browser and go to 'Asset Actions->Reload' to get the prompt to remove the invalid variables.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hello Willard720,

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here


You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

more ▼

answered Feb 01 '17 at 07:11 PM

avatar image

Thomas G ♦♦ STAFF
7k 64 4 54

avatar image Willard720 Feb 02 '17 at 02:06 AM

Awesome, thanks!

avatar image jfaztk Jun 08 '17 at 05:11 AM

Issue has been deleted?

avatar image Thomas G ♦♦ STAFF Jun 08 '17 at 02:10 PM

The link is still open, there is an extra period in the URL, I have now removed it and it should link to the correct page

avatar image jfaztk Jun 08 '17 at 06:36 PM

Ah I see, thanks!

avatar image KovaaK Jul 15 '17 at 08:11 PM

I'm wondering if I'm missing something big here. This open issue seems to be literally development halting for any project that makes a moderate use of structs in Blueprint, yet UE-41411 and UE-40033 both list target fix estimates of 4.18, which seem like it's a heck of a long way off (and I don't even know if that estimate is just short-hand meaning, "we haven't started looking into it yet").

Is there some workaround that won't result in corrupting 50+ source files of mine when I change or add one variable to a struct? Shouldn't there be more attention put toward fixing this issue in the short term? I upgraded my project from 4.12 and had no idea that it was going to prevent me from achieving certain development goals.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I finally found a workaround to this problem.

1) Open project in UE4.
2) Go to your project's content folder in explorer, and recursively make everything read only. (I did this on Content\FirstPersonBP\Blueprints for my project)
3) In explorer, locate the child struct and parent struct(s) that you want to change, and uncheck read only.
4) Change the child struct as you please, and save it. Then save the parent struct(s).
5) Close the UE4 editor (don't let it save the files it thinks has changed, it won't be able to anyway).
6) Go back to explorer where you recursively made everything read only, and uncheck read only.
7) Open your project back up.
8) Rejoice, for your old code is still together and functional!

Fundamentally, it seems like changing a child struct destroys the parent struct for long enough that any assets using the parent struct have a bunch of references removed. So, if you make those assets read-only, the UE4 editor can't stomp all over them.

What a frustrating bug. Hours upon hours wasted...

more ▼

answered Oct 23 '17 at 11:37 PM

avatar image

66 1 3 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question