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

Cache issue introduced in 6.3.0 #2464

Closed
akordev opened this issue Feb 8, 2024 · 0 comments · Fixed by #2469
Closed

Cache issue introduced in 6.3.0 #2464

akordev opened this issue Feb 8, 2024 · 0 comments · Fixed by #2469

Comments

@akordev
Copy link

akordev commented Feb 8, 2024

fork with issue in the issue-repro module - https://github.com/akordev/lottie-android/tree/cache-issue-example

Describe the bug
https://github.com/airbnb/lottie-android/pull/2441/files#diff-7ff6236196a28fb237dbe744e4359c6dd062204dfc1f54ea2a8cf0570389c8a1 - changes that cause an issue, line 707 in LottieCompositionFactory, if you revert it to
task = new LottieTask<>(() -> new LottieResult<>(cachedComposition)); bug is not reproducible anymore

When I set animation_a in xml file and then try to call setAnimation(animation_b) in onViewCreated, it does not work if we already cached this animations. It works as long as Lottie doesn't have cached this animations, which means it works if we disable cache in xml view or when you show it first time with the enabled cache

Steps to reproduce:

  1. Run issue-repro module
  2. Navigate to second fragment
  3. Navigate back (system back button)
  4. Navigate to second fragment again
  5. Animation is freeze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant