LibVLCSharp on UWP crashes with null pointer when Visibility of VideoView is set to Collapsed
Summary
When a VideoView is added to a XAML page with Visibility=Collapsed
the runtime crashes with a null pointer reference.
Minimal project and steps to reproduce
- Clone https://github.com/mtirion/VLCinUWPTest
- Add
Visibility=Collapsed
to the VideoView in the MainPage.xaml - Switch to x64 or x86, compile and run the app.
What is the current bug behavior?
On launch of the app:
System.NullReferenceException: Object reference not set to an instance of an object.\r\n
at LibVLCSharp.Platforms.UWP.VideoViewBase.CreateSwapChain()"
What is the expected correct behavior?
No crash
Environment
- Windows 10 (1903 / 18362.476)
- Windows SDK (UWP) 17134
- LibVLCSharp 3.3.1 x64
- VideoLAN.LibVLC.UWP 3.1.1.1 x64