microsoft / microsoft/microsoft-ui-xaml
Application crash when using the x:Bind in ComboBox
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
In ComboBox, `SelectedItem` property is binded with x:bind and the combo box is editable. Now, user tried to enter value manually and press enter. Application gets crashed.
Note: If we use Binding the control works fine.
[MSControlTest.zip](https://github.com/user-attachments/files/19703636/MSControlTest.zip)
### Steps to reproduce the bug
1. Run the sample.
2. Edit the combo box and enter the non-listed item.
3. Now, press enter key.
Application crashed with Unhandled exception.
### Expected behavior
It should work fine with all type of binding.
### Screenshots
_No response_
### NuGet package version
WinUI 3 - Windows App SDK 1.7.1: 1.7.250401001
### Windows version
Windows 11 (23H2): Build 22631
### Additional context
_No response_
Contributor guide
Research direction
Start by running the attached MSControlTest.zip sample with Windows App SDK 1.7.1 on Windows 11 23H2, then reproduce the crash by entering a non-listed item in the editable ComboBox and pressing Enter. Compare the x:Bind and Binding cases; done means the x:Bind case no longer crashes and the control continues to work with manually entered values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100