Bug 43426 - ListView OnItemClick ArgumentOutOfRangeException
Summary: ListView OnItemClick ArgumentOutOfRangeException
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
Depends on:
Reported: 2016-08-16 17:59 UTC by Pete Schmitz
Modified: 2017-06-19 18:42 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Pete Schmitz 2016-08-16 17:59:57 UTC
We have a few users running into this exception. It appears related to tapping on an item of a listview and being unable to resolve the underlying binding object.


System.Collections.Generic.List<T>.get_Item(int index)
System.Collections.ObjectModel.Collection<T>.get_Item(int index)
Xamarin.Forms.ListProxy.TryGetValue(int index, ref object value)
Xamarin.Forms.ListProxy.get_Item(int index)
Xamarin.Forms.TemplatedItemsList<TView, TItem>.get_Item(int index)
Xamarin.Forms.ListView.NotifyRowTapped(int groupIndex, int inGroupIndex, Cell cell)
Xamarin.Forms.ListView.NotifyRowTapped(int index, Cell cell)
Xamarin.Forms.Platform.Android.ListViewAdapter.HandleItemClick(AdapterView parent, View view, int position, long id)
Xamarin.Forms.Platform.Android.CellAdapter.OnItemClick(AdapterView parent, View view, int position, long id)
Android.Widget.AdapterView.IOnItemClickListenerInvoker.n_OnItemClick_Landroid_widget_AdapterView_Landroid_view_View_IJ(IntPtr jnienv, IntPtr native__this, IntPtr native_parent, IntPtr native_view, int position, long id)
at (wrapper dynamic-method) System.Object:e3e592cc-316c-414c-ba5d-79cae0684334 (intptr,intptr,intptr,intptr,int,long)
Comment 1 E.Z. Hart [MSFT] 2016-08-17 22:08:32 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue, we would very much appreciate it.

For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,

Xamarin Forms Team
Comment 2 Samantha Houts [MSFT] 2017-06-19 18:42:33 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!