Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Random missing shapes #23

Open
KubaStachecki opened this issue Mar 12, 2019 · 2 comments
Open

Random missing shapes #23

KubaStachecki opened this issue Mar 12, 2019 · 2 comments

Comments

@KubaStachecki
Copy link

I have a problem with disappearing elements - usually on the first loop on animation, and slower / older devices (but emulator also have this problem, and its just random - all devices, not just while on higher cpu use, not every time the same shape etc.) This is not dropped frames problem because some shapes stay and some disappear. Lottie files work on web, android and IOS preview seamlessly.

Example: https://lottiefiles.com/share/g7EvcC

Here is video presenting issue:
https://drive.google.com/open?id=1pCLnmaAGezDF2F_NBoFZFQUBZGRWtL_A

Here is my flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale pl-PL)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] Connected device (1 available)

• No issues found!

@dnfield
Copy link
Owner

dnfield commented Mar 12, 2019

My best guess is that parsing is just too slow. I'd like to experiment with another approach to Lottie before making any changes here, but I don't have a timeframe right now. I'd be happy to review PRs that address this though.

@KubaStachecki
Copy link
Author

KubaStachecki commented Mar 12, 2019

Thanks for quick reply. I'm trying to figure it out (while shooting in the blind really since it's super random), but maybe, just maybe it got better after few tries. I have to test it longer to be sure. What I did (that may or may not have a connection to the case):

  • I made all animations 60fps in after effects (instead of previous 25fps)
  • I changed the duration of animations to a lower number (instead of the original amount of milliseconds- now they are slightly faster)
  • I changed the order of InitState so that controller and listener are set before asset loading. previously it was the other way around based on the example app:
@override
  void initState() {
    super.initState();

    _controller = new AnimationController(
      duration: Duration(milliseconds: duration),
      vsync: this,
    );
    _controller.addListener(() => setState(() {}));

    loadAsset(assetpath).then((LottieComposition composition) {
      setState(() {
        _composition = composition;
        _controller.repeat();
      });
    });
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants