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"

Compiler Error for Indirect Blueprint Component References

In UE 4.8.1, I'm experiencing a bizarre Blueprint compiler error. The following steps reproduce the issue:

1) Create a new blueprint-based component called "MyComponent." Give this component a single function called "MyFunction." MyComponent

2) Create a new actor called "MyActor," giving it a "MyComponent." Call "MyComponent.MyFunction()" in the "BeginPlay" event. MyActor

3) Create a new actor called "MyOtherActor," and give it a variable that holds a reference to a "MyActor." Again, call "MyActor.MyComponent.MyFunction()" in the "BeginPlay" event of this new actor. MyOtherActor

4) Change "MyComponent" in some way (I just added an extra boolean variable to it.

5) Recompile "MyComponent."

6) Notice that there is a transient compiler error in "MyActor." This is annoying, but not fatal. "MyActor" can be recompiled with one click.

7) However, notice also that the pin from the referenced "MyComponent" to "MyFunction()" has been disconnected in "MyOtherActor." This is fatal, as it will stop compilation for any and all blueprints which reference the component indirectly like this. It also causes hidden logic errors if the component was, say, passed as a function parameter instead. Such an error will not generate a compiler error, but will cripple the game's logic. MyOtherActor Error

This issue can be worked around by using something like the following: Workaround

In the long run, I feel that it would be better to throw compiler errors than to ever disconnect a pin automatically. Disconnecting pins is the equivalent of automatically rewriting lines of source code, and it's not even remotely close to okay. I shudder to think of what other logic errors may have snuck into my game due to issues like this that I have failed to catch.

Product Version: UE 4.8
component.png (121.8 kB)
first actor.png (154.6 kB)
second actor.png (162.4 kB)
but this works.png (182.9 kB)
more ▼

asked Jul 06 '15 at 11:57 PM in Bug Reports

avatar image

41 2 8 7

avatar image Samantha Sutton ♦♦ STAFF Jul 08 '15 at 04:48 PM

Hey Moonspine,

Thanks for reporting this to us. I followed your reproduction steps closely and I see that you're provided with an error however I am not when I make a change to the 'MyComponent' blueprint. I added in a boolean and even attached it to the printstring from 'My Function' and no errors have appeared in either of the blueprints.

Have you been able to reproduce this each time you follow these steps? If so, would you mind zipping the blueprints and providing them to me so I can include them in a new project and compare ours and see what the difference may be?

I appreciate your time and look forward to hearing from you, thanks! :)

avatar image Moonspine Jul 09 '15 at 11:28 PM

I'l do you one better than that. I've attached a blank project with blueprints that can reproduce the problem in UE 4.8.1. To reproduce:

1) Open the project

2) Open MyActor and MyOtherActor (this is apparently an important step, and is likely why you couldn't reproduce it. It doesn't fail if the blueprints are not open in the editor.)

3) Open MyComponent and add a new boolean variable (default name is fine).

4) Compile MyComponent

5) Look at MyActor and MyOtherActor to see the errors.

[1]: /storage/temp/49729-blank.tar.gz

blank.tar.gz (1.7 MB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Moonspine,

You're probably correct. I may have closed out the blueprints when attempting this which did not cause the issue. I have however been able to reproduce this within your project that was provided and my own. I have submitted a Jira report referenced as: UE-18430.

Thank you again for noticing this issue within the blueprint editor. If you have any further questions or concerns, please feel free to post a new question to AnswerHub!

Have a great weekend!

more ▼

answered Jul 10 '15 at 01:26 PM

avatar image Moonspine Jul 10 '15 at 10:12 PM

No problem! Thanks for being so responsive. Now that I've learned that it only happens if the blueprints themselves are open though, I at least have a workaround. I'll just be careful until the fix is released.

avatar image Samantha Sutton ♦♦ STAFF Jul 13 '15 at 03:23 PM

No problem, feel free to reply back here if you notice that workaround isn't working well for you until we can get that fix out for the public.

I appreciate your assistance with this matter, have a great day!

avatar image Martin Egger Aug 28 '15 at 09:34 AM

Hey Samantha, I just wanted to see if we are going to see a fix in 4.9 or we need to use the workaround there as well

avatar image Samantha Sutton ♦♦ STAFF Aug 31 '15 at 10:48 PM

Hey Martin,

UE-18430 was not ready for 4.9 however, it's currently scheduled for 4.10 but it's not resolved yet, so that could change at any time. Feel free to ask again in a few weeks.

Thank you! :)

(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