Camera preview frame sample - System.ArgumentException: 'The parameter is incorrect. Invalid subtype'

Open
#1,287 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Start in MainPage.xaml.cs at GetPreviewFrameAsD3DSurfaceAsync and GetPreviewFrameAsSoftwareBitmapAsync, then reproduce the failure by clicking GetPreviewFrameAsync with and without Save frame checked on Windows 10 build 19042.867. Done means the camera preview frame operation completes without the Invalid subtype or parameter exception and the selected frame is handled successfully.

Written by the indexing model from the issue text.

Description

bug

Camera preview frame sample

When running the application sample, and clicking on GetPreviewFrameAsync button it results in.

System.ArgumentException: 'The parameter is incorrect. Invalid subtype'

This exception was originally thrown at this call stack:
[External Code]
CameraGetPreviewFrame.MainPage.GetPreviewFrameAsD3DSurfaceAsync() in MainPage.xaml.cs
[External Code]
CameraGetPreviewFrame.MainPage.GetPreviewFrameButton_Click(object, Windows.UI.Xaml.RoutedEventArgs) in MainPage.xaml.cs

With Save frame option checked the following error is thrown.

This exception was originally thrown at this call stack:
[External Code]
CameraGetPreviewFrame.MainPage.GetPreviewFrameAsSoftwareBitmapAsync() in MainPage.xaml.cs
[External Code]
CameraGetPreviewFrame.MainPage.GetPreviewFrameButton_Click(object, Windows.UI.Xaml.RoutedEventArgs) in MainPage.xaml.cs

Configuration

  • Language/architecture/flavor: WinRT x64 Debug)
  • Windows platform and build number: Windows 10 Pro, Version 20H2, Build 19042.867
Dominant language
JavaScript
Stars
9.7k
Forks
7.8k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/Windows-universal-samples

All issues in microsoft/Windows-universal-samples

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.