microsoft / microsoft/microsoft-ui-xaml

MenuFlyout: `FlyoutBase.ShowAt` throws COMException

Open
#10,724 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Flyouts bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

Describe the bug

For some users of my application, FlyoutBase.ShowAt throws an exception.
From what I can tell, this is not a permanent error, meaning it works the next time they try (I only see one crash report per user).

Steps to reproduce the bug
var menuFlyout = new MenuFlyout();
// ...add some menu items to the menu flyou
menuFlyout.ShowAt(button, new FlyoutShowOptions() { Placement = FlyoutPlacementMode.Bottom });
Actual behavior
System.Runtime.InteropServices.COMException (0x80004005)
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32) + 0x42
   at ABI.Microsoft.UI.Xaml.Controls.Primitives.IFlyoutBaseMethods.ShowAt(IObjectReference, DependencyObject, FlyoutShowOptions) + 0xfe
   at MyApp.MyMethod() + 0x38a
Expected behavior

No Crash

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.7.3: 1.7.250606001

Windows version

No response

Additional context

Multiple Windows versions are affected:
10.0.19045
10.0.22631
10.0.26100

Contributor guide

Open the contributing guide

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.

Research direction

Start with the MenuFlyout.ShowAt call and the FlyoutBase.ShowAt entry in the reported stack trace, then investigate the intermittent COMException on Windows 10.0.19045, 10.0.22631, and 10.0.26100. Done means identifying a reproducible cause or validated fix for the reported scenario, with coverage for the failing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.