Baseflow / Baseflow/LottieXamarin
Cannot access a disposed object Com.Airbnb.Lottie.LottieAnimationView
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 253
- PR merge metrics
- No merged PRs in 30d
Description
## 🐛 Bug Report
I am using Lottie inside a custom control. In code-behind I set PlayAnimation() and StopAnimation() depending on IsBusy bindable property.
When I navigate to another page and return back and when setting IsBusy = True, PlayAnimation() throw exception **Cannot access a disposed object Com.Airbnb.Lottie.LottieAnimationView**
I even tried to create LottieAnimationView from code-behind and attach it to StackLayout but it is the same error.
when I inspect LottieAnimationView it is still there in memory, but PlayAnimation throws an exception.
**Version:** 4.0.11
Contributor guide
Research direction
Reproduce the failure using a custom control, IsBusy, PlayAnimation(), and StopAnimation() on LottieAnimationView with version 4.0.11, then navigate away and back before setting IsBusy to true. Trace the view's lifecycle around navigation and verify that PlayAnimation() no longer throws Cannot access a disposed object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100