Yellow-Dog-Man / Resonite-Issues

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

The OSC receiver doesn't properly handle switching between sessions #1885

Open epicEaston197 opened 4 months ago

epicEaston197 commented 4 months ago

Describe the bug?

If you have an OSC receiver object that's receiving data and you save it to your inventory then spawned it out in a new session the data will not be received until the other object is destroyed in that session or that session is closed

To Reproduce

  1. have an OSC object that's receiving
  2. Go to a new session and spawn it out
  3. Observe that the data is not being received in the new session
  4. Leave the previous session or destroy the OSC object in the original session
  5. In the new session you will observe but the data is being received properly

Expected behavior

The OSC receiver should recognize that the user is not in the present session and the receiver that's currently present with the user should be prioritized

Screenshots

https://www.youtube.com/watch?v=8HENZS9bUoU

Resonite Version Number

2024.4.30.495

What Platforms does this occur on?

Windows

What headset if any do you use?

Desktop

Log Files

DESKTOP-DAN95E7 - 2024.4.30.495 - 2024-04-30 15_44_58.log

Additional Context

No response

Reporters

@epicEaston197

shadowpanther commented 4 months ago

If I understand this correctly (going by description only), the issue here is that:

  1. The OSC component doesn't respect the focused state of the user it belongs to (might be intentional).
  2. OSC doesn't allow multiple connections, and as soon as the first connection is closed the second one connects.
ultrawidegamer commented 4 months ago

yes, this sounds like something that could be intentional as the user could disable the connection within the item when focusing/defocusing, but there could also be a configuration added that allows the connection to auto disconnect on defocus and auto reconnect on focus

epicEaston197 commented 4 months ago

yes, this sounds like something that could be intentional as the user could disable the connection within the item when focusing/defocusing, but there could also be a configuration added that allows the connection to auto disconnect on defocus and auto reconnect on focus

that should not be a configuration it should be by default because I was unaware of this behavior and I was really annoyed that my thing wasn't working

Frooxius commented 4 months ago

We need logs for this.

epicEaston197 commented 4 months ago

We need logs for this.

I've added a log file and a demonstration video in the screenshots section

epicEaston197 commented 4 months ago

okay so disabling the OSC receiver when you're not present in the world with flux fixes the issue but this is of course a workaround

EmergencyTemporalShift commented 4 months ago

If OSC connection is left connected in other worlds, it shouldn't be exclusive. If a player has a heart rate monitor and wants it to continue updating then it should work in all worlds not just one.

shadowpanther commented 4 months ago

OSC Receiver is a server though, and listens for incoming connections. Only one process can listen to any port. So you either disable the receiver when you unfocus (your HRM stops showing when unfocused) or use different ports for different sessions (your Sender would need multiple connections to control multiple Receivers).

Even in the same session, spawning another avatar with the same setup would cause the conflict because ports are the same.

Thus, I'd stick to WS for HRM because it works the other way and the source is the singular server.

—-

What could be done on Resonite side though, is Receiver multiplexing. I.e., if two receivers for the same user use the same port, they both get the same data and use one listener underneath. This would allow controlling multiple copies of the item both in one session and in different sessions.

shiftyscales commented 3 months ago

Seeking input from @Frooxius - requested additional information including a log file has been provided to this issue.

epicEaston197 commented 3 months ago

What could be done on Resonite side though, is Receiver multiplexing. I.e., if two receivers for the same user use the same port, they both get the same data and use one listener underneath. This would allow controlling multiple copies of the item both in one session and in different sessions.

Yes is my preferred solution