godotengine / godot

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

Nested MultiplayerSpawner causes node not found error if a peer joins after some spawnable scenes are freed. #91342

Open tianer2820 opened 6 months ago

tianer2820 commented 6 months ago

Tested versions

Godot v4.2.1.stable & Godot v4.2.2.stable

System information

Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) () - AMD Ryzen 7 7840H w/ Radeon 780M Graphics (16 Threads)

Issue description

When there are nested multiplayer spawners, and when some of the children of the second layer spawners are freed, there will be a node_not_found error when new peer joins.

Steps to reproduce

Inside the reproduction project:

  1. run 2 instances
  2. click the host button on the first instance, wait a few seconds so the labels in the middle are deleted
  3. click the join button on the second instance. There will be some node-not-found errors when the peer joins: image

This does not happen if you delete the queue_free code in level_1.gd

This also does not happen if the client joins before those labels are freed

Minimal reproduction project (MRP)

test.zip

tianer2820 commented 6 months ago

A related discussion in the forum: https://forum.godotengine.org/t/layered-mutliplayer-spawners-cause-get-node-node-not-found-error/51634/22

AThousandShips commented 6 months ago

Can you please try on 4.2.2?

tianer2820 commented 6 months ago

Tested, it also exists in v4.2.2.stable, the same reproduction project works

MichaelGumm commented 2 months ago

I’m also having this issue on 4.3, is there any known workaround at the moment?

ICiscoStu commented 2 months ago

this issue is still present in 4.3, has thee been a workaround found?