Description

When using AddChildActorComponent in the construction script of an actor and attempting to get a reference to the child actor that is stored in a variable on Event Begin Play, the editor throws errors after exiting PIE.

Error Message: Error Cannot access 'DESTROYED_Block_C_CHILDACTOR_13'. It is pending kill. Property: 'ChildActorVar' from node Print String in graph 'EventGraph' in blueprint Floor_Blueprint

This does not occur in 4.10.2, this is a regression.

Found in 4.11 Preview 5. Reproduced in Main CL 2868856

Steps to Reproduce

1. Open the attached project.
2. PIE

Full Repro Steps:

1. Open the editor
2. Create new "blank" project without starter content
3. Create a new blueprint class based on Actor, call it Block
4. Select the floor object of the level and click on "Blueprint/Add Script" in the details tab
5. In the Floor_Blueprint blueprint editor, Add a variable named "ChildActorVar" of type Actor reference
6. In the Construction Script of Floor_Blueprin: Add a "Add Child Actor Component" node, choosing "Block" as Child Actor Class
7. Take the return value and choose "Get Child Actor"
8. Assign the child actor to the variable "ChildActorVar"
9. In the Event Graph, from the "Event BeginPlay" node create a "Print String" node
10. Drag the "ChildActorVar" as "Get" into the blueprint and choose "Get Actor Eyes View Point"
11.Connect the "Out Location" value with "In String" from the "Print String" node
12. Compile the blueprint
13. PIE
14. Stop PIE

Result: "Errors/warnings reported while playing in editor": Error Cannot access 'DESTROYED_Block_C_CHILDACTOR_6'. It is pending kill. Property: 'ChildActorVar' from node Print String in graph 'EventGraph' in blueprint Floor_Blueprint

Expected: Exiting PIE would not throw an error, as it does not do so in 4.10.2.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions4.114.12
Target Fix4.13
CreatedFeb 16, 2016
ResolvedJul 15, 2016
UpdatedApr 27, 2018
View Jira Issue