microsoft / microsoft/microsoft-ui-xaml
MenuFlyout: `FlyoutBase.ShowAt` throws COMException
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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