LottieFiles / dotlottie-web

Official LottieFiles player for rendering Lottie and dotLottie animations in the web. Supports React, Vue, Svelte, SolidJS and Web Components.
https://developers.lottiefiles.com/docs/dotlottie-player/
MIT License
191 stars 11 forks source link

DotLottie React - Runtime Error: Memory access out of bounds #376

Open mabernethy opened 1 month ago

mabernethy commented 1 month ago

Overview

I have a Lottie file in JSON that my team has been using with an older Lottie player (LottieLight). We're looking to upgrade to better Lottie player with smaller animation files. As part of that work, I've integrated the DotLottieReact component into our codebase. In my initial tests, I converted one of our existing JSON files into a .lottie file using the website https://lottiefiles.com/tools/lottie-to-dotlottie .

In my first initial hacked together proof of concept, I got the animation working as I would expect. No errors or anything. I then built out a more robust proof of concept, and converted another JSON file into a .lottie file (Attached here as a Zip file). However, when I try to display this lottie file in the browser, I continually get "Uncaught Runtime Error: memory access out of bounds" errors."

Browser: Latest version of Chrome OS: MacOS Sonoma 14.7 Machine: M3 Macbook Pro RAM: 32 Gb

image

dotlottie-memory-issue.lottie.zip

...

Consuming repo

What repo were you working in when this issue occurred? DotLottie React ...

Labels

Type: Bug

theashraf commented 3 days ago

@mabernethy which version of DotLottieReact you're using ?

aldibatyr commented 3 days ago

@theashraf experiencing the same issue on 0.9.3 version.

interestingly, when you set a style to less than 150px the file loads.

Screenshot 2024-11-19 at 12 58 18
nasringh commented 3 days ago

I have the same issue what is the solution for it??

Screenshot 1403-08-29 at 15 31 15
aldibatyr commented 1 day ago

noticed that the 0.10.0 version was released today, but the issue is still there. Both .lottie and .json files fail to run using dotlottie-react.

theashraf commented 1 day ago

@nasringh @aldibatyr can you share with me your .lottie or .json asset ?

theashraf commented 1 day ago

@mabernethy I'm not able to replicate the same issue on the latest version of dotlottie-react, maybe it was a different asset ?

You can try testing it again on the dotLottie Viewer -> https://lottiefiles.github.io/dotlottie-web/

image
aldibatyr commented 1 day ago

@theashraf the files that are exported with lottie plugin from figma create that error. Lotties exported from AE are okay.

aldibatyr commented 1 day ago

Just tested the files that are hosted in lottiefiles and they work remotely or when downloaded and stored locally.

aldibatyr commented 1 day ago

@nasringh @mabernethy could you also check various files exported via figma vs Adobe After Effects?

theashraf commented 1 day ago

@theashraf the files that are exported with lottie plugin from figma create that error. Lotties exported from AE are okay.

@aldibatyr if you can share with me one or few problematic assets, that would help me investigate the root cause

aldibatyr commented 1 day ago

Sure! @theashraf attaching the file flow1.json

theashraf commented 1 day ago

@aldibatyr I'm not encountering the Memory access out of bounds issue, but I have noticed some inconsistent rendering. Is that the issue you're experiencing ?

Screenshot
aldibatyr commented 1 day ago

@theashraf the issue was indeed Memory access out of bounds the page would simpy freeze.

aldibatyr commented 1 day ago

let me try creating a reproducible demo. I'll come back 👍

theashraf commented 1 day ago

Thanks @aldibatyr i was able to reproduce it here, let me come back with a solution https://codepen.io/lottiefiles/pen/ExqBprW?editors=0010

aldibatyr commented 1 day ago

@theashraf great! Thanks a lot!