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"

Structs crashing Editor

Background

I've been having this issue for a while, working in Blueprints, but I recently decided to try and migrate my files from one project to a new one, as I wanted to move around and delete unnecessary files.

When I opened the file, my structs were broken. I had a few enums within the structs that became converted to bytes, which broke the structs.

I also use one larger struct as a parent to all the other structs (I have 8 sub structs in total, this is necessary otherwise I'd have hundreds of variables in one single struct) A few times my editor has crashed when editing either parent or child struct.

The Error

The current issue I'm having, after opening the project and having the struct declare the error where the enums got converted to bytes, the blueprints containing my structs, it has me delete all the references to now broken structs. When I go back in and try and fix the errors, re-connect all the now orphaned pins, at some point, (I've gone through the process multiple times, it seems to happen at random, and not connected to any particular reconnection of an orphaned pin) the editor will crash. Upon this editor crash, every time I try and re-open the project, the editor will crash when I try and edit the component that all my structs are on.

Steps taken to solve

I've taken steps to solve this myself, like deleting the derived data cache, and the intermediate and saved folders. At the moment my project will open and I can open the component back up as I rolled back to a previous version of the file, however one that still has all the broken references that I need to fix.

EDIT: I've also migrated the files to a new project to see if the issue persists, which it does. The structs are not nested within a box struct, as I can't seem to make a data table out of a box struct, nor can I make a structure with a box struct in it, and give that box struct values within that base box struct. (The dream would be to have a new type in the blueprints creation menu specifically for box structs, and being able to add new structs to the box right there)

in case I've lacked in clarity, here's some images of how I have my structs set up. Here is the parent structalt text

Example of one of the nested structs (lots of variables, which is why its super necessary to have a container) alt text

Product Version: UE 4.17
Tags:
more ▼

asked Jan 05 '18 at 08:16 PM in Bug Reports

avatar image

KyleRasmusson
16 1 6 7

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

1 answer: sort voted first

Structs are still unstable, after all these years. There are some fixes on the way:

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

There is one workaround that helped me deal with the most annoying issues they cause - crashing and unsolvable compilation errors. It's more of a preventive measure rather than a fix:

Once I have a struct deployed and need to make changes to it, I make the changes and save the struct. Close the editor at this point, DO NOT save or compile any other blueprints. Let them go unsaved, open the editor again and the struct will work absolutely fine. :|

As silly as this sounds I've been using this method for a couple of months now and never looked back. Again, it's a workaround, not a solution, though. Here's hoping for major fixes soon.

more ▼

answered Jan 12 '18 at 04:02 PM

avatar image

Everynone
13.8k 74 25 58

avatar image KyleRasmusson Jan 12 '18 at 04:32 PM

Part of my problem is I can't get that far. I've been editing this post, so I may have updated this after you saw and were already writing, but if I try and make a change to one of the child structs, it immediately crashes my editor. I recently went about trying to reload all the assets from the disk, and it seems that the error is contained within my parent struct. I don't believe UE4 is at all meant to have nested structs at the moment, especially if they're not nested within the box struct, which doesn't give me the functionality I need.

avatar image Everynone Jan 12 '18 at 05:18 PM

I don't believe UE4 is at all meant to have nested structs at the moment,

Yes and no. The behaviour is super buggy and unstable. I have nested structs with 7 layers. It's a procedurally generated universe where clusters of stars contain planets which contain moons which contain stations and asteroids and so on.

In the end it's ALL located in a SINGLE struct variable that I manage to save and load successfully. Depending on how the random generation process goes; it's around 20k objects, each containing a separate struct for the commonly shared class data, material and some other metrics. The bottom line is these are nested layers of arrays within arrays. I even managed to work around structs storing identical structs... What I'm trying to say is that it is possible but it does not work out of the box. Unfortunately.

I had to rewrite the whole system because I got to a point of no return, just like you. Stuff was so badly broken and the circular dependencies could not be fixed. When I rewrote it, I used the method I described in my previous post. So far so good.

In addition, I stared using components whose sole purpose is to store the struct. This way, when something breaks I need to fix the component rather than the actor and the ENTIRE line of inheritance...

From my point of view, you have 2 options:

  • wait for 4.19, pray to the gaming gods, focusing on working on something struct unrelated

  • start rewriting your system, ensuring to never recompile actors straight after changing the nested struct

If there is a magic button to fix all the evil within structs, I do not know about it.

avatar image KyleRasmusson Jan 13 '18 at 02:08 PM

What seems to work so far, I just duplicated my structs, and edited the variables on there, and then now I'm putting them back in, which is gonna kinda suck, due to just how many references I have for each of these structs, even though I have them all within some little helper functions, makes things easier.

avatar image Everynone Jan 15 '18 at 10:54 AM

You can drag and drop variables to replace them - does not always work but it may save some time:

https://gyazo.com/19dc7d87dd65f39e3f0cacb00b41238d

avatar image KyleRasmusson Feb 02 '18 at 04:21 PM

I did happen to find some semblance of a solution, I duplicated the problem struct, and then broke it down into several smaller structs, and finished by putting the new mini structs back under the parent struct, all seems well so far. It seems the issue was that I have so many variables within one of the structs.

avatar image AGreE70 Feb 16 '19 at 07:38 AM

Ich habe eine Struktur erstellt und sie geändert, während sie schon als Variable in mehreren Schauspielern verwendet wurde.

Ich kann mein Projekt nicht mehr öffnen. Weiß jemand darauf eine Antwort?

(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