Welcome to the Xamarin.Forms feedback portal. We’re happy you’re here! If you have feedback on how to improve the Xamarin.Forms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Update: Tested with 17.4.0.39, issue still occurs.

I am getting an intermittent issue with SfSchedule on Xamarin Forms - Android.

For some reason, the SfSchedule sometimes throws the following exception (on Android only):

Thread started: <Thread Pool> #16
12-17 10:17:00.243 I/MonoDroid(27268): UNHANDLED EXCEPTION:
12-17 10:17:00.256 I/MonoDroid(27268): System.InvalidOperationException: Sequence contains no elements
12-17 10:17:00.256 I/MonoDroid(27268):   at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <10a59ea148cd4c6face8252c32c5e77b>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at Com.Syncfusion.Schedule.AppointmentEngine.GetVisibleAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] visibleDateRange, Com.Syncfusion.Schedule.ScheduleAppointmentCollection appointments, System.Boolean isTimelineView) [0x0000e] in <db109a7484c74a749e3f9bfb7a48c761>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at Com.Syncfusion.Schedule.SfSchedule.<UpdateResourceAppointments>b__319_0 () [0x00035] in <db109a7484c74a749e3f9bfb7a48c761>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <46c2fa109b574c7ea6739f9fe2350976>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at System.Threading.Tasks.Task.Execute () [0x00000] in <46c2fa109b574c7ea6739f9fe2350976>:0
12-17 10:17:00.256 I/MonoDroid(27268): --- End of stack trace from previous location where exception was thrown ---
12-17 10:17:00.256 I/MonoDroid(27268):
12-17 10:17:00.256 I/MonoDroid(27268):   at Com.Syncfusion.Schedule.SfSchedule.UpdateResourceAppointments (System.Collections.ObjectModel.ObservableCollection`1[T] resourceIDColl) [0x000ac] in <db109a7484c74a749e3f9bfb7a48c761>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <46c2fa109b574c7ea6739f9fe2350976>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <8c07a09624c14764b43f6b946a5a1f23>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <8c07a09624c14764b43f6b946a5a1f23>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <8c07a09624c14764b43f6b946a5a1f23>:0
12-17 10:17:00.256 I/MonoDroid(27268):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.79(intptr,intptr)

The code I use to set the ScheduleResources, DataSource, and SelectedResources:


            this.schedule.ScheduleResources = this.VM.Resources;
            this.schedule.DataSource = this.VM.Sessions;
            this.schedule.SelectedResources = this.VM.SelectedResources;

Where this.schedule is an SfSchedule on a XAML page. VM.Resources is an ObservableCollection<object>, same with SelectedResources, and Sessions is a ScheduleAppointmentCollection.

Any guidance would be appreciated. This is a show-stopper for us.