-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UWP or Xaml Island app crashes on pressing the clear button in the hex Input textbox in ColorPicker #3222
Comments
On a related note, I wanted to clarify should all the xaml controls be accessible without the |
I would like to look into this issue. |
@arjunbalgovind To my understanding, this is expected because the documentation states that you should add
to your XAML files where you want to use WinUI controls (and thus preface them with "muxc:"). Not prefacing controls with "muxc:" (or however else you named that XAML namespace) will mean that the OS XAML will be checked for the type. However, there is no (With WinUI 3, the "muxc:" preface won't be needed any longer.) |
Looks like the crash is at this point. I think we need a null check.
Windows.UI.Xaml.dll!DirectUI::ControlGenerated::OnPointerReleasedProtected(Windows::UI::Xaml::Input::IPointerRoutedEventArgs * pE) Line 1518 C++ |
@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. |
@ranjeshj when can we expect a pre-release with this fix? |
@arjunbalgovind assuming the fix goes in before the next pre-release, it should be available in the next pre-release (couple of weeks time). |
Describe 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:
Expected behavior
String gets cleared.
Screenshots
GIF that shows the crash on Xaml Controls Gallery.
![winUICrash](https://user-images.githubusercontent.com/32061677/91775850-fd964580-eba0-11ea-95ed-10643d9d6bc9.gif)
Version Info
NuGet package version:
Microsoft.UI.Xaml 2.5.0-prerelease.200812001
Windows app type:
Additional context
Link to issue on PowerToys repository: microsoft/PowerToys#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 removedmuxc:
and used<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
in the App.xamlResourceDictionary
, I could no longer reproduce the crash.When the crash occurs, the application exits with error code
0xc000041d
.The text was updated successfully, but these errors were encountered: