x

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"

Structure Variables get corrupted

This can randomly happen on compile, the variable using the structure will vanish in the Variables list, in the graph it will show up as greyed out/ not found. The error will say the variable has an invalid type. The most annoying thing about it that all links in blueprint to any structure inside that structure will be deleted, like where Break, Make and Set Members is used. UE4 will find the variable again when the Structure asset gets changed and saved again but the links are obviously not reappearing.

I had this happen occasionally in 4.13 and I hoped it would be fixed in 4.15 but there it happened again after ca 10 minutes working with it.

I had this happen mostly with one specific structure asset, I then had it happen with another structure at some point after I added a structure array into that structure. (Recreating this to instantly have the bug occur did not work though) Since both structure assets with which it happens have a structure array inside the bug is likely connected to that. I''m using both as a structure array with a structure array inside. The bug can happen without having changed anything in the structure asset, I could not find anything that triggers it other then that it happens sometime on compile.

Product Version: UE 4.15
Tags:
more ▼

asked Apr 05 '17 at 11:57 AM in Bug Reports

avatar image

Davision
894 79 125 183

avatar image Davision Sep 12 '17 at 11:55 AM

Now I also have the bug where UE4 resets variables inside Structs everytime I restart the Editor. It is just one particular bugging me for now. I could set this as a default in the Structure asset instead but when I do that I risk everything getting corrupted again...

avatar image Davision Nov 13 '17 at 07:17 PM

Please fix the structure assets mess! More structure assets wtf, I added some variables to a structure and then it crashed everytime I tried to compile a affected BP. NO structure in structure or structure arrays used! When it finally, after the 6th try compiled all my values were reseted to default. I then went to try to copy it over from a backup into the default settings so that I don't have put up anymore with it reseting because everything is in the default values tweaked, turns out you can not even copy paste a structure into the defaults.

Also, I got this strange message when it finally compiled. I added that variable there. alt text

wtfstructure.jpg (28.7 kB)
avatar image Davision Jan 02 '18 at 05:30 PM

Can't package my game and it seems all related to the structure variables and the references corruption! Made it a own post here: https://answers.unrealengine.com/questions/742301/can-not-package-because-of-structures-reference-co.html

avatar image HeliaXDemoN Apr 13 '18 at 07:51 PM

If you have a problem with structs at 4.18, passing to 4.19 only makes things worst.

avatar image Davision Apr 18 '18 at 02:06 PM

Do you mean when you try to open it with 4.19 or bugs while working in 4.19? I read some structure related fixes in the release notes. Hoping things finally get better.

avatar image TasoColiviras Sep 11 '18 at 04:47 PM

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

avatar image HeliaXDemoN 6 days ago

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.

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

2 answers: sort voted first

Hello Davision,

This is a known issue, which you can view here:

https://issues.unrealengine.com/issue/UE-41411

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 Apr 05 '17 at 01:44 PM

avatar image

Thomas G ♦♦ STAFF
7.5k 64 4 51

avatar image Davision Jun 06 '17 at 01:15 PM

Update: This can even happen when you only change a default value inside a struct asset and that without having a struct inside that struct. It erased then all connections of that struct. Those variables were just plain variables, no arrays. It also erases all variable values of everything that is struct inside struct, no arrays required. So in short structs are currently a buggy mess, any struct can get corrupted. I'm hoping this can get at least be fixed in 4.17, because they are hardly useful when they keep destroying themself.

avatar image Davision Jul 27 '17 at 02:24 PM

Update the bug/s can also crash the editor. I thought I had a workaround for the most frequent causes of corruption but it turns out it is also not fail save, here is my workaround:

When changed a structure asset, be it a change of a default value or a added/removed variable:

  • First make sure all blueprints will compile without errors

  • Save the structure that is changed then update all structure variables that have that structure inside by adding a variable and deleting that, then saving those.

  • Then compile all blueprints without saving, when it all goes fine without any values deleted in the blueprints save it all.

But in my recent structure variables change it crashed at the last point while opening a affected blueprint which then fucked up everything on restart.

When that happens the best bet is to get the autosaves of the affected blueprints but not by overwriting the corrupted blueprints since that does not work and instead putting the autosaves in the content folder then restating the engine and copying all the values from the autosave BPs to the actual used/referenced BPs by hand. If connections have been lost you can also overwrite the orginal BP with the autosave, that will get you back the connections but not the values. (arrays will be reset to empty, variables set to Zero, not default values) If you want your stucture variables really save the only way seem to be to save the values inside save games, those values are even load able when the stuctures have changed since the save. It obviously comes with a bad workflow.

To be clear when you change a structure asset and then a affected blueprint compiles with a error everything gets fucked. When you change a structure asset and not change/save also the structure assets that have that structure variable inside all those structure variables with the changed structure asset type inside will get fucked.

avatar image Davision Aug 23 '17 at 03:54 PM

It appears adding any new variables to one of my structure assets is now a ensured way to make the editor crash and corrupt the variables. When I have added a new variable and make everything as described, it seems to work all fine including compiling blueprints but as soon as I save a affected blueprint it crashes the editor and everything is messed up when restarting the editor.

I see you keep moving a fix for this back to a newer version, this is hands down the worst bug I encountered in UE4 and no one seems to really give a sh*t. I have also heard of other Structure related bugs in the forum and on Twitter, at some point someone has to fix these messy Structure variables, better sooner then later!

avatar image Saiodin Aug 31 '17 at 07:11 PM

I agree, the state of of structs is atrocious. They have been very problematic two years ago already. I was just googling for how their current state is because I was expecting them to not be fixed. Seems like my expectations were correct and I'll have to avoid structs.

avatar image Davision Sep 12 '17 at 11:52 AM

Yea, well, If you can avoid structs, then I highly recommend that. I have so many settings in my game, doing that all with plain variables instead would be insane.

avatar image Saiodin Sep 12 '17 at 06:04 PM

The project I was talking about is a mobile sim game, trying to dive into Android development, moderate amount of variables. I used Arrays, the first one storing the IDs, then other Arrays for their respective content. Access the content depending on ID. Then I group them into the same category to keep it clean. In my case it works, for big projects I can't imagine not having structs tho.

avatar image Davision Oct 17 '17 at 06:47 PM

Has anything been fixed since??

Structures still suprise me with new crazy bugs: Just added a single variable to a structure asset, that structure is used in a simple structure array which contains that single structure so it can be an array. It got messed up real hard:

alt text

After resaving the structure array structure asset, I suddenly have this variable in the BP that I can not delete as seen in the screenshot:

alt text

It is now impossible to compile the blueprint, like it is completly broken without return.

alt text

gifw433225232.gif (176.9 kB)
tzhrhfgh.jpg (29.0 kB)
tzhrhfgjnmh.jpg (30.1 kB)
avatar image Saiodin Oct 19 '17 at 03:35 PM

Just saw staff marked its own answer as correct which links to answer hub. I read of an old target fix for 4.18. But it looks like it has been moved back and the new target fix is for 4.19... https://issues.unrealengine.com/issue/UE-41411 and https://issues.unrealengine.com/issue/UE-40033. If this is a different bug it's worth making a new thread.

avatar image Davision Oct 24 '17 at 09:39 PM

Yea, sadly they just keep moving the target fix to next version and they keep marking this answered. Seems all to be related, once it is corrupted all sorts of funky things happen. Here it turned out, I had to delete the LevelSpecifcBackgrounds variable several times which ultimately deleted the ERROR DUPLICATE variable, like there were then lots of variables with the same name. When I had them all deleted I was able to compile again.

I just keep posting new things about this here so that hopefully one day someone over there realizes fixing structure variables should be high up their priority list. As it can be seen in the original post, it is there since 4.13

avatar image Haoris Jan 14 '18 at 03:07 PM

This is still not fixed. Structures variables are randomly corrupted. Sometime after a clean restart of the editor (not a crash while saving/compiling something). This should be marked as a number one priority as it can break a project in one second.

avatar image Pharros Jan 20 '18 at 03:28 PM

Can confirm. All my structs had just broke themselves. Using UE4.18.3 as of 1/20/18.

avatar image Fredrum Apr 10 '18 at 10:37 PM

Just had my project broken by this bug too!
I tried to add one fresh variable to my c++ struct and that worked fine. Then making two more of the same type and then it all broke. :( I have tried deleting Intermediates folder and regenerating VS files but nothing helps. Its broke.

avatar image Davision Apr 18 '18 at 02:08 PM

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.

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

Happening to me, found this page googling "structure no longer showing up as variable type." This is the second time this week we've had a structure completely break our project file..

more ▼

answered Feb 11 '18 at 04:08 AM

avatar image

LocalJoke
6 2 4

(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