azchohfi / LottieUWP

UWP port of Lottie(https://github.com/airbnb/lottie-android)
Apache License 2.0
274 stars 45 forks source link

Xamarin Forms UWP MainPage Change Throws Exception #29

Closed MattRames closed 6 years ago

MattRames commented 6 years ago

When changing the MainPage of the app while an animation view is on screen an InvalidOperationException is thrown. Details below.

Cannot assign a native control without an Element; Renderer unbound and/or disposed. Please consult Xamarin.Forms renderers for reference implementation of OnElementChanged.

at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetNativeControl(TNativeElement control) at Lottie.Forms.UWP.Renderers.AnimationViewRenderer.d4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b6_0(Object state) at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()

c1119565-914c-4569-beb4-92d7b1c35e2f

Reproduction Link: https://drive.google.com/open?id=10B2Qhbe4MPyBaOBzn4emdCYmWSDgltBh

azchohfi commented 6 years ago

This is a bug in Lottie.Xamarin. Fix is here: https://github.com/martijn00/LottieXamarin/pull/152

azchohfi commented 6 years ago

Fixed on the other repo.