x

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"

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. alt text alt text

alt text

Product Version: UE 4.14 Preview
Tags:
error1.jpg (20.4 kB)
error2.jpg (91.7 kB)
error3.jpg (52.8 kB)
more ▼

asked Nov 05 '16 at 09:13 PM in Bug Reports

avatar image

Raildex_
512 18 37 62

avatar image CriErr Nov 05 '16 at 10:21 PM

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?

avatar image Raildex_ Nov 05 '16 at 11:27 PM

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?

avatar image CriErr Nov 06 '16 at 12:29 AM

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.

avatar image Raildex_ Nov 06 '16 at 08:07 AM

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.

avatar image CriErr Nov 06 '16 at 12:02 PM

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.

avatar image Adam Davis STAFF Nov 07 '16 at 02:57 PM

Hi Raildex_,

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.

avatar image Adam Davis STAFF Nov 07 '16 at 08:44 PM

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?

avatar image CriErr Nov 07 '16 at 09:35 PM

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.

avatar image Adam Davis STAFF Nov 07 '16 at 09:50 PM

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.

avatar image Raildex_ Nov 08 '16 at 07:23 AM

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.

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

1 answer: sort voted first

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

more ▼

answered Nov 07 '16 at 07:12 PM

avatar image

Raildex_
512 18 37 62

(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