microsoft / MixedReality-HolographicRemoting-Samples

Code samples for using Microsoft's Holographic Remoting library.
Other
141 stars 47 forks source link

Debugging Holographic Remoting/OpenXR applications without losing connection to player #74

Closed dnikolaidis2 closed 1 year ago

dnikolaidis2 commented 1 year ago

Hello!

I am working on an OpenXR/Holographic Remoting backend for an application. While debugging my application all threads are frozen and the player (server) loses connection with the remote as communication has stopped. Are there any suggested strategies to mitigate this? The only "easy" way I can think off is to recreate the entire OpenXR backend, reconnect and refresh all handles.

I see that Unity has no issue with this problem but my guess is that Holographic Remoting/OpenXR code is separated from game code like MRTK for example and attaching the debugger only attaches to the game code and thus does not freeze the communication thread.

Thank you

Hanaae-MSFT commented 1 year ago

Hey, A Holographic Remoting app is a network app, so if the threads are frozen for some reason, (i.e: debugging), the connection session will time out and the connection will be lost. This is the default behavior. If you would like to reconnect again after finishing some debugging while the app is running, then what you suggested (recreating the OpenXR session and refreshing all handles) is the way to go. As an alternative, you could also consider a logging system for debugging, so as not lose the connection.

dnikolaidis2 commented 1 year ago

@Hanaae-MSFT Thank you very much for the reply! The unfortunate realities of network programming I guess. Thank you for the information though.