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

App Crashes when choosing a file for Preview #710

Closed
Godwyyn opened this issue Mar 28, 2018 · 4 comments
Closed

App Crashes when choosing a file for Preview #710

Godwyyn opened this issue Mar 28, 2018 · 4 comments

Comments

@Godwyyn
Copy link

Godwyyn commented Mar 28, 2018

Expected behavior

After launching the app and navigating to the Preview Activity,when I clicked on the "Open a file" option to select a file for preview and select on an image file or a text file I was expecting the app to either load the file for preview or prompt a message that I have selected the wrong file format. Also when I click on the "Scan a QR code " option was expecting a preview or a dialog if the QR code is not valid.

Actual behavior

When I click on the "Open a file" option and chose an image file or a text file, the app crashes. Also when I pick up any QR code and scan the app crashes.

How to reproduce

  • Download the Lottie app from Playstore
  • Launch the app
  • From the bottom navigation menu click on "Preview"
  • Click on "Open a file" or " Scan a QR code "
  • Select a file or scan a QR code respectively
  • App crashes on result
  • Version: Lottie Version 2.5.2
  • Operating system: Infinix Hot, Android Kitkat

Recording Of The Bug

https://www.youtube.com/watch?v=mJ5o251TiwQ



Posted on Utopian.io - Rewarding Open Source Contributors

@gpeal
Copy link
Collaborator

gpeal commented Apr 2, 2018

@Godwyyn Why are you trying to do that?

@gpeal
Copy link
Collaborator

gpeal commented Apr 2, 2018

It's on my todo to add error handling to the Lottie parsing APIs but just stick to loading lottie files for now 😛

gpeal added a commit that referenced this issue Jul 16, 2018
Replaced existing `LottieComposition.Factory` methods with a new `LottieCompositionFactory`
The main purpose of this is to provide a clean way to handle exceptions. Today, parsing exceptions are thrown on a background thread and impossible to handle. This replaces that with a new `LottieResult` which mimics a typical `Result` class in functional programming. It either has a result or an exception.

The composition methods now return a `LottieTask<LottieResult<LottieComposition>>>`.
You can add/remove listeners on the LottieTask. The listener will be called with the result that contains either the exception or error.

This also deprecates all `LottieComposition.Factory` methods because they all have an analogous `LottieCompositionFactory` API.

This PR also extracts LottieAnimationView's cache into a separate class and added tests which found an off by one error.

#710
@gpeal
Copy link
Collaborator

gpeal commented Jul 16, 2018

Fixed by #830

@gpeal gpeal closed this as completed Jul 16, 2018
@scottruigrok
Copy link

How did you make the files used in After Effects? I also had this problem when I used files exported from Experience Design. I recreated them in Illustrator and now the phone wont crash when using Lottie Preview.

The animation also couldn't be used in Xcode, but after using Illustrator for the screens it did work.

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

3 participants