UWP LibVLCSharp.Shared.VLCException: Could not create Direct3D11 device : No compatible adapter found
Unable to initialize the lvs:VideoView control included in the LibVLCSharp.Platforms.UWP lib on non-directx compatible computers.
On the same machine the VLC UWP application works correctly.
The lvs:VideoView control raise an exception during the InitializeComponent() sub.
" Exception thrown: 'SharpDX.SharpDXException' in SharpDX.dll Exception thrown: 'SharpDX.SharpDXException' in SharpDX.dll Exception thrown: 'SharpDX.SharpDXException' in SharpDX.dll Exception thrown: 'LibVLCSharp.Shared.VLCException' in LibVLCSharp.dll Exception thrown: 'LibVLCSharp.Shared.VLCException' in LibVLCSharp.dll Exception thrown at 0x00007FFBA2B9D759 (KernelBase.dll) in LibVLCSharp.UWP.Sample.exe: WinRT originate error - 0x80131500 : 'LibVLCSharp.Shared.VLCException: Could not create Direct3D11 device : No compatible adapter found. at LibVLCSharp.Platforms.UWP.VideoViewBase.CreateSwapChain()'. onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!00007FFBA343C8D3: (caller: 00007FFBA34465A9) ReturnHr(1) tid(5c8) 8007007E The specified module could not be found."
How one can reproduce the issue
It's very easy to reproduce, you just need a virtual machine that doesn't have an advanced graphics card (without gpu/remotefx module). In my case, it is a virtual machine on Azure IaaS service. It's a virtual machine in Azure that I use to dev.
Reproducible with the UWP sample project LibVLCSharp.UWP.Sample
The bug happens when you are connected via RDP or directly connected to the admin console via vnc. It is not dependent on the way of connecting but on the graphic card equipped The bug occure in debug and release compile mode, with and without debugger attached
Because the VLC APPs can run on these environnement, maybe we can have expect a solution for the libvlcsharp or a way to fault back if no compatible card was found.
- OS: Windows 10
- Version 10.0.19041.867
- Device: Azure VM IaaS with basic graphic card
- LibVLCSharp version 3.4.9 / VideoLan.LibVLC.UWP v3.3.1
- Visual Studio 2019