godotengine / godot

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

MultiplayerSynchronizer - "Watch" properties - on_delta_receive: Condition "props.size() == 0" is true. Returning: ERR_INVALID_DATA #78669

Closed Federick732000 closed 1 year ago

Federick732000 commented 1 year ago

Godot version

v4.1.beta2.mono.official [a2575cba4]

System information

Godot v4.1.beta2.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated GeForce RTX 2060 () - AMD Ryzen 5 2600X Six-Core Processor (12 Threads)

Issue description

I'm using a Multiplayer Synchronizer to sync some variables of two instantiated players (each one has local multiplayer authority). Setting the "watch" property on the multiplayer synchronizer properties causes the player who receive the delta update to receive this error and to not store the updated value:

E 0:00:01:0604   on_delta_receive: Condition "props.size() == 0" is true. Returning: ERR_INVALID_DATA
  <C++ Source>   modules/multiplayer/scene_replication_interface.cpp:778 @ on_delta_receive()

I don't know if the problem is Mono-specific, but the error comes up even on Node3D default properties.

Steps to reproduce

Minimal reproduction project

Test_delta.zip Test_delta-gdscript.zip

AThousandShips commented 1 year ago

Please test if this is specific to C# and if not add an MRP that has GDScript as well:

This will greatly speed up any resolution to this because most bug testers here don't use Mono (like me), and even if we were to be able to convert the code to GDScript by looking at the code it wouldn't be certain it's actually replicating the same behaviour

It also helps to pin down what's actually wrong

Federick732000 commented 1 year ago

Understood. I converted the project to gdscript and the problem is still there. I added the project to the issue

AThousandShips commented 1 year ago

Thank you!