Bug 27663 - [Android] ListView Header Crashes On Tap
Summary: [Android] ListView Header Crashes On Tap
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.0
Hardware: Macintosh Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-04 15:02 UTC by Drew Frisk
Modified: 2015-03-06 02:06 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Drew Frisk 2015-03-04 15:02:58 UTC
When implementing a custom view on the ListView.Header property, the app will crash when tapping on the view that is rendered in the list.

Replicate: Create a new ListView with Xamarin.Forms and set the header property to any view. Run/debug the application, navigate to the page with the list view and tap on the header item. The app will crash.

An associated stack trace:

[ArgumentOutOfRangeException: Argument is out of range. Parameter name: index]
    at System.Collections.Generic.List`1<Bhtp.Mobile.ViewModels.CoverageViewModel>.get_Item (int) <0x0007c>
    at System.Collections.ObjectModel.Collection`1<Bhtp.Mobile.ViewModels.CoverageViewModel>.System.Collections.IList.get_Item (int) <0x00083>
    at Xamarin.Forms.ListProxy/<>c__DisplayClass4.<TryGetValue>b__0 () <IL 0x0003f, 0x000ef>
    at Xamarin.Forms.ListProxy.TryGetValue (int,object&) <IL 0x00078, 0x003d7>
    at Xamarin.Forms.ListProxy.get_Item (int) <IL 0x00004, 0x0005b>
    at Xamarin.Forms.TemplatedItemsList`2<Xamarin.Forms.ItemsView`1<Xamarin.Forms.Cell>, Xamarin.Forms.Cell>.get_Item (int) <0x0007f>
    at Xamarin.Forms.ListView.NotifyRowTapped (int,int) <IL 0x00036, 0x00183>
    at Xamarin.Forms.ListView.NotifyRowTapped (int) <IL 0x00025, 0x0014b>
    at Xamarin.Forms.Platform.Android.ListViewAdapter.OnItemClick (Android.Widget.AdapterView,Android.Views.View,int,long) <IL 0x0001b, 0x000cb>
    Android.Widget.AdapterView/IOnItemClickListenerInvoker.n_OnItemClick_Landroid_widget_AdapterView_Landroid_view_View_IJ(intptr,intptr,intptr,intptr,int,long) in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/49a04b96/source/monodroid/src/Mono.Android/platforms/android-18/src/generated/Android.Widget.AdapterView.cs:194
    at (wrapper dynamic-method) object.de040d46-6094-4bbd-b110-cd0fe5ad8a28 (intptr,intptr,intptr,intptr,int,long) <IL 0x00029, 0x0009b>
Comment 1 Jason Smith [MSFT] 2015-03-06 02:06:46 UTC
Should be fixed in 1.4.0-pre2