Skip to content

Errors when despawning a NetworkRigidBody3D with MultiplayerSpawner #515

@Azengar

Description

@Azengar

🐛 Description

Upon calling queue_free() on a NetworkRigidBody3D that has a RollbackSynchronizer managed by a MultiplayerSpawner, the node is correctly deleted on server and then client but prints 3 errors on the client:

E 0:00:06:184 get_node: Node not found: "Level/Balls/Ball/RollbackSynchronizer/Node" (relative to "/root").
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1907 @ get_node()
E 0:00:06:184 get_cached_object: Failed to get cached node from peer 1942538544 with cache ID 5.
<C++ Error> Parameter "node" is null.
<C++ Source> modules/multiplayer/scene_cache_interface.cpp:291 @ get_cached_object()
E 0:00:06:184 process_rpc: Invalid packet received. Requested node was not found.
<C++ Error> Parameter "node" is null.
<C++ Source> modules/multiplayer/scene_rpc_interface.cpp:208 @ process_rpc()

If the RollbackSynchronizer is removed then the issue disappears.

Unsure if that's relevant but I use Rapier3D deterministic physic with the netfox driver.

Steps to reproduce

  1. Create a scene with a MultiplayerSpawner that spawns another scene.
  2. Make the spawned scene a NetworkRigidBody3D with a RollbackSynchronizer.
  3. Create and delete one of the spawned rigidbodies via queue_free().

Expected behavior

  1. No errors should be printed.

Observed behavior

  1. Errors appear, as pasted above.

Versions

  • Godot version: 4.5-stable
  • netfox version: From sources, main-7c1e9eff915bc46cef5b433398c9801367446071

Notes

MRE

I provide a small reproducible project here (Couldn't upload it in the issue for some reason): https://filebin.net/13bncd13928jb95u

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions