Actor Pending Kill for seemingly no reason?

This is an odd one, but basically actors that I place into my player controllers inventory are marking themselves as pending kill. I’m marking this as a bug report as I’m almost positive this should not be occurring.

Some things to note;

I have double checked all of the “Initial life span” sections on the actor bp’s

This error has only occurred since I’ve made my game (and inventory system) multiplayer based

It only seems to occur after the actor is spawned into the game; When I spawn the item, wait a couple of seconds,
then try and access the name variable inside the actor, it will give me the error.

But If I spawn it and access it ASAP it will give me the name once or twice (depending on how quickly I double click) but then shortly after be marked for pending kill again.

Here is the path the blueprints take from my “Interact” trace call to pick them up.

Here is the random item spawner

And here is an example of the error message

If this is not actually a bug and simply a mistake in the blueprint feel free to move this post to another section, but I can not for the life of me figure this out.

Any help is appreciated

maybe you should also include the codes that causing the error, i.e. the BP of InvItem.OnMouseButtonDoubleClick?

Here you go

This is simply just a test function to see if I could access some variables from the widget.

As you can see the error arises when I try and access “Current Item Actor”, which is the reference to the item in my widget. The other print string is a test to see if it was the widget that was pending kill, but that seems to fire off every time.

Now I could just put a IsValid there but it wouldn’t fix the over-arching problem which is the actor flagging itself pending kill

I’m also positive it’s not any function accessing its values that is causing the problem, it’s somehow based on when the actor spawns .

To avoid Actors getting garbage collected you could try attaching them to the root component of the controlled pawn

That actually worked, wow. I did an ‘attach actor to actor’ and just plugged in the servers PC and it’s now it’s not getting flagged for collection. Thank you for the solution.
I hope this was just due to some error I made,but I still think there’s some bugginess going on.

Props to JR4815 for the answer