lilcodelab / Xamarin.Plugin.Calendar

Calendar plugin for Xamarin.Forms
MIT License
260 stars 61 forks source link

Calendar.UpdateEvents() throwing errors #142

Open PonyOny opened 1 year ago

PonyOny commented 1 year ago

Describe the bug I am receiving this error on lots o devices, I have not been able to reproduce it on Emulator or on iOs devices, the devices that are experimenting this issues are

Additional context Fatal Exception: android.runtime.JavaProxyThrowable: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.Plugin.Calendar.Controls.SelectionEngines.SingleSelectionEngine.Xamarin.Plugin.Calendar.Controls.Interfaces.ISelectionEngine.TryGetSelectedEvents (Xamarin.Plugin.Calendar.Models.EventCollection allEvents, System.Collections.ICollection& selectedEvents) [0x00019] in <5cc018475e754084b8935193109c2fce>:0 at Xamarin.Plugin.Calendar.Controls.Calendar.UpdateEvents () [0x00012] in <5cc018475e754084b8935193109c2fce>:0 at Xamarin.Plugin.Calendar.Controls.Calendar.OnPropertyChanged (System.String propertyName) [0x00049] in <5cc018475e754084b8935193109c2fce>:0 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) [0x0011b] in <127988f275c94aa8ac6d3c0299b0e5b3>:0 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in <127988f275c94aa8ac6d3c0299b0e5b3>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0004d] in <127988f275c94aa8ac6d3c0299b0e5b3>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <127988f275c94aa8ac6d3c0299b0e5b3>:0 at Xamarin.Plugin.Calendar.Controls.Calendar.set_SelectedDates (System.Collections.Generic.List1[T] value) [0x00000] in <5cc018475e754084b8935193109c2fce>:0 at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],Sys<truncated: 19814 chars> at crc643f46942d9dd1fff9.PlatformRenderer.n_dispatchTouchEvent(PlatformRenderer.java) at crc643f46942d9dd1fff9.PlatformRenderer.dispatchTouchEvent(PlatformRenderer.java:59) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:1112) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1971) at android.app.Activity.dispatchTouchEvent(Activity.java:4388) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:1070) at android.view.View.dispatchPointerEvent(View.java:15803) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8153) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7877) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7213) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7270) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7236) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7434) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7244) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7491) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7217) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7270) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7236) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7244) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7217) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10788) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10676) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10632) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10926) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:285) at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loopOnce(Looper.java:186) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)`