UWP or Xaml Island app crashes on pressing the clear button in the hex Input textbox in ColorPicker
See original GitHub issueDescribe the bug
If a ColorPicker element is declared with the muxc
namespace as in the following snippet, then the entire app crashes without any exception trace on clicking the clear button on the hex input box. This can also be reproduced on the Xaml Controls Gallery repository.
Steps to reproduce the bug
Steps to reproduce the behavior:
- Run Xaml Controls Gallery and open the Color Picker page (https://github.com/microsoft/Xaml-Controls-Gallery/blob/master/XamlControlsGallery/ControlPages/ColorPickerPage.xaml, reproduced on commit https://github.com/microsoft/Xaml-Controls-Gallery/commit/9e87c2feace4da6a2eef66aa07181a0c0cf1ce0b)
- Click on the X button on the hex input textbox
Expected behavior
String gets cleared.
Screenshots
GIF that shows the crash on Xaml Controls Gallery.
Version Info
NuGet package version:
Microsoft.UI.Xaml 2.5.0-prerelease.200812001
Windows app type:
UWP | Win32 |
---|---|
Windows 10 version | Saw the problem? |
---|---|
Insider Build (xxxxx) | |
May 2020 Update (19041) | Yes |
November 2019 Update (18363) | Yes |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Additional context
Link to issue on PowerToys repository: https://github.com/microsoft/PowerToys/issues/6022. We are using WinUI in a Xaml Island, and hence require the pre-release version with the latest changes.
After a lot of trial and error, I found that this seems to happen only if the ColorPicker is referenced with the muxc
prefix. If I removed muxc:
and used <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
in the App.xaml ResourceDictionary
, I could no longer reproduce the crash.
When the crash occurs, the application exits with error code 0xc000041d
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
@ranjeshj Yes, already added one. Will also look into creating test coverage for this. If it’s fine with you I’d create a PR tomorrow.
@arjunbalgovind assuming the fix goes in before the next pre-release, it should be available in the next pre-release (couple of weeks time).