You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.InvalidCastException
HResult=0x80004002
Message=Specified cast is not valid.
Source=WinRT.Runtime
StackTrace:
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
This doesn't happen on UWP, though I'm not sure if we're actually getting the proper behavior of waiting on WinUI 3.
Saw both on WinAppSDK 1.0.3 and 1.1.1.
Steps to reproduce the bug
Hook into the Composition.Rendering event
You can also include the CommunityToolkit.WinUI.UI 7.1.2 package and use our CompositionTargetHelper static method helper.
Unable to repro this on any version 1.1 to 1.3 using the CompositionTargetHelper class in included in comments. Also the report doesn't indicate whether the error is occurring when attempting to assign the event handler or when the event handler is being executed.
If this continues to be an issue feel free to reopen with more a more actionable repro.
Activity
michael-hawker commentedon Jul 13, 2023
Assume this is still an issue, but would have to look on latest. Bumping, based on #8638
JJBrychell commentedon Aug 29, 2023
Unable to repro this on any version 1.1 to 1.3 using the CompositionTargetHelper class in included in comments. Also the report doesn't indicate whether the error is occurring when attempting to assign the event handler or when the event handler is being executed.
If this continues to be an issue feel free to reopen with more a more actionable repro.