Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
139 stars 2 forks source link

Dynamic variables on duplicated Slot are not linked when replicated by other users #1690

Open mpmxyz opened 6 months ago

mpmxyz commented 6 months ago

Describe the bug?

When Resonite instantiates dynamic variables created by other users they are not linked before the first ProtoFlux events happen. This causes issues with code that attempts to interface with freshly created objects locally or for systems using objects for network communication.

To Reproduce

User A:

  1. Duplicate a slot with a dynamic variable space and variables User B:
  2. Observe the parent the new slot has been put in with Slot Children Events
  3. Read the dynamic variables of the new child

The following object demonstrates this. Just click the button and you can't miss the error messages! (requires a second user to be present) resrec:///U-TheAutopilot/R-87665623-49ed-456a-af4f-2e35b283ef81

Expected behavior

Dynamic variables coming from another user should be bound before you have a chance to observe the opposite. (mirrors behaviour for duplicates that were created by local user)

Screenshots

No response

Resonite Version Number

Beta 2024.4.3.1170

What Platforms does this occur on?

Windows

What headset if any do you use?

No response

Log Files

ANONYMOUS - 2024.4.3.1170 - 2024-04-15 21_18_24.log (perspective of user who created the object) ANONYMOUS - 2024.4.3.1170 - 2024-04-15 21_35_09.log (perspective of user who received the object via network)

Additional Context

No response

Reporters

No response

shiftyscales commented 6 months ago

This feels like it could be related to your earlier reported issue, #1394.

mpmxyz commented 6 months ago

They are related and maybe there is a solution to solve both in one go. Details differ, though:

1394 happens because there is a missing linking operation in the code creating dynamic variables of IWorldElements.

This new issue is caused by missing/delayed linking after instantiation from the network. It affects all kinds of dynamic variables.