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 Frame appears unexpectedly and freezes app #2493

Open
Mattheisen opened this issue Oct 22, 2024 · 5 comments
Open

Animation Frame appears unexpectedly and freezes app #2493

Mattheisen opened this issue Oct 22, 2024 · 5 comments

Comments

@Mattheisen
Copy link

Which Version of Lottie are you using?

Lottie 4.4.0

Expected Behavior

App UI screen shall appear after animation has finished

Actual Behavior

A frame (last frame?) of the previous animation appears and blocks any further progress.

Animation JSON

The animation itself is not the issue. Various animations in my app are executed correctly. Also the one from which (the last?) frame appears unexpectedly.

Description of the issue in detail:

A certain process in our app consists of the following steps:

  1. User decision via UI
  2. Animation start while a process loads data from the backend.
  3. Load from backend completes successfully
  4. Started Animation is ended
  5. UI screen appears for the user to enter a PIN code for unlocking the screen
  6. User enters correct PIN
  7. App's main menu appears with the recent data from the backend.

All this 1 - 8 worked fine with 3.5.0. Starting with 4.4.0 the UI unexpectedly shows the image of the animation after step 6. Step 7 is never reached. The app is not reacting to any touch or whatever.

My investigation

I tried to find the exact change of your SDK from which this error is appearing. I applied your versions one by one until the error appears. While 4.3.4 is still working, the error appears with 4.4.0 (and later versions). Reading your 4.4.0 change notes, I suspected the issue to be caused by your change number #2254

My temporary fix

I debugged your code and assumed an error in your function VisibilityAnimation. I changed the code line 17 from
if context.mustUseComplexTimeRemapping {
to
if context.mustUseComplexTimeRemapping != true {
...and then the error was gone.
I cannot tell you why this made the difference. This is for you to find out ;-) but hopefully this can help you to find the root-cause of the problem.

Kindly let me now the outcome of your investigation.

@calda
Copy link
Member

calda commented Oct 22, 2024

For us to take a look you'd need to share a copy of the animation json and also maybe sample code that demonstrates the issue.

@Mattheisen
Copy link
Author

Mattheisen commented Oct 22, 2024 via email

@calda
Copy link
Member

calda commented Oct 22, 2024

The attachment didn't come through from the email to the github issue UI.

@Mattheisen
Copy link
Author

JSON file:
generalPurpose.json

@Mattheisen
Copy link
Author

Mattheisen commented Oct 22, 2024 via email

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