Open Cfun1 opened 3 years ago
Hi @Cfun1 InvalidOperationException
hm, weird. It doesn't look like a crash of ShadowEffect.
Can you please build a small (one-page) reproduction sample? (with xaml UI if possible).
There is a lot of code in the provided sample, I just want to exclude the possibility that there is a bug in your code.
@AndreiMisiukevich Sure i will provide a smaller repo later, the thing is there was no exception with 1.1.0, after I have updated the package (with no parallel modifications) it started to happen on both 1.2.0-pre1 and 1.2.0-pre2.
@AndreiMisiukevich Sure i will provide a smaller repo later, the thing is there was no exception with 1.1.0, after I have updated the package (with no parallel modifications) it started to happen on both 1.2.0-pre1 and 1.2.0-pre2.
Thank you) Perhaps we will have to force to update smth in UI thread. But would be great to have a small sample
@Cfun1 if you could provide us with that sample that would be great!
Description
It seems ShadowEffect is causing an exception, could be a regression.
Steps to Reproduce
Expected Behavior
No exception.
Actual Behavior
Exception being thrown.
StackTrace
``` at Xamarin.Forms.Color.MultiplyAlpha (System.Double alpha) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\Color.cs:151 at Xamarin.CommunityToolkit.Android.Effects.PlatformShadowEffect.Update () [0x0005c] in <078b17b9729e4d8fb573cff6b1ee501e>:0 at Xamarin.CommunityToolkit.Android.Effects.PlatformShadowEffect.OnElementPropertyChanged (System.ComponentModel.PropertyChangedEventArgs args) [0x000f9] in <078b17b9729e4d8fb573cff6b1ee501e>:0 at Xamarin.Forms.PlatformEffect`2[TContainer,TControl].SendOnElementPropertyChanged (System.ComponentModel.PropertyChangedEventArgs args) [0x00008] in D:\a\1\s\Xamarin.Forms.Core\PlatformEffect.cs:31 at Xamarin.Forms.RoutingEffect.SendOnElementPropertyChanged (System.ComponentModel.PropertyChangedEventArgs args) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\RoutingEffect.cs:39 at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x0007a] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:375 at Xamarin.Forms.BindableObject.ClearValue (Xamarin.Forms.BindableProperty property, System.Boolean fromStyle, System.Boolean checkAccess) [0x000f8] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:90 at Xamarin.Forms.BindableObject.ClearValue (Xamarin.Forms.BindableProperty property, System.Boolean fromStyle) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:40 at Xamarin.Forms.Setter.UnApply (Xamarin.Forms.BindableObject target, System.Boolean fromStyle) [0x000be] in D:\a\1\s\Xamarin.Forms.Core\Setter.cs:117 at Xamarin.Forms.TriggerBase.OnConditionChanged (Xamarin.Forms.BindableObject bindable, System.Boolean oldValue, System.Boolean newValue) [0x00074] in D:\a\1\s\Xamarin.Forms.Core\Interactivity\TriggerBase.cs:106 at Xamarin.Forms.BindingCondition.OnBoundPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x0001d] in D:\a\1\s\Xamarin.Forms.Core\Interactivity\BindingCondition.cs:95 at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00120] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:512 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:446 at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x00226] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:160 at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:56 at Xamarin.Forms.BindingExpression+BindingExpressionPart.Basic Information
Reproduction imagery
https://github.com/Cfun1/XamsungHealth/tree/e04b67ba4e8d2ada1302b15d60d931dc6010e68f
Reproduction Link