Huge bug, mouse right click on any numberbox or textbox crashes new WinUI3 project instantly
See original GitHub issueDescribe the bug
Greetings, i think i’ve found a very huge bug in WinUI3.
Just create any new packaged project be it WAP or not.
As soon as you add a textbox and mouse right click on it semms at first that the textbox is trying to create a context menu but it only displays a very tiny portion of it and dissapears instantly, however, as soon as you write anything on the textbox and try the context menu again the application imediately crashes with the following error:
Exception thrown at 0x767EB502 in App2.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x027EDD08.
Is this bug already known? if so, what is the workaround?
XAML page code with no special code behind in C# `<Window x:Class="App3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:App3" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Nationality" Width="90" Margin="5 5 5 5" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Right"/>
<TextBox Width="200" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0"/>
</StackPanel>
</Window>`
My Environment: VS2022 Community (non preview release) WinUI3 1.0 Preview 3 (latest at the date of this post) WinUI 3 Blank App Packaged (WAP and non WAP) Windows 10 21h1 x64
Steps to reproduce the bug
- Create new WinUI3 Blank app Project
- Add a textbox
- Right mouse click on it
- A very tiny context menu appears but dissapears
- Write a text on the textbox
- Right mouse click on it again
- Application crashes.
Expected behavior
Should simply open the textbox default context menu normaly.
Screenshots
No response
NuGet package version
No response
Windows app type
- UWP
- Win32
Device form factor
Desktop
Windows version
May 2021 Update (19043)
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:8
Top GitHub Comments
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Can reproduce this. Windows 11, VS2022, Blank packaged WinUI3 1.0.0 app with the above specified XAML.
Seems to work when running the application from outside Visual Studio (e.g. Start Menu)