microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
The new MediaPlayerElement crashes the app when using most of its transport controls
Describe the bug
I tested the new MediaPlayerElement that was just added to WinUI 3 (in the Windows App SDK version 1.2 Preview 1).
On my computer, the volume and seek bar are working. However, all the other buttons (Play/Pause, etc) cause the app to crash and exit with the code 0xc0000409.
Output when I catch the exception in VS:
'KlearTouchApp.MediaPlayer.WinUI.NuGet.exe' (Win32): Loaded 'C:\Windows\System32\mfps.dll'.
onecoreuap\windows\frameworkudk\ntadapter\mediaextensionsntadapter.cpp(37)\Microsoft.Internal.FrameworkUdk.dll!00007FFB4F424036: (caller: 00007FFB4F4847EA) FailFast(1) tid(6048) 80004002 No such interface supported
Unhandled exception at 0x00007FFBFC90B2DC (KernelBase.dll) in KlearTouchApp.MediaPlayer.WinUI.NuGet.exe: Fatal program exit requested.
So I suspect that this is caused by my computer running Windows 10 (20H2) which may be missing an API that the transport controls assume exists.
Steps to reproduce the bug
- Download the updated sample in this repo.
- Run it, then pick a file to play. It should start auto playing.
- When you press on the pause button that is part of the native Transport Controls, the app will crash.
Note that the custom play/pause buttons at the top of the app do work fine. I have experimented with other features, and everything works programmatically.
Expected behavior
The native Transport Controls should work as expected.
NuGet package version
WinUI 3 - Windows App SDK 1.2 Preview 1: 1.2.220902.1-preview1
Windows app type
- [ ] UWP
- [X] Win32
Device form factor
Desktop
Windows version
Windows 10 (20H2): Build 19042
Additional context
Using Visual Studio 17.3.0 Preview 1.1.
Update: I quickly installed the .NET SDK 6.0.400. Still crashing.
It looks like your theory is correct that this issue is specific to Win10.
With the release of v1.2, this issue is resolved.