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

Problem in loading multiple asset rives. #401

Open
akanksha-coditas opened this issue Jun 20, 2024 · 3 comments
Open

Problem in loading multiple asset rives. #401

akanksha-coditas opened this issue Jun 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@akanksha-coditas
Copy link

Description

I'm encountering an issue with preloading Rive files using RiveFile.asset() in flutter web. For some files, the preloading works as expected, but for others, it throws exceptions. Interestingly, the files that cause exceptions when preloaded with others work fine when loaded individually. This problem occurs only when the files are loaded from hosted URLs.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add approx 10-12 rive files of less than 3mb size in assets directory.
  2. Now try to preload all the rives.
  3. Few will be loaded and then will get an error saying
Screenshot 2024-06-20 at 5 15 36 PM

Expected behavior

<-- A clear and concise description of what you expected to happen. -->
I wanted to preload all the rives at the initial state only and later on as per the requirement will render it on the screen using RiveFile.direct(riveFile).

Device & Versions (please complete the following information)

  • Device: Macbook Pro
  • OS: macOs 14.4.1 Sonoma
  • Flutter Version: Flutter 3.22.0 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision 5dcb86f68f (6 weeks ago) • 2024-05-09 07:39:20 -0500
    Engine • revision f6344b75dc
    Tools • Dart 3.4.0 • DevTools 2.34.3
@akanksha-coditas akanksha-coditas added the bug Something isn't working label Jun 20, 2024
@HayesGordon
Copy link
Contributor

Hi @akanksha-coditas,

I'd like to confirm. Is this only an issue if the .riv file contains hosted out-of-band assets? It appears that the image data is corrupt.

If you have an example project (or .riv files) you can share with us that reproduces the issue that will be really helpful in speeding along our investigation.

@akanksha-coditas
Copy link
Author

Hi @akanksha-coditas,

I'd like to confirm. Is this only an issue if the .riv file contains hosted out-of-band assets? It appears that the image data is corrupt.

If you have an example project (or .riv files) you can share with us that reproduces the issue that will be really helpful in speeding along our investigation.

Regarding the out-of-band asset, I am unsure. Additionally, I only see this problem when I load more than 6-7 rives at once; otherwise, everything functions as it should. Furthermore, it isn't targeting any particular file. Additionally, it makes no exceptions when I load files one at a time.

Also, I apologise, but since those are client files, I am unable to give them to you.

@HayesGordon
Copy link
Contributor

We can try to reproduce this issue on our end, but if you can provide a reproducible sample, or share how you are using the runtime code that'll be helpful. If we're unable to reproduce it'll be difficult to resolve the issue.

Could you give more information on this: "This problem occurs only when the files are loaded from hosted URLs."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants