Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.4-pre - System.InvalidOperationException: Sequence contains no elements #86

Closed
1 task
matteopiccioni opened this issue Mar 20, 2020 · 3 comments
Closed
1 task

Comments

@matteopiccioni
Copy link

Description

Only in In 1.1.4-pre I have the following problem:
OnAppearing, after reading items a make a new ObservableCollection I have exception

Steps to Reproduce

In viewmodel:
Mycoll = new ObservableCollection(myListObject);
I have exception: System.InvalidOperationException: Sequence contains no elements

my xaml:
I have a ContentPage, inside ContentPage I have Grid
Into Grid I have SettingsView
ItemsSource="{Binding Mycoll}"

Expected Behavior

In version 1.0.9 it works...it show a list of cells

Actual Behavior

In 1.1.4-pre I have exception:

Exception:
System.InvalidOperationException: Sequence contains no elements

" at System.Linq.Enumerable.Max (System.Collections.Generic.IEnumerable1[T] source) [0x0001d] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.Linq/src/System/Linq/Max.cs:23 \n at AiForms.Renderers.Droid.ModelProxy.AddCell (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00031] in <f3a99fabefd04b6f87e142c28cbcae58>:0 \n at AiForms.Renderers.Droid.ModelProxy.OnRootSectionCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00033] in <f3a99fabefd04b6f87e142c28cbcae58>:0 \n at (wrapper delegate-invoke) System.EventHandler1[System.Collections.Specialized.NotifyCollectionChangedEventArgs].invoke_void_object_TEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)\n at AiForms.Renderers.SettingsRoot.ChildCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs) [0x0000b] in :0 \n at AiForms.Renderers.Section.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000b] in :0 \n at (wrapper delegate-invoke) .invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)\n at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263 \n at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:338 \n at System.Collections.ObjectModel.ObservableCollection1[T].InsertItem (System.Int32 index, T item) [0x0001a] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:196 \n at System.Collections.ObjectModel.Collection1[T].Insert (System.Int32 index, T item) [0x00027] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:116 \n at Xamarin.Forms.TableSectionBase1[T].Insert (System.Int32 index, T item) [0x00000] in D:\\a\\1\\s\\Xamarin.Forms.Core\\TableSection.cs:81 \n at AiForms.Renderers.Section.ItemsChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x000c8] in <fc6990c546524f55bda3ede8ad1c52ea>:0 \n 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) [0x00120] in D:\\a\\1\\s\\Xamarin.Forms.Core\\BindableObject.cs:463 \n at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\\a\\1\\s\\Xamarin.Forms.Core\\BindableObject.cs:397 \n at Xamarin.Forms.Internals.TypedBinding2[TSource,TProperty].ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x0011b] in D:\a\1\s\Xamarin.Forms.Core\TypedBinding.cs:218 \n at Xamarin.Forms.Internals.TypedBinding2[TSource,TProperty].Apply (System.Boolean fromTarget) [0x0002e] in D:\\a\\1\\s\\Xamarin.Forms.Core\\TypedBinding.cs:108 \n at Xamarin.Forms.Internals.TypedBinding2+PropertyChangedProxy[TSource,TProperty].b__16_0 () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\TypedBinding.cs:277 \n at Xamarin.Forms.DispatcherExtensions.Dispatch (Xamarin.Forms.IDispatcher dispatcher, System.Action action) [0x00028] in D:\a\1\s\Xamarin.Forms.Core\DispatcherExtensions.cs:53 \n

Platforms

  • [ x] Android
  • iOS

Basic Information

  • AiForms.SettingsView 1.1.4-pre
  • Xamarin.Forms 4.5.0.396
@Jakar510
Copy link

I'm having this issue as well.

@muak
Copy link
Owner

muak commented May 27, 2020

@matteopiccioni
Thank you for your report.

I regret to say that I couldn't reproduce it.
This issue might have been fixed on ver 1.1.8-pre.

Please try 1.1.8-pre.

If not fixed, Could you show more detailed information?

Thanks.

@muak
Copy link
Owner

muak commented Jun 14, 2020

@matteopiccioni
@Jakar510

I fixed it.

Thanks.

@muak muak closed this as completed Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants