question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Since version 1.1.5 all animations are stuck

See original GitHub issue

Really can’t understand why (hope I didn’t miss any new flag), but was able to repro it in a small project. Since version 1.1.5, all animations are very laggy/stuck, it’s solved after some time.

Here’s the repro solution - FluentAvaloniaAnimationBug1.1.5.zip

Or code here - App.xaml

<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:styling="clr-namespace:FluentAvalonia.Styling;assembly=FluentAvalonia"
             x:Class="Avalonia.NETCoreApp2.App">
    <Application.Styles>
        <styling:FluentAvaloniaTheme
            RequestedTheme="Light" />
    </Application.Styles>
</Application>

MainWindow.xaml

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="Avalonia.NETCoreApp2.MainWindow"
        Title="Avalonia.NETCoreApp2">
    <ProgressBar IsIndeterminate="True" Width="100" Foreground="Red"/>
</Window>

Csproj <PackageReference Include="FluentAvaloniaUI" Version="1.1.6" />

It is using ProgressBar, run it, the ProgressBar will not move at all. Change the FluentAvaloniaUI package to 1.1.3 or below to see the animation being fixed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amwxcommented, Nov 25, 2021

Yes, that’s really weird, what makes it even more bizarre is that it happens for all animations, not only progress bar.

I can only partially reproduce all animations breaking. ProgressBar obviously fails, and the scaling animations to the ContentDialog also fail (but the opacity transition still works). I’ve added a simple Button scaling animation to your repro project to test

<Button Content="Content" VerticalAlignment="Center">			
<Button.Styles>				
  <Style Selector="Button">
          <Button.RenderTransform>
              <ScaleTransform ScaleX="1" ScaleY="1" />
          </Button.RenderTransform>
	  <Style.Animations>
              <Animation Duration="00:00:01" RepeatCount="1000000" PlaybackDirection="Alternate">
	              <KeyFrame Cue="0%">
		              <Setter Property="ScaleTransform.ScaleX" Value="1" />
		              <Setter Property="ScaleTransform.ScaleY" Value="1" />
	              </KeyFrame>
	              <KeyFrame Cue="100%">
		              <Setter Property="ScaleTransform.ScaleX" Value="3" />
		              <Setter Property="ScaleTransform.ScaleY" Value="3" />
	              </KeyFrame>
              </Animation>
	  </Style.Animations>					
  </Style>
</Button.Styles>

And this works. What’s weird is that adding this Button (with the ProgressBar still there) seems to jump start the animation system and the ProgressBar (or ContentDialog scale) works again.

An interesting finding though, if I remove the initial value for the ScaleTransform (or use the TransformOperationsTransition syntax RenderTransform="scale(1)"):

<Button.RenderTransform>
       <ScaleTransform ScaleX="1" ScaleY="1" />
</Button.RenderTransform>

all animations freeze. Which doesn’t repro (all animations still work) in 1.1.3, which was Avalonia 0.10.7. I looked at the release notes for 0.10.8-0.10.10 and I don’t see any big animation system fixes, but I’m wondering if something was tweaked and if there’s an “incorrect” animation in one of the controls causing the RenderTransform animator to fail initializing for some reason and then adding a valid animation restarts it all properly. I’ll look more into this over the weekend

0reactions
adirh3commented, Dec 1, 2021

Yes, though I still have no clue why this is happening. I do know the little hack I mentioned above does make it work, but doesn’t fix the issue. It gets even more complicated because I started with the PB style I had in 1.1.3 and started incrementally making the changes I did and it seems that me removing this bit is the culprit:

<Style Selector="ProgressBar:vertical /template/ LayoutTransformControl#PART_LayoutTransformControl">
	<Setter Property="LayoutTransform">
		<Setter.Value>
			<RotateTransform Angle="90" />
		</Setter.Value>
	</Setter>
</Style>

Except it makes no sense, because 1) it’s for the vertical PB only, and 2) The LayoutTransformControl doesn’t even exist in this template, it’s left over from the old Default theme (this style selector is present in the Avalonia fluent theme, but again the LTC isn’t used).

So I’ve added that back to the template as a hack fix and pushed it to master if you want to give it a try. Otherwise, I don’t think there’s much more I can do at this point.

Thank you! Checked master and it works (FYI my app main window has an invisible PB, couldn’t use 1.1.5 otherwise) Will try reproducing it in a standalone project and open an issue in Avalonia repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ADXP MCO animations not working : r/skyrimmods
Player animations work, but NPC power attacks don't --> SCAR related issue, you need latest versions from both MCO and SCAR. T/A-posing when ......
Read more >
How to Fix stuck animations/ Scenes that won't progress
Reinstall the updated version of ZAZ and let it overwrite everything, that should fix the issues with CD as I only relied on...
Read more >
Animation getting stuck - Scripting Support
As you see, when I try to go from blocking back to idle, the animation gets stuck and my character is stuck in...
Read more >
EVG Animated Traversal - Skyrim Special Edition
A framework to add new animation prompts for the player to climb ledges, squeeze in tight spaces, jump over walls and more.
Read more >
CustomEmotesAPI | Thunderstore - The Risk of Rain 2 Mod ...
It only worked on a couple of mods anyway. Version 1.1.5: Fixed issue with resolution scaling causing you to be stuck in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found