Skip to content
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

ColorPicker sample in gallery crashing under Windows App SDK #509

Open
1 of 24 tasks
Arlodotexe opened this issue Sep 18, 2024 · 3 comments
Open
1 of 24 tasks

ColorPicker sample in gallery crashing under Windows App SDK #509

Arlodotexe opened this issue Sep 18, 2024 · 3 comments
Labels
bug Something isn't working regression What was working is now broke sample app 🖼️

Comments

@Arlodotexe
Copy link
Member

Arlodotexe commented Sep 18, 2024

Describe the bug

When running the gallery with the Wasdk head on the latest main commit, the ColorPicker sample will crash the app:

image

   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32 hr)
   at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
   at Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
   at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size availableSize)
   at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)

This crash does not occur under UWP.

Steps to reproduce

1. Clone the repo
2. Generate the gallery solution, include the ColorPicker component and the wasdk multitarget/head.
3. Build and deploy the wasdk gallery 
4. Navigate to the ColorPicker sample page and observe crash.

Expected behavior

No crash.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

@Arlodotexe
Copy link
Member Author

Has the same error message as #517

@Arlodotexe
Copy link
Member Author

Arlodotexe commented Sep 18, 2024

Additional info uncovered thanks to a tip from @Sergio0694

image

(Possibly related to #516? Though, not the same error message.)

@michael-hawker Anything you could add? SwitchPresenter may be having more than one AoT issue here.

@michael-hawker
Copy link
Member

@Arlodotexe Switch Presenter uses all the general types and such from XAML like DependencyObjectCollection and DependencyObject - It also just does a lot of general comparison/reflection-y type stuff when trying to compare values here: https://github.com/CommunityToolkit/Windows/blob/main/components/Primitives/src/SwitchPresenter/SwitchPresenter.cs#L116

So, there's probably something there to figure out how to better guard against?

I also saw a new issue on the WinUI repo about controls and resource dictionaries + trimming, so something we may want to keep an eye on incase there's other underlying issues still we need to be concerned about or bubble up with the platform team. RE: microsoft/microsoft-ui-xaml#10020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression What was working is now broke sample app 🖼️
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants