Problems with Structure

I have an “item” struct. ID, name, stats, etc etc…

First problem: My item BPs randomly had their structure reset. I don’t have many items yet, but plan on having hundreds. If all of them were to reset that would be totally devastating. I don’t know what caused it, but I think modifying the structure is what did it.

Second problem: Every time I launch my project, all of my structure array pins get unlinked. All of them. Again, this started happening after I modified the struct.

What can I do to prevent these two problems? Can I never modify my struct? And how can I fix my current problem? I read a post with someone who can a similar problem, and the solution was to delete the array nodes and recreate them… The problem is I just have so many. And also I tried deleting one and remaking it, and it is still unlinking. Would I literally have to do this with every instance?

I remember last time I was working with UE4 I just quit due to all the struct problems I was having, and now they’re back again.

Any help would be appreciated

EDIT:

So I fixed the corruption issue by deleting the array variable entirely and recreating it… And then I went around relinking everything (it’s for inventory, so it spans multiple blueprints and takes awhile).

Then I went to add another structure element… And now everything is broken again, same as before. Everything got unlinked.

This is either a bug or I am doing something wrong. The obvious solution would be to “complete” the item structure, but that isn’t necessarily possible as the things I am adding are things I haven’t thought of.

Hi vanlacke,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to reproduce this error on my end?
  • Is there anything in your blueprints that could cause your values to reset within the structs?

Let me try it on a new project.

As for the itemBP, it’s blank except for the struct, and then construction script which just sets the staticmesh

I also made an edit to my post, it’s reproducible, at least on this project

Okay, so ultra basic test, I couldn’t reproduce it.

I could upload my project, would that work? Or is there something I can perhaps do, or check?

EDIT:

Think I found a workaround. I can edit the struct, and then delete the associated structure arrays entirely (in this case, 3 struct array variables), then simply ctrl+z to undo the change. It seems as though if I do this before closing the project, they won’t unlink upon reopening.

Seems like I’ll just have to be very careful. I also really hope my items don’t get cleared again (it only happened once). Maybe I’ll backup the uassets occasionally, but I don’t see that working too well…

Hi vanlacke,

I’m happy to hear you were able to find a solution to the error you were experiencing. I am marking this as answered for tracking purposes. If the error occurs again, please comment with updated information.

Hi , I had my item BPs data structure wiped again. What could be causing this? Any ideas? It was after I changed the structure, closed the editor, and opened it again.

Luckily my workaround has been working, so I don’t have to re link everything, however the item wiping can still happen it seems. Right now I’m thinking of backing up the entire items directory, and copy/pasting it back if a wipe occurs… Good idea?

Do you have any blueprint functionality that could be overriding the changes you have made? For instance, are you setting any values in the construction script or with another blueprint that could be altering the values?

Here is the construction script.

As for changing the values… I do change stack size (not in the item parent BP), that’s the only variable in the struct I change currently in my inventory system. I do plan on changing many more. Could that really be an issue?

Thanks

Can you send me a sample project this is occurring in? I might be able to see where the override is occurring.

Alright , so I decided to update to 4.12 since the patch notes mentioned they fixed some structure problem, including the unlinking issue when modifying a structure… Well, arrays unlinked once again even on 4.12…

I do have a workaround for that as mentioned. The real problem I am having now is the items having their structure data wiped - but let me use 4.12 a bit more and see if it happens on this engine version…

But, assuming it does… How could I send a “sample” of my project? I think I’d simply have to send the entire thing. I’m also running a source build, not sure if that matters.

I’d also like some way to send it privately somehow, if that’s possible. Let me know. Trying to think of a way to store the item data perhaps in a table and assign values in a construction script that way as a workaround

Thanks for the help

Update: updating to 4.12 made everything exponentially worse… I practically can’t continue developing right now, I may need to revert to 4.11, since it seems none of the structure issues were fixed (at least for me), and now I get near constant crashes when compiling, and almost 100% crash when compiling widgets…

I really am at my wits end. Would it be possible to send over the project? All you’d have to do is make a change on a widget or something and it will crash, and likely unlink all the structure arrays in the process

EDIT: I was able to solve the UMG crashing issue by applying this fix: link text

HI vanlacke,

To confirm, you were able to resolve the error you are experiencing? Are you still having trouble?

If so, you can place your project in a . and either upload it to a trusted FTP service, such as google drive or dropbox or load it directly here if it is small enough. If you use an FTP service, please share the link to the file here.

I have started working with structures and the same happens to me. At first I was using perforce and thought it was because of that, but now it happens the same thing. It unlinks when I restart the engine. Not for all of them for some reason… Are there any plans to fix this?

Hi ,

Unfortunately I was unable to reproduce vanlacke’s issue on my end. Until we can reproduce the error there is not much we can do to resolve it.

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to recreate this error on my end?
  • What engine version are you currently using?

That is the issue. It just happens. Is there anything wrong in force deleting something and then deleting its nodes or renaming something? I do that sometimes, don’t know if it matters. I’m using 4.12. This morning the same thing happened.

Unfortunately without some reproduction steps or a sample project this is occurring in, I won’t be able to recreate the error on my end. Can you think of anything you do in the editor before this happens?

I have the same problem with structures. Have delete all variables of structures and recreate them to compile the project.
This is very boring.

  • Do you have any steps I can take to recreate this error on my end?
  • What steps can I take to recreate this error on my end?
  • What engine version are you currently using?

Getting this issue constantly on my end. It only happens when I edit the struct. My solution is to remove the instance/s of the blueprint in my graph and bring it back, reconnect and I then everything works.
Using 4.15
Unfortunately, was unable to recreate the issue to find the cause.

I still have this problem, it’s been going on since day one and has never been fixed.