yurkinh / Plugin.Maui.Calendar

.NET MAUI port of XF calendar plugin
MIT License
131 stars 12 forks source link

I'm Having this null exception when change dark mode to light mode, Plugin.Maui.Calendar.Controls.MonthDaysView.UpdateDaysColors() #71

Closed Muhesh02 closed 3 months ago

Muhesh02 commented 3 months ago

Unhandled managed exception: Object reference not set to an instance of an object. (System.NullReferenceException) at Plugin.Maui.Calendar.Controls.MonthDaysView.UpdateDaysColors() at Plugin.Maui.Calendar.Controls.MonthDaysView.OnPropertyChanged(String propertyName) at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindingExpression.ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindingExpression.Apply(Boolean fromTarget) at Microsoft.Maui.Controls.BindingExpression.BindingExpressionPart.b__50_0() at Microsoft.Maui.Controls.DispatcherExtensions.DispatchIfRequired(IDispatcher dispatcher, Action action) at Microsoft.Maui.Controls.BindingExpression.BindingExpressionPart.PropertyChanged(Object sender, PropertyChangedEventArgs args) at Microsoft.Maui.Controls.BindingExpression.WeakPropertyChangedProxy.OnPropertyChanged(Object sender, PropertyChangedEventArgs e) at Microsoft.Maui.Controls.BindableObject.OnPropertyChanged(String propertyName) at Microsoft.Maui.Controls.Element.OnPropertyChanged(String propertyName) at Plugin.Maui.Calendar.Controls.Calendar.OnPropertyChanged(String propertyName) at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindingExpression.ApplyCore(Object sourceObject, BindableObject target, BindableProperty property, Boolean fromTarget, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindingExpression.Apply(Boolean fromTarget) at Microsoft.Maui.Controls.BindingExpression.BindingExpressionPart.b__50_0() at Microsoft.Maui.Controls.DispatcherExtensions.DispatchIfRequired(IDispatcher dispatcher, Action action) at Microsoft.Maui.Controls.BindingExpression.BindingExpressionPart.PropertyChanged(Object sender, PropertyChangedEventArgs args) at Microsoft.Maui.Controls.BindingExpression.WeakPropertyChangedProxy.OnPropertyChanged(Object sender, PropertyChangedEventArgs e) at CommunityToolkit.Mvvm.ComponentModel.ObservableObject.OnPropertyChanged(PropertyChangedEventArgs e) at CommunityToolkit.Mvvm.ComponentModel.ObservableObject.OnPropertyChanged(String propertyName)

Do you have any idea regarding this issue?

yurkinh commented 3 months ago

I will release soon new version which should have fix fo the mentioned issue. But it would be good if you provide some minimal sample to test and verify it

yurkinh commented 3 months ago

Hi @Muhesh02 Check please v 1.1.9

Muhesh02 commented 3 months ago

Hi @yurkinh Thanks Man, its working good now and for that details you asked, its not with code, in some scenario only i have that exception updatedayscolors null exception where i didn't define anywhere in my code, so do you have any idea about this, may be if face again i will let you know detaily... Thanks a lot Bro