-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Implicit Animation causes dead lock. #4038
Comments
Hello HppZ, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
@HppZ If you can provide more detail on the repro step by step that would be great. Thanks! |
you can't reproduce the bug using the repo? |
@HppZ Thanks for showcasing it via gif and I am able to repro. Do you want to work on this fix and create a PR? |
FYI @Sergio0694 |
how is this going? |
It's only been 4 days, and there was also the weekend among those 4 days. I'll take a look at this later today 🙂 |
Thanks~ |
Alright I have a small update, I don't think the bug is caused by the Toolkit per se. public static void SetupImplicitShowAnimations(UIElement target)
{
Compositor compositor = ElementCompositionPreview.GetElementVisual(target).Compositor;
CompositionAnimationGroup animations = compositor.CreateAnimationGroup();
ScalarKeyFrameAnimation scalarAnimation = compositor.CreateScalarKeyFrameAnimation();
scalarAnimation.InsertKeyFrame(0.0f, 0f);
scalarAnimation.InsertKeyFrame(1.0f, 1f);
scalarAnimation.Duration = TimeSpan.FromSeconds(1);
scalarAnimation.Target = nameof(Visual.Opacity);
animations.Add(scalarAnimation);
ElementCompositionPreview.SetImplicitShowAnimation(target, animations);
}
public static void SetupImplicitHideAnimations(UIElement target)
{
Compositor compositor = ElementCompositionPreview.GetElementVisual(target).Compositor;
CompositionAnimationGroup animations = compositor.CreateAnimationGroup();
ScalarKeyFrameAnimation scalarAnimation = compositor.CreateScalarKeyFrameAnimation();
scalarAnimation.InsertKeyFrame(1.0f, 0f);
scalarAnimation.Duration = TimeSpan.FromSeconds(1);
scalarAnimation.Target = nameof(Visual.Opacity);
animations.Add(scalarAnimation);
ElementCompositionPreview.SetImplicitHideAnimation(target, animations);
} And I got the same result. I also tried to invoke these two methods both when applying the template for the custom control, both just right from the constructor (so not on the root Marking this issue as external, as it seems to be related to some UWP XAML quirk and not the Toolkit itself. To add another couple notes:
cc. @michael-hawker I reckon either Mike or Miguel will be able to share some info on this, in case we wanted to ping them 🙂 |
Thanks @Sergio0694 - think we should open a new WinUI issue with your example code or do you think it's related to the other issue you linked to? |
@michael-hawker I think opening an issue in the WinUI repo will be useful to better track this. If anything, it can't hurt 😄 |
Closing this as it was confirmed to be caused by a UWP XAML bug and not related to the Toolkit 🙂 |
Describe the bug
Implicit Animation causes dead lock.
Steps to Reproduce
https://github.com/HppZ/ImplicitAnimationBug
Steps to reproduce the behavior:
click Button, click 'show toast', repeat until the bug out
Expected behavior
no dead lock.
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: