Bug 59412 - Xamarin.Forms iOS ListView crash System.ArgumentOutOfRangeExceptionSpecified argument was out of the range of valid values. Parameter name: index
Summary: Xamarin.Forms iOS ListView crash System.ArgumentOutOfRangeExceptionSpecified ...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.4
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
: 59767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-12 09:45 UTC by y.vinee
Modified: 2017-10-20 02:21 UTC (History)
4 users (show)

See Also:
Tags: listview, outofrange, hasunevenrows, ac
Is this bug a regression?: ---
Last known good build:


Attachments

Description y.vinee 2017-09-12 09:45:48 UTC
# Steps to reproduce
Create a NavigationPage
Push a ContentPage with a ListView with:
IsGroupingEnabled="True"
HasUnevenRows="true" 
Bind a Group with Items on the listview
Push a ContentPage with a button which removes an item of the ItemsSource on ItemTapped
Rotate the iPhone
Click to the button to remove the item
Crash System.ArgumentOutOfRangeExceptionSpecified argument was out of the range of valid values. Parameter name: index

Here is a project to reproduce the bug:
https://www.dropbox.com/sh/f6haevanl7xbd9i/AACd5uyCDKxB8MawTxBvz4iDa?dl=0


# Expected behavior
Remove the item without crash

# Actual behavior
Crash 

# Supplemental info (logs, images, videos)
if HasUnevenRows="false" then there is no crash

# Test environment (full version information)
Crash with Xamarin.Forms 2.3.4.270
Comment 1 Paul DiPietro [MSFT] 2017-09-14 00:30:01 UTC
Thank you for the reproduction. Also tested against 2.4.0-pre2.
Comment 2 Paul DiPietro [MSFT] 2017-09-26 18:44:55 UTC
*** Bug 59767 has been marked as a duplicate of this bug. ***
Comment 3 Wallace Santos 2017-09-26 19:10:10 UTC
In my app, even with HasUnevenRows="false" crashes.
Comment 4 Wallace Santos 2017-10-05 12:35:20 UTC
Hi Guys, 

Just to help, apparently using an ObservableColletion to fill list solves the problem. I did some tests here and worked fine. Please, evaluate there and if possible confirm to us.
Comment 5 Justin 2017-10-20 02:21:34 UTC
We're using ObservableCollections throughout our app and are still hitting this error intermittently.

Note You need to log in before you can comment on or make changes to this bug.