I just included my first Lottie animation and it works like charm. It is fast, simpel to implement and scalable.
But how to get control over the animation? I want load a new screen once the animation has finished, but no events are available for the lottie widget
my MCU is now a IMXRT1062 (I'm using the IMXRT1062 EVK from NXP).
In the GuiGuider Simulator everything worked fine as reported earlier but yesterday I flashed my code on the EVK (using a 800x480 display) and the code runs into a hardfault each time I try to load the screen with the lottie animation on it (see attached screenshot of the debugger)
The line that causes the hard fault is here:
This is just one scenario in which the hardfault is encountered. The hardfault is caused by reading from addresses that our outside the ROM/RAM area (eg 0x0c020608). These invalid addresses occur after executing this call:
rlottie->animation = lottie_animation_from_data(rlottie_desc_create, rlottie_desc_create, "");
on line 113 in lv_rlottie.c
The 'lottie_animation_from_data() call is hidden from the debugger since it resides in the lottie library, so I cannot debug the code any further from here
.text.lottie_animation_from_data 0x60065dd0 0x70 C:\Projects\pl_mx\code\mx6\magic_display\lib\arm\gcc\librlottie.a(lottieanimation_capi.cpp.obj) 0x60065dd0 lottie_animation_from_data
I will enclose my lottie.json file and generated c-file. The json file is zipped since I cannot attach .json files here
What causes this call to override valid addesses with invalid ones? Is it a memory(-size) problem?
Thank you for reporting this hardfault issue. The issue is caused by the PNG images which are embedded in the lottie json file you shared.
currently the librlottie.a(for targets) only supports limited features. please try the lottie json files which don't have images.
We will add the event support for lottie widget in future GUI Guider release.
1. Regarding the images in animation, if you open the animatie.json file using text editor. you will see the RAW data of PNG images like the attachment(lottie-image.png). so five png images have been embedded in this lottie json file.
2. The "Limited features" doesn't mean only can run lottie in the simulator. if you don't use the lottie json files which incude images, the lottie animation can also work on boards.
3. Regarding the lottie features. I means the features of Adobe After Effects. for more details, please refer to https://lottiefiles.com/supported-features
this is the feature list for web lottie library. the web library can support more features but not all features of AE. of course, we can't use this web lottie library in MCU devices.
thanks for your reply. I now understand that animations containing images are a no-go for embedded solutions. You might want to point that out in your manual. Your reference to the Lottie features isn't of much help: it doesn't state which features are available for the simulator and which for an embedded target. Images ARE supported for the simulator but NOT for an embedded target so it appears
I created a simple Lottie animation without images to see if that one passed the embedded test. It fails too, for different reasons. Would be nice if you could send me an example of a Lottie animation that runs on an embedded target. I enclosed my Lottie animation that has no images but still fails