Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cvijo opened this issue Dec 11, 2021 · 1 comment
Open

Comments

@Cvijo
Copy link

Cvijo commented Dec 11, 2021

馃悰 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

@will-spaulding
Copy link

i had a similar issue with a databound list whos item template contains a lottie file. are you updating the IsBusy prop from the view model? if you are try using Device.BeginInvokeOnMainThread method. i can not say for sure that was my issue but its been several weeks with no crashes.

Device.BeginInvokeOnMainThread(() =>
{
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants