Network Client RPC issue with TearOff actor

Hi,

We had a strange issue in our game that leads to a crash.

If we are using a Actor that have just been “teared off” as owner of a Spawned Actor, if we are calling a client RPC function in “BeginPlay” function of this actor, server will received ClientRPC call where as we expected that call is “dropped” as owner Connection is not “active” anymore.

Could you please confirm this is a bug or if it is by design?

In our case, this leads to a crash because RPC was calling a function that was testing Role_Authority to call ClientRPC or do some cosmetic things on client so we enters in a infinite loop.

Thanks,

Hi Elvince,

How and from where are you changing ownership of spawned actor?

For crash, is this in a packaged game, or does it crash editor as well? Can you provide crash log for this, as well as your Machine ID from Crash Reporter window, please?

To avoid crash, I’d definitely recommend putting a check in there before running RPC.

Hey Elvince,

I haven’t heard back from you yet, so I’m resolving this post for tracking purposes. If you’re still experiencing issues after changing ownership of an actor, please feel free to reply to this post with information requested above and any other pertinent details, and we’ll continue investigating. Thanks!

Sorry for late answer.

I found in docs some explanation on how Client/Multicast works when Owner is “server”.
I bet that in my case as my Owner was pending kill it has been considered as null so server became onwerod actor and here come my issue.

I treated that correctly following docs information and now it’s working fine. Thanks for your time.