UpdateVisibleAppointments throws exception when sfschedule is not even visible

working on 19.1 with XF5.0.0.2012

My sfschedule is invisible when the page is rendered, but I'm getting the following exceptions.
Is there a way to prevent the sfschedule from processing while it is not shown?
[Crash Report] Time: 6/8/2021 3:46:18 PM
[Crash Report] Error: Unhandled Exception
[Crash Report] System.Exception: TaskSchedulerOnUnobservedTaskException ---> System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Collection was modified; enumeration operation may not execute.) ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
[Crash Report] at System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () [0x00013] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:1163
[Crash Report] at System.Collections.Generic.List`1+Enumerator[T].MoveNext () [0x0004a] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:1156
[Crash Report] at System.Collections.Generic.List`1+Enumerator[T].MoveNext () [0x0004a] in /Users/b06-08 15:46:18.981 E/Crash Report(17935): at Com.Syncfusion.Schedule.AppointmentEngine.GetVisibleAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDateRange, Com.Syncfusion.Schedule.ScheduleAppointmentCollection appointments, System.Boolean isTimelineView) [0x00c07] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] at Com.Syncfusion.Schedule.SfSchedule+<>c__DisplayClass343_0.b__0 () [0x00077] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2476
[Crash Report] at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
[Crash Report] --- End of stack trace from previous location where exception was thrown ---
[Crash Report]
[Crash Report] at Com.Syncfusion.Schedule.SfSchedule.UpdateVisibleAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDates) [0x00089] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] at Com.Syncfusion.Schedule.SfSchedule.UpdateAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDates) [0x00165] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] --- End of inner exception stack trace ---
[Crash Report] --- End of inner exception stack trace ---
[oxplannermobil] Explicit concurrent copying GC freed 6853(793KB) AllocSpace objects, 10(604KB) LOS objects, 58% free, 4346KB/10MB, paused 121us total 28.876ms
[Crash Report] Time: 6/8/2021 3:46:19 PM
[Crash Report] Error: Unhandled Exception
[Crash Report] System.Exception: TaskSchedulerOnUnobservedTaskException ---> System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Collection was modified; enumeration operation may not execute.) ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
[Crash Report] at System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () [0x00013] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:1163
[Crash Report] at System.Collections.Generic.List`1+Enumerator[T].MoveNext () [0x0004a] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:1156
[Crash Report] at Com.Syncfusion.Schedule.AppointmentEngine.GetVisibleAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDateRange, Com.Syncfusion.Schedule.ScheduleAppointmentCollection appointments, System.Boolean isTimelineView) [0x00c07] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] at Com.Syncfusion.Schedule.SfSchedule+<>c__DisplayClass343_0.b__0 () [0x00077] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2476
[Crash Report] at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
[Crash Report] at System.Threading.Tasks.Task.Execute () [0x00000] 06-08 15:46:19.047 E/Crash Report(17935): --- End of stack trace from previous location where exception was thrown ---
[Crash Report]
[Crash Report] at Com.Syncfusion.Schedule.SfSchedule.UpdateVisibleAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDates) [0x00089] in <977f87c8a5434dabbd3de12626f6aa20>:0
[Crash Report] at Com.Syncfusion.Schedule.SfSchedule.UpdateAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDates) [0x00165] in <977f87c8a5434dabbd3de12626f6aa20>:0

1 Reply 1 reply marked as answer

MS Muniappan Subramanian Syncfusion Team June 9, 2021 11:49 AM UTC

Hi Michael, 
 
Thank you for contacting Syncfusion support.  
 
We have checked the reported issue “UpdateVisibleAppointments throws exception when sfschedule is not even visible “and it’s working fine from our end. As per the instruction we have followed to check the reported issue and we are unable to replicate the issue from our end. We have checked in the scenario of using the latest and old SfSchedule version. We have attached the tested sample in the following link,  
   
 
Additional information:  
Tested device: Moto G5 and iPhone simulator 
SfSchedule version: 19.1.0.67 and lower version. 
Xamarin Forms: 5.0.0.2012 
 
Please check our sample and let us know if you still facing the same issue? if not, please modify our sample and revert us back with the following details which would be helpful for us to check on it and provide you the solution as soon as possible, 
 
·         Share the issue replicate video.  
·         Share the issue reproducible sample         
·         Share schedule code snippets  
·         Share Syncfusion and Xamarin.Form’s version 
 
Regards,  
Muniappan S 


Marked as answer
Loader.
Up arrow icon