Skip to content

Silent RPC failure? #3989

@zachstronaut

Description

@zachstronaut

Description

We have confirmed a ServerRPC being invoked on a Client and never invoking on the Host+Server through a Log immediately before calling the ServerRPC on the client and a Log inside the ServerRPC on the server. We didn't have log levels set to Developer at the time we captured this happening, so we're unsure the cause or if the higher log level would have perhaps mentioned something. This was in Netcode 2.7.0. It seems to happen rarely when additively loading the next game level, perhaps when loading that level is slow. The ServerRPC in question lives on a NetworkObject in a scene that never gets unloaded.

But also, I noticed that in RpcMessages.cs in all Netcode versions through 2.11.2 the Deserialize method has what look like two silent failures. Are these in fact potential silent failures?

var networkObject = networkManager.SpawnManager.SpawnedObjects[metadata.NetworkObjectId];
var networkBehaviour = networkManager.SpawnManager.SpawnedObjects[metadata.NetworkObjectId].GetNetworkBehaviourAtOrderIndex(metadata.NetworkBehaviourId);
if (networkBehaviour == null)
{
    return false;
}

if (!NetworkBehaviour.__rpc_func_table[networkBehaviour.GetType()].ContainsKey(metadata.NetworkRpcMethodId))
{
    return false;
}

Environment

  • OS: Windows
  • Unity Version: 6000.1.17f1
  • Netcode Version: see above
  • Netcode Topology: Client-Server

Metadata

Metadata

Labels

stat:InvestigatingIssue is currently being investigatedstat:awaiting-responseAwaiting response from author. This label should be added manually.type:bugBug Report

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions