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

Animation freezes after navigating using 1.3.7+ #68

Closed
johnyyhign opened this issue Apr 9, 2019 · 9 comments
Closed

Animation freezes after navigating using 1.3.7+ #68

johnyyhign opened this issue Apr 9, 2019 · 9 comments

Comments

@johnyyhign
Copy link

johnyyhign commented Apr 9, 2019

Hello! I have some looped animations on some screens in my app, they work when we enter the screen, but if we push another route and then pop the animation is frozen.
So it looks like this:

  1. SCREEN_WITH_LOOPED_ANIMATION - works
  2. push another route (with or without an animation, if there is an animation it works fine)
  3. pop to SCREEN_WITH_LOOPED_ANIMATION - animation doesn't play

I'm using Flutter master channel, so ~1.4.12 and the latest flare pub 1.3.8, works fine with 1.3.7
Any idea? Also tested with flutter beta and stable channel

@johnyyhign johnyyhign changed the title Animation freezes after navigating Animation freezes after navigating using 1.3.8 Apr 9, 2019
@johnyyhign
Copy link
Author

I've tested previous versions 1.3.6 and 1.3.7 and when came back to 1.3.8 it works, seems like some cache was causing the trouble, so I'll reopen if it happens again

@luigi-rosso
Copy link
Contributor

Let me know if you run into this again. Definitely sounds suspicious. We did change the render model to use an abstracted render box in the latest version (1.3.8). I'm wondering if you're running into a race condition...

@johnyyhign
Copy link
Author

johnyyhign commented Apr 10, 2019

It happended again after a while, quickly coming back to previous versions didn't fix it, but i haven't cleared anything so just changed the pubspec and tried again.

I'll try to find conditions when exactly this is happening, maybe tomorrow I'll have some time and post here more details. Definitely happens on master flutter with 1.3.8

@johnyyhign johnyyhign reopened this Apr 10, 2019
@johnyyhign
Copy link
Author

johnyyhign commented Apr 10, 2019

Okay, I've tested this once again. And it works fine with 1.3.6 and for higher versions it behaves as explained in the first post. Could you comment on this @luigi-rosso ? Do you need any logs that can help?

Btw the feature of freezing animation when screen is in the background is great for performance and saving resources, but it should restart when popped back to the screen.

@johnyyhign johnyyhign changed the title Animation freezes after navigating using 1.3.8 Animation freezes after navigating using 1.3.7+ Apr 10, 2019
@luigi-rosso
Copy link
Contributor

I'm going to try to take a look at this today. If you have a source example that shows it clearly, that'd help, otherwise I can try to repro it myself.

@johnyyhign
Copy link
Author

Thanks @luigi-rosso I'm not close to my PC now, but just place any looped animation, push and pop another screen and it's frozen, so should be easy to repro within 5mins. Thank you!

@luigi-rosso
Copy link
Contributor

Just a quick note on this, I have been looking into it and I can repro the issue. There are a couple conditions that are causing this which are related to performance improvements we made (like not rendering when off screen). I have a fix but now it has exposed another issue where some widgets will re-attach when they are offscreen, so I'm working through that now. I'll keep you updated here as I make progress.

@luigi-rosso
Copy link
Contributor

I think I have this solved now. Please give 1.3.10 a try!

@johnyyhign
Copy link
Author

Seems to be fixed! Thank you so much for fantastic library and quick action!

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

2 participants