Getting Error System NotSupportedException- Set method is not defined for this property

Hi,

I am getting "**System.NotSupportedException:** 'Set method is not defined for this property.'" this error on day cell clicks for some days having recurrence appointments - it works for some day clicks but not for recurrent appointment days. Below is the stacktrace for the error.


Removing the Recurrence rule mapping from SchedulerAppointmentMapping stops the crashes but recurrency needs to show up in scheduler month view.


**System.NotSupportedException:** 'Set method is not defined for this property.'


**System.NotSupportedException:** 'Set method is not defined for this property.'


[AppCenterXamarinCrashes] Unhandled Exception from source=AppDomain

[AppCenterXamarinCrashes] System.NotSupportedException: Set method is not defined for this property.

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.PropertyAccessor.SetValue(Object o, Object value)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.PropertyAccessor.Syncfusion.Maui.Scheduler.IPropertyAccessor.SetValue(Object instance, Object value)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.SfScheduler.ConvertToAppointmentData(SchedulerAppointment scheduleAppointment)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.SfScheduler.GetTappedAppointmentCollection(ReadOnlyCollection`1 appointments)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.SfScheduler.Syncfusion.Maui.Scheduler.ISchedulerTouchGesture.OnTappedCallBack(SchedulerTappedEventArgs tappedEventArgs, Boolean isAgendaDayHeader)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.SfScheduler.Syncfusion.Maui.Scheduler.IInteractionInfo.TriggerSchedulerInteractionEvent(Boolean isTapped, Int32 tapCount, Nullable`1 selectedDate, SchedulerElement element, List`1 appointments, Boolean isAgendaDayHeader, SchedulerResource selectedResource, Boolean isKeyNavigation, Int32 weekNumber)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.MonthViewLayout.UpdateSelectedDate(Boolean isTapped, Int32 tapCount, Nullable`1 selectedDate, SchedulerElement element, List`1 appointments)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.MonthViewLayout.OnInteractionEvent(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isSemantic)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.MonthViewLayout.Syncfusion.Maui.Scheduler.INotifySchedulerLayout.UpdateSelection(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isAllday)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.CustomSnapLayout.UpdateCellSelection(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isAllday)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.SfScheduler.Syncfusion.Maui.Scheduler.ISchedulerViewInfo.UpdateTimeSlotSelection(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isAllday)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Scheduler.MonthAppointmentsView.Syncfusion.Maui.Core.Internals.ITapGestureListener.OnTap(TapEventArgs e)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Core.Internals.GestureDetector.OnTapped(Point touchPoint, Int32 tapCount)

[AppCenterXamarinCrashes] at Syncfusion.Maui.Core.Internals.GestureDetector.ScrollListener.OnSingleTapConfirmed(MotionEvent e)

[AppCenterXamarinCrashes] at Android.Views.GestureDetector.SimpleOnGestureListener.n_OnSingleTapConfirmed_Landroid_view_MotionEvent_(IntPtr jnienv, IntPtr native__this, IntPtr native_e) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Views.GestureDetector.cs:line 1338

[AppCenterXamarinCrashes] at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_Z(_JniMarshal_PPL_Z callback, IntPtr jnienv, IntPtr klazz, IntPtr p0) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 132

[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NotSupportedException: Set method is not defined for this property.

[mono-rt] at Syncfusion.Maui.Scheduler.PropertyAccessor.SetValue(Object o, Object value)

[mono-rt] at Syncfusion.Maui.Scheduler.PropertyAccessor.Syncfusion.Maui.Scheduler.IPropertyAccessor.SetValue(Object instance, Object value)

[mono-rt] at Syncfusion.Maui.Scheduler.SfScheduler.ConvertToAppointmentData(SchedulerAppointment scheduleAppointment)

[mono-rt] at Syncfusion.Maui.Scheduler.SfScheduler.GetTappedAppointmentCollection(ReadOnlyCollection`1 appointments)

[mono-rt] at Syncfusion.Maui.Scheduler.SfScheduler.Syncfusion.Maui.Scheduler.ISchedulerTouchGesture.OnTappedCallBack(SchedulerTappedEventArgs tappedEventArgs, Boolean isAgendaDayHeader)

[mono-rt] at Syncfusion.Maui.Scheduler.SfScheduler.Syncfusion.Maui.Scheduler.IInteractionInfo.TriggerSchedulerInteractionEvent(Boolean isTapped, Int32 tapCount, Nullable`1 selectedDate, SchedulerElement element, List`1 appointments, Boolean isAgendaDayHeader, SchedulerResource selectedResource, Boolean isKeyNavigation, Int32 weekNumber)

[mono-rt] at Syncfusion.Maui.Scheduler.MonthViewLayout.UpdateSelectedDate(Boolean isTapped, Int32 tapCount, Nullable`1 selectedDate, SchedulerElement element, List`1 appointments)

[mono-rt] at Syncfusion.Maui.Scheduler.MonthViewLayout.OnInteractionEvent(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isSemantic)

[mono-rt] at Syncfusion.Maui.Scheduler.MonthViewLayout.Syncfusion.Maui.Scheduler.INotifySchedulerLayout.UpdateSelection(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isAllday)

[mono-rt] at Syncfusion.Maui.Scheduler.CustomSnapLayout.UpdateCellSelection(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isAllday)

[mono-rt] at Syncfusion.Maui.Scheduler.SfScheduler.Syncfusion.Maui.Scheduler.ISchedulerViewInfo.UpdateTimeSlotSelection(Point tapPoint, Boolean isTapped, Int32 tapCount, Boolean isAllday)

[mono-rt] at Syncfusion.Maui.Scheduler.MonthAppointmentsView.Syncfusion.Maui.Core.Internals.ITapGestureListener.OnTap(TapEventArgs e)

[mono-rt] at Syncfusion.Maui.Core.Internals.GestureDetector.OnTapped(Point touchPoint, Int32 tapCount)

[mono-rt] at Syncfusion.Maui.Core.Internals.GestureDetector.ScrollListener.OnSingleTapConfirmed(MotionEvent e)

[mono-rt] at Android.Views.GestureDetector.SimpleOnGestureListener.n_OnSingleTapConfirmed_Landroid_view_MotionEvent_(IntPtr jnienv, IntPtr native__this, IntPtr native_e) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Views.GestureDetector.cs:line 1338

[mono-rt] at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_Z(_JniMarshal_PPL_Z callback, IntPtr jnienv, IntPtr klazz, IntPtr p0) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 132

[mali] ==>[WARN] (XXXX.maui) EGL: In file: vendor/mediatek/proprietary/hardware/gpu_mali/mali_valhall/r32p1-00bet0/product/egl/src/mali_egl_display.c line: 1509 eglp_unload_callback

[mali] EGLDisplay (0xb400007d4a2b0800) was not properly terminated by the application before unloading the driver.

[RefBase] RefBase: Explicit destruction, weak count = 0 (in 0x7e1299c4b0). Use sp<> to manage this object.

[RefBase] #00 pc 000000000010fd30 /apex/com.android.runtime/lib64/bionic/libc.so (__cxa_finalize+144) (BuildId: a87e89fc2c0a5753053f536add4d7ae1)

[RefBase] #01 pc 0000000000101818 /apex/com.android.runtime/lib64/bionic/libc.so (exit+24) (BuildId: a87e89fc2c0a5753053f536add4d7ae1)

[RefBase] #02 pc 000000000021ce38 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #03 pc 000000000014fac4 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #04 pc 000000000014e238 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #05 pc 00000000001a8c74 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #06 pc 00000000001a7000 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #07 pc 00000000001a06e4 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #08 pc 00000000001a9718 /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #09 pc 00000000001a9e2c /data/app/~~Rsyg9l3vOP2D3CIBgVAzxg==/com.XXXX.maui--zmhq_j7-mT5IfXXftbokg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (offset 0x360000) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)

[RefBase] #10 pc 000000000000a510 <anonymous:7e2a100000>

SchedulerError.png


Thanks!


5 Replies

VM Vidyalakshmi Mani Syncfusion Team October 30, 2024 12:57 PM UTC

Hi Rajdeep,


Thank you for reaching out! We have tested the scheduler using appointment mapping with recurrence appointments. When tapping on the cells in the month view, the Tapped event successfully displayed the correct appointment details, and we did not encounter the crash you described. For your convenience, we’ve included the tested sample project and an output image.


Could you please check if you encounter the same issue with our sample? If the issue does not replicate in our sample, it appears that you may have customized the scheduler page based on the images you shared. Kindly modify our sample to replicate the issue and provide us with the modified sample or share your scheduler page code snippets. This will help us investigate further and assist you more effectively.


Regards,

Vidyalakshmi M.




Attachment: SampleAndImage_e48bb1d5.zip


RS Rajdeep Sutar October 30, 2024 05:24 PM UTC

Hi Vidyalakshmi,


Thanks for looking into this issue quickly. I am attaching the sample solution which we have created with the sample data we are receiving issue with.


After running the app click on the day view of 26th October, the app is still crashing with the error I mentioned.


Let me know after looking into the code what I am doing wrong or if you need anymore details related to this issue.


Thanks,

Rajdeep




Attachment: SchedularSample_cea294dc.zip


VM Vidyalakshmi Mani Syncfusion Team October 31, 2024 12:05 PM UTC

Hi Rajdeep,

  

Thank you for sharing your sample with us. Upon analysis, we found that the crash you encountered is due to certain properties in your custom appointment class (`Appointment.cs`) not having defined setters. To fix this, please ensure that all properties mapped to the scheduler include both `get` and `set` accessors. After adding the setters for the properties (DisplaySubject, IsAllDay, BgDispColor), it is now working fine. We have included the modified sample for your reference. Please review it, and don’t hesitate to reach out if you need any further assistance or have additional questions.


Regards,

Vidyalakshmi M.



Attachment: SchedularSample_b3c6b550.zip


RS Rajdeep Sutar October 31, 2024 03:06 PM UTC

Thank you very much Vidyalakshmi for your help! 

It fixed this issue. It was confusing for me as recurring appointments were working sometimes and sometimes not.



VM Vidyalakshmi Mani Syncfusion Team November 1, 2024 11:24 AM UTC

Hi Rajdeep,


We are glad that your issue has been resolved! Please let us know if you need further assistance. As always, we are happy to help you out.


Regards,

Vidyalakshmi M.



Loader.
Up arrow icon