godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.26k stars 19.61k forks source link

Can't change parent of a node that has MultiplayerSpawners embedded. Server crashes. #93380

Open agrimminck opened 1 month ago

agrimminck commented 1 month ago

Tested versions

4.3.beta1

System information

Windows 11 - Godot 4.3.beta1 - Forward+

Issue description

Hello there, Sorry if I am reporting too many bugs for multiplayer issues. If I'm mistaken in what I've seen so far please let me know, but I haven't found a way to get to this specific goal, which is, to have a synchronized Entity through MultiplayerSpawners, and also have that Entity synchronize some of its children through MultiplayerSpawners too.

Thank you for your patience!

Steps to reproduce

  1. Make a main scene and add 2 nodes A and B as siblings to it. Each of them will synchronize the same scene through MultiplayerSpawners.
  2. Create the empty Node scene D.
  3. Create the scene C with a MultiplayerSpawner node that synchronizes the child scene D.
  4. Run the game.
  5. Connect server and client.
  6. Instantiate C in A on the server, there is no need to instantiate the children.
  7. Try to A.remove_child(C) and then B.add_child(C)
  8. Server crashes

Minimal reproduction project (MRP)

minimal-project.zip

agrimminck commented 1 month ago

I closed this because there is another little bug in the multiplayer aspect that I find more important to address first https://github.com/godotengine/godot/issues/93473 whenever that one gets resolved, I might reopen this one

akien-mga commented 1 month ago

Well all bugs should be fixed, if this one is reproducible, it shouldn't be closed.