What does this error mean?

Hello.

I made a wall building system. Befer adding a spline point, i’m drawing a ghost of the wall from the last point to the cursor actual position.
So every tick (when building) I update the ghost relatively to the cursor position : I delete the previous one, and draw a new one :

At runtime, I got a lot of error like this :

Blueprint Runtime Error: “Attempted to access NODE_AddSplineMeshComponent-4_1 via property CallFunc_Array_Get_Item, but NODE_AddSplineMeshComponent-4_1 is pending kill”. Blueprint: BP_WallSplineGhost Function: Draw Ghost Graph: Draw Ghost Node: DestroyComponent

If someone could explain me what’s wrong, it’d be awesome. Thank you

It means you’re trying to reference things after you’ve already destroyed them.

1 Like

Thank for your answere. This is the only place I am using this array of component. Do you see something wrong in my blueprint ? Is there a better way to draw a dynamic, or moving, component ?
Thank you !

Try clearing the array before going into the second loop, in your diagram. ( Just use a clear node ).

1 Like

Thank you ClockworkOcean, I don’t have the error anymore. I added a clear node like this :

I had to keep the destroy element to destroy the mesh. Perfect now !

If I undersand, my mistake was to delete the content in the array, but in fact the
the entrees were still there, just empty actually, and were adding in top of each other. Right ? I guess.
Thank you again

1 Like

You destroyed the meshes, but the references were still in the array. And then you added to the array.

1 Like