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

Flare files randomly lose SVG elements #49

Closed
psovit opened this issue Mar 7, 2019 · 14 comments
Closed

Flare files randomly lose SVG elements #49

psovit opened this issue Mar 7, 2019 · 14 comments

Comments

@psovit
Copy link

psovit commented Mar 7, 2019

We created Flare files from 2Dimensions Flare tool by first importing SVG files and then exporting as .flr file.
Files are loaded using the FlareActor from Flare-Flutter package in our app.

The issue that we are seeing is that although the files work as expected in first load, on subsequent loading of the same file they randomly lose some of the elements of the SVG file.
No exceptions/warnings are thrown that we can use to debug this issue.

working

not-working

Flare Flutter version:
^1.2.3
Flutter version:
Flutter 1.2.1 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (3 weeks ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

@luigi-rosso
Copy link
Contributor

Thanks for reporting this, I think #51 is related.

Do you have any example code exhibiting the behavior? In the meantime I'll do some test by manually reloading the file via a button to see if I can repro the issue.

@luigi-rosso
Copy link
Contributor

I just pushed package 1.3.1 with a fix, let me know if this solves the issue for you!

@uggyk
Copy link

uggyk commented Mar 7, 2019

would you kindly send me the .flr file that you exported? even after upgrading I can't seem to make it work.

@uggyk
Copy link

uggyk commented Mar 7, 2019

I feel like it is not from the flutter_flare package. I think it is from the exporting of the file itself from the 2dimensions flare website.

@luigi-rosso
Copy link
Contributor

The file seems to be fine, the issue was that in some cases the animation from a previously loaded file would be used on the newly loaded file and things wouldn't necessarily align. After changing the package did you call flutter pub get?

@psovit
Copy link
Author

psovit commented Mar 8, 2019

Thank you @luigi-rosso for such a quick turn-around. Looks like flare_flutter: ^1.3.2 has resolved the issue as the images are no longer breaking. Appreciate it!

@psovit psovit closed this as completed Mar 8, 2019
@psovit psovit reopened this Mar 8, 2019
@psovit
Copy link
Author

psovit commented Mar 8, 2019

Looks like the issue hasn't resolved yet as we came across the issue again!

@luigi-rosso
Copy link
Contributor

Shoot! Is it the same workflow? After a second load the image is corrupt, or is the flow different in any way?

@psovit
Copy link
Author

psovit commented Mar 8, 2019

yep, just navigating across different tab views and coming back to the initial image is crashing the image elements.

@umberto-sonnino
Copy link
Contributor

Hey @psovit could you share the Flare file that's affected?

@psovit
Copy link
Author

psovit commented Mar 13, 2019

Hi @umberto-sonnino , the comment section of github issues didn't allow me to upload the Flare files (extension not supported here) so I have created a different repo. It has the files that you are looking for.
https://github.com/psovit/flare_issue_samples

@umberto-sonnino
Copy link
Contributor

I've tried setting up something similar to what you mentioned: a TabBar with 3 different views, each with one of the files you shared. Everything seems to be working fine over here, though: all the elements retain their drawables.
Could you share any other detail on your setup?

Also - just to make sure - have you tried running flutter clean and flutter packages get on the app you're trying to build, and running it again?

@psovit
Copy link
Author

psovit commented Mar 15, 2019

I am not sure when exactly the issue happens as it happens very randomly. I tried to recreate the issue on a separate project but the issue isn't appearing. Maybe flutter clean and flutter packages get was what was needed. But I am not sure at this point.

Also, we have cut down on the usage of Flare files. Initially, we had every SVG files (from icons to artworks) exported as Flare files. Now, we have replaced Flare files with PNGs for icons and only few artworks are still used as Flares.

I guess I will re-open the issue when I can reproduce it.

Thanks!

@psovit psovit closed this as completed Mar 15, 2019
@umberto-sonnino
Copy link
Contributor

Yes, we're keeping an eye out for this as well, thanks a lot for the reports!

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

4 participants