microsoft / MixedReality-HolographicRemoting-Samples

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

2 sample remote instances on same PC #71

Closed almoga296 closed 1 year ago

almoga296 commented 1 year ago

Describe the bug I got 2 hololens2 headsets and 1 PC and run into an issue with try running 2 holographic remote (Sample remote for desktop) on same PC.

The link between the first pair of hololens2 <=> PC (remote) works well. The 2nd one start to rendering frames and after about 1 second it throw the following exception:

[External Code] 
Microsoft.Holographic.AppRemoting.dll!00007ff91cb866b4()    Unknown
Microsoft.Holographic.AppRemoting.dll!00007ff91c68b0cf()    Unknown
Microsoft.Holographic.AppRemoting.dll!00007ff91c779f5c()    Unknown
Microsoft.Holographic.AppRemoting.dll!00007ff91c780b5a()    Unknown
SampleRemote.exe!winrt::impl::consume_Windows_Graphics_Holographic_IHolographicCameraPose<winrt::Windows::Graphics::Holographic::IHolographicCameraPose>::HolographicCamera() Line 127  C++
SampleRemote.exe!SampleRemoteApp::Render::__l2::<lambda>(std::map<unsigned int,std::unique_ptr<DXHelper::CameraResourcesD3D11Holographic,std::default_delete<DXHelper::CameraResourcesD3D11Holographic>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::unique_ptr<DXHelper::CameraResourcesD3D11Holographic,std::default_delete<DXHelper::CameraResourcesD3D11Holographic>>>>> & cameraResourceMap) Line 534    C++
SampleRemote.exe!DXHelper::DeviceResourcesD3D11Holographic::UseHolographicCameraResources<void <lambda>(std::map<unsigned int,std::unique_ptr<DXHelper::CameraResourcesD3D11Holographic,std::default_delete<DXHelper::CameraResourcesD3D11Holographic>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::unique_ptr<DXHelper::CameraResourcesD3D11Holographic,std::default_delete<DXHelper::CameraResourcesD3D11Holographic>>>>> &)>(const SampleRemoteApp::Render::__l2::void <lambda>(std::map<unsigned int,std::unique_ptr<DXHelper::CameraResourcesD3D11Holographic,std::default_delete<DXHelper::CameraResourcesD3D11Holographic>>,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::unique_ptr<DXHelper::CameraResourcesD3D11Holographic,std::default_delete<DXHelper::CameraResourcesD3D11Holographic>>>>> &) & callback) Line 100  C++
SampleRemote.exe!SampleRemoteApp::Render(winrt::Windows::Graphics::Holographic::HolographicFrame holographicFrame) Line 521 C++
SampleRemote.exe!SampleRemoteApp::Tick() Line 99    C++
SampleRemote.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nShowCmd) Line 239 C++
[External Code] 

To Reproduce Steps to reproduce the behavior:

  1. Run 1st Hololens2 with store player (v2.8.1.0)
  2. Run 1st desktop executable instance and connect the hololens2 IP.
  3. Run 2nd Hololens2 with store player (v2.8.1.0)
  4. Run 2nd desktop executable instance and connect the hololens2 IP.

Screenshots / videos image

Remote side (your Windows PC):

Player side (e.g. your HoloLens 2)

Hanaae-MSFT commented 1 year ago

Hey, The reason for what you are experiencing here is, as mentioned by my colleague in this previous issue because NVIDIA consumer cards only allow three parallel video encoding sessions. Also, C++/WinRT exceptions are expected and you can disable them in visual studio.

almoga296 commented 1 year ago

Hey Hanaae, That exactly the reason I tested it with non-consumer grade graphics card, as I mentioned I used for that NVIDIA RTX 3000.

Thanks for the fast response! Almog

FlorianBagarMicrosoft commented 1 year ago

NVIDIA RTX 3000 series is consumer grade hardware. All models from RTX 3050 up to RTX 3090 Ti are consumer grade GPUs. Non-consumer grade GPUs are Nvidia Quadro RTX GPUs for instance. Also, the GPU alone does not solve the issue, you also need Nvidia's GRID driver.

almoga296 commented 1 year ago

Hey Hanaee & Florian, You are both right, I meant to NVIDIA Quadro RTX 3000. I will check the driver, as you mentioned @FlorianBagarMicrosoft

Thanks, Almog

ccrop commented 1 year ago

I am also troubled by this problem. I hope there is a solution.

ccrop commented 1 year ago

@FlorianBagarMicrosoft Is there such a limit for amd consumer video cards,E.g RX6600XT?

FlorianBagarMicrosoft commented 1 year ago

@ccrop, there is not. We successfully tested with up to 20 encoder session.

ccrop commented 1 year ago

@FlorianBagarMicrosoft Great, thank you very much!