Attempted to Access Actor from get Owner; is Pending Kill

The Node “Get Owner” of Actor Component throws this error, when the Actor itself is pending to be destroyed.

Destroying the Component by Hand or deactivating it before the DestroyActor node does not help.

no warning at all.
The “Get Owner” is called from within an Actor Component.
Shouldn’t every Component that access the Owner throw this warning according to this logic?

How is that different from actor component point of view?

Actor is done, everything within the actor is done, including component, no functions should be executed on those, actor pointer even fail “is Valid” check.

As i said, you getting this warning, because engine handles your attempt to access instance of class which is destroyed. If you wait 60 sec, for one garbage collector run, the warning would change from “pending to be destroyed” to “accessed none”, because actor is really gone from blueprint point of view and engine handle attempt to access not valid pointer.

Its seems fine to me. You call destroy actor, object destroyed but yet not removed from memory by gc, instead of straight up crashing, unreal cover you and throw warning, what kind of behaviour you expect?

THE ACTOR COMPONENT throws this warning.
The Actor Component is basically “pending to kill”, too.

The Tick Function of the Actor Component gets executed, even though the Actor itself is marked for destroying.
The Tick function accesses the Owner.

I tested on 4.13.0 actor component Tick does not getting executed after actor Destroy was called on owner actor.

This behaviour of tick called after owner destroyed is not reproducible on my end and if it does happen for you, create a proper bug report, with engine version info, steps to reproduce on clean project and clear project attached (preferably) where bug happens for this exact behaviour.

Hi ,

Try using an IsValid node on the owning component before this would occur. This will allow the functionality to run only if the owning actor IsValid, which should prevent the is pending kill warning from appearing.

I’ve done that now. I couldn’t reproduce this error though.

if the error is no longer occurring, this is working as I’d expect. Because the actor components being destroyed. Did this resolve the error you are experiencing?

That’s expected result, but the question is, why does component tick function getting executed for him after actor destroyed, this does not happen for me.

often it will tick once during the actual act of being destroyed, which will throw the error depending upon when in the frame it is ticked and when the actor is destroyed. The IsValid check is meant as a preventative measure for when this occurs. If the actor is pending kill or is destroyed, it can’t be Valid and therefore cannot pass the tick further.

I wonder why though. Why isn’t the actor destroyed / deactivated before the component tick?
I mean if the Actor is deactivates/destroys( /marks itself for deletion), the components shouldn’t tick anymore.