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"

[Bug Report][Reproducible] Child Actor Component's Class clears on editor restart

This is a reproducible bug report of a bug that people have been reporting recently on 4.7: https://answers.unrealengine.com/questions/178689/child-actor-components-class-clears-on-editor-rest.html

Branch: Binary

Build Version: 4.7.0-2455222

Repro Steps:

  • Create a new project "ChildActorNone" from blank template with no starter content

  • Create new blueprint "MyPlayerController" by subclassing the "PlayerController" blueprint

  • Create new blueprint "MyChildActor" by subclassing the "Actor" blueprint

  • Create new blueprint "MyActor" by subclassing the "Actor" blueprint

  • Create new "ChildActor" component in "MyPlayerController"

  • Set "Child Actor Class" property of "ChildActor" component in "MyPlayerController" blueprint to "MyChildActor"

  • Create new variable "MyActorVariable" of type "MyActor" in "MyPlayerController"

  • Create graph in "MyPlayerController": alt text

  • Create graph in "MyActor": alt text

  • Save everything

  • Close and reopen editor

  • Notice how the "Child Actor Class" property of "Child Actor" component in "MyPlayerController" blueprint has been set to something like "PLACEHOLDER-CLASS_MyChildActor_C_0"

Product Version: Not Selected
more ▼

asked Mar 04 '15 at 12:03 AM in Bug Reports

avatar image

88 7 10 14

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

1 answer: sort voted first

Hey Mastodon,

Thanks for the reproduction steps! This was really helpful, and I was able to reproduce this issue in 4.7.1 as well. I checked it in our internal build as well, and it appears that the issue has already been fixed. This fix should be included with a future release.

In the meantime, it appears that the cause is circular dependency; MyPlayerController is getting a reference to MyChildActor, which in turn references the player controller. This is generally to be avoided if possible, but it looks like this particular bug won't be an issue for much longer. Thanks again for narrowing it down for us!

more ▼

answered Mar 04 '15 at 01:03 AM

avatar image Mastodon Mar 04 '15 at 01:12 AM

You're welcome Ben. Glad to help.

I suspected the culprit was a circular dependency during asset loading.

So is this on track to be fixed in 4.8 or 4.7.2 (if there will be one)?

What would be a good work-around in the meantime? Other than just removing all circular dependencies.

Thank you for your help.

avatar image Ben Halliday STAFF Mar 04 '15 at 01:18 AM

My guess would be 4.8, though if we do Previews again (I suspect we will) you'll see it there first. I think 4.7.2 will be too short notice for the developers at this point, if they decide to push that out.

Removing circular dependencies is definitely your best bet, though I know that can be difficult and the workaround will depend on what you're trying to achieve. I'll give it some thought for the type of setup you've got here and let you know what I come up with.

avatar image VSZ Mar 05 '15 at 10:17 AM

Hi Ben, I understand this is fixed in an 'internal build' - which Github branch would I need to pick up to obtain this fix, is it the 'promoted' branch or '4.8' branch?

Some additional thoughts: I realize using a build on the bleeding edge of development is risk prone (as I only just migrated from 4.6.1 to 4.7.1 with some effort), but this issue is quite a thorn right now as I have to manually set up the child actor class whenever I start the editor, obviously not fun!

avatar image Ben Halliday STAFF Mar 05 '15 at 03:53 PM

Promoted is probably the most stable option, and the most recent Promoted is pretty close to what I tested this on. Master is updated whenever any change is made, so it can be severely unstable.

avatar image Rashura Mar 05 '15 at 01:25 PM

Also just started having this problem after updatin to 4.7.1 and again after 4.7.2 with random blueprints that have absolutely no circ. dep. Random child actor components are cleared after editor restart.

avatar image Ben Halliday STAFF Mar 05 '15 at 03:54 PM

Hi Rashura,

If you don't have any circular dependency in your blueprints, it's probably a different bug. Can you create a new post with as many details and reproduction steps as you can? We can take a look there. Thanks!

avatar image sculpepper Mar 20 '15 at 02:31 AM

Similar issue. If I have a child component and a variable of the same type whenever the editor restarts the child component is set to none. The child component is an actor with just a few float and integer variables with no logic.

avatar image VSZ Mar 20 '15 at 10:57 AM

Same here, mine's not a circular dep issue either (although there are macro libraries involved and those are often the culprit), so I can confirm that fix Ben mentioned in from the internal build(s) doesn't work for me.

For now I'm working around this issue until I can set aside some time to properly focus on this (I understand Ben's suggestion is to file a new report).

Others feel free to pitch in with any repro if you already have one, sadly I haven't been able to repro this outside my own project.

avatar image Ben Halliday STAFF Mar 20 '15 at 02:18 PM

Hi all,

We've seen a few varying cases with which this happens and we believe it's been fixed, but we weren't able to get it into 4.7 because it is an API breaking change. It's possible that simply using the GitHub commit won't fix this for everyone. The best way to test this right now would be to get Master branch and open a copy of the project there.

To work around it for now, as long as you don't have bad cyclic dependencies, you can try disabling the deferred dependency loading (bDeferDependencyLoads=false) in BaseEngine.ini.

avatar image VSZ Mar 29 '15 at 07:14 PM

Thanks Ben, your workaround did the trick! Just curious - what are the downsides of setting bDeferDependencyLoads to false?

PS: I didn't just pull a particular github commit to test the fix (in fact I don't even know which commit it is!), I built an entire promoted branch around the first week of March so I'm a bit wary of whether the latest fix covers all variations of the issue in question.

avatar image Ben Halliday STAFF Mar 30 '15 at 02:01 PM

If you have circular dependencies that could cause a crash, bDeferDependencyLoads will prevent the project from crashing. With it disabled, you're running that risk.

Mike Beach was able to get a non-API-breaking fix in for 4.7.4, which should be released officially very soon, and I've been getting various confirmations that this bug has been fixed by it. If you'd like to test it sooner than that, grabbing a 4.7 build from GitHub should do it.

avatar image VSZ Mar 30 '15 at 02:40 PM

Thanks for the explanation! I'll probably wait for 4.7.4 to test.

(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