Open Vaibhav2002 opened 1 month ago
Any animation example / xcode profiling info? What is causing the ANR? Memory? Cpu? Do you have multiple animations from the same json file on screen at the same time? Have you tested the release build? Can you try the sample app? There is also a lazy grid of various animations and nothing hangs for me
Android works pretty good with no such hangs
The code is 99% shared so it can be a Compose issue
Yes, i have multiple animations from same json running in the same screen Some lazy column items have the same animation
This is only happening in release build, I never encountered this when running app on debug builds or in simulator I am using this on production, and its hanging in a lot of devices
Few animations which i am using:
Try to disable composition cache with rememberLottieComposition(key = null)
It's hard to tell anything concrete without a reproducer. Are there specific devices it hangs on? Old low-memory iphones? Is you app open source?
Making a reproducer is difficult, as it just happens even with a simple lazy column It hangs even on latest iPhone 15, 14 devices
App is not open source.
The composable i shared above, is how i use it everywhere.
I'll try with disabling composition cache and update here
@alexzhirkevich It still crashes Even after disabling composition cache
I managed to get some Crash logs, maybe that might help Medial-2024-08-05-171516.txt Medial-2024-08-05-171238.txt Medial-2024-08-05-171430.txt
@alexzhirkevich Any update on this? Facing the same issue
Do you have a reproducer?
Its completely random. I am using it as in the Read me
Any relevant stacktrace? Profiling info? Memory dump?
It's the same crash logs as @Vaibhav2002
This logs only says that the app was terminated due to exceeding the backround work quota. What compose and kotlin version do you use?
Compose 1.6.11 Kotlin 2.0.0
Any special usages? Maybe this happen when you use lotties with images or with dynamic properties?
Yes dynamic properties are used for light and dark switch Yes we use lottie with images but it works fine in Android Also the animation is in cells of lazy column
Can you try it without dynamic properties and then without images? It will help to find the root cause
What happened?
iOS App hangs very frequently when scrolling lists, swiping pager, selecting bottom nav items if there are lottie animations in the UI Like in every 2-3min while just scrolling a vertical lazy list or switching pager, iOS App completely hangs and user has to close the app and re-open it
Reason why I feel its due to Compottie
I replaced every lottie animation in app with a blank
Box
composable and even after hours of scrolling, swiping pages, doing all kind of interactions, app did not hang at allTested this for 2 days, and there has not been a single hang While as soon as i uncomment the Compottie code, the frequent app hangs starts again
This is degrading User Experience a lot.
This is only happening on iOS, Android works pretty good with no such hangs
Composable code
Unsupported features
What Compottie version do you experience the bug on?
2.0.0-beta02
What platforms are you seeing the problem on?
iOS
Does Compottie log anythyng to the stdout / your logger set with
Compottie.logger
?