We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

System.ArgumentOutOfRangeException when ItemSource has no items

Thread ID:

Created:

Updated:

Platform:

Replies:

125657 Aug 31,2016 01:41 PM UTC Oct 18,2016 05:44 AM UTC Xamarin.Forms 3
loading
Tags: SfRotator
Giorgos Papadakis
Asked On August 31, 2016 01:41 PM UTC

when my observable collection is empty the app crashes and i get

var thumbs = await _dataClient.GetThumbNails("ivitem", _item.code);
AttachmentThumbs = new ObservableCollection<AttachmentThumb>(thumbs); //AttachmentThumbs has zero items

Error:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index

08-31 16:36:44.626 I/MonoDroid(32104): UNHANDLED EXCEPTION:
08-31 16:36:44.626 I/MonoDroid(32104): System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
08-31 16:36:44.626 I/MonoDroid(32104): Parameter name: index
08-31 16:36:44.626 I/MonoDroid(32104):   at (wrapper dynamic-method) System.Object:a958ace6-0f30-46a9-b4ec-1d61d950373e (intptr,intptr,intptr,int)
08-31 16:36:44.626 I/MonoDroid(32104):   at (wrapper native-to-managed) System.Object:a958ace6-0f30-46a9-b4ec-1d61d950373e (intptr,intptr,intptr,int)
08-31 16:36:44.626 I/MonoDroid(32104):   at (wrapper managed-to-native) Java.Interop.NativeMethods:java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*)
08-31 16:36:44.626 I/MonoDroid(32104):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (JniObjectReference instance, JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0008f] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12079 
08-31 16:36:44.626 I/MonoDroid(32104):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00022] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:41 
08-31 16:36:44.626 I/MonoDroid(32104):   at Android.Views.ViewGroup.Layout (Int32 l, Int32 t, Int32 r, Int32 b) [0x00055] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.ViewGroup.cs:3188 
08-31 16:36:44.626 I/MonoDroid(32104):   at Xamarin.Forms.Platform.Android.ViewRenderer`2[TView,TNativeView].OnLayout (Boolean changed, Int32 l, Int32 t, Int32 r, Int32 b) [0x00059] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\ViewRenderer.cs:132 
08-31 16:36:44.626 I/MonoDroid(32104):   at Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (IntPtr jnienv, IntPtr native__this, Boolean p0, Int32 p1, Int32 p2, Int32 p3, Int32 p4) [0x00008] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:240 
08-31 16:36:44.626 I/MonoDroid(32104):   at (wrapper dynamic-method) System.Object:8f29c273-89f2-4ac4-b79f-1cc7fe1f46d1 (intptr,intptr,bool,int,int,int,int)

Hemalatha Marikumar [Syncfusion]
Replied On September 1, 2016 12:04 PM UTC

Hi Giorgos Papadakis,

Thanks for contacting Syncfusion Support.

We were able to reproduce the issue "Rotator gets crash with empty collection in ItemSource". A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/

Regards,
Hemalatha M.R.

Rik Dekkers
Replied On October 17, 2016 01:41 PM UTC

Hi

Looks like I have te same issue. Is there already an update on the issue or do I need to create a support incident also?

Thanks

Hemalatha Marikumar [Syncfusion]
Replied On October 18, 2016 05:44 AM UTC

Hi Rik Dekkers,

Thanks for contacting Syncfusion Support.

We have already been fixed the reported issue " Getting ArgumentOutOfRangeException in SfRotator control”. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/

Regards,
Hemalatha M.R.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;