Baseflow / Baseflow/LottieXamarin

Cannot access a disposed object Com.Airbnb.Lottie.LottieAnimationView

Open
#365 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.