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

Native AOT: InvalidCastException in CommunityToolkit when using GridSplitter #1917

Open
tipa opened this issue Feb 7, 2025 · 0 comments
Open

Comments

@tipa
Copy link

tipa commented Feb 7, 2025

Description

This bug/crash has been reported previously here: CommunityToolkit/Windows#612

System.InvalidCastException: Specified cast is not valid
   at System.Runtime.RuntimeExports.RhUnbox2(MethodTable*, Object) + 0x3f
   at CommunityToolkit.WinUI.Controls.GridSplitter.IsStarColumn(ColumnDefinition) + 0x53
   at CommunityToolkit.WinUI.Controls.GridSplitter.OnDragHorizontal(Double) + 0xf9
   at CommunityToolkit.WinUI.Controls.SizerBase.OnManipulationDelta(ManipulationDeltaRoutedEventArgs) + 0x11b
   at ABI.Microsoft.UI.Xaml.Controls.IControlOverrides.Do_Abi_OnManipulationDelta_15(IntPtr, IntPtr) + 0x58

Steps To Reproduce

See example project: Crash.zip
To reproduce the crash, grab the GridSplitter handle and try to move it -> app crashes

Important: Run in Native Aot (not CoreCLR) - so I had to publish the app, then install and run it

Expected Behavior

No crash

Version Info

CsWinRT 2.2

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant