## ArgumentOutOfRangeException in listview with ObservableCollection async updates

_Submitted by a community member on 2017-10-05 05:19 UTC_

I started to search the reason of my NSInternalInconsistencyException on listview updates. And found this bug. I actually think that they are both happens from the same reason. But with this repro i can reliably rise only ArgumentOutOfRangeException.

So what you need is to bind some listview to observableCollection and remove/add items in that collection asynchronously. What i found is that if you add some elements from one thread and remove them from different thread quickly enought, app crashes. 

Reproducible both on iOS and Android. iOS is very reliable crash with add-remove interval less than 100ms. Android is quite rare: every 50ms add and every 51ms remove gives crash on 55+ iteration.

That all lead to crashes when your listview is updates from events.

* * *

_Xamarin Bugzilla comment 1 by Paul DiPietro [MSFT] [MSFT] on 2017-10-06 17:45 UTC_

Thanks for the reproduction project; will set to confirmed for now until further investigation can be made.

* * *

_Xamarin Bugzilla comment 2 by a community member on 2017-11-21 08:20 UTC_

still crashes with

still cannot update listview from events

* * *

_Xamarin Bugzilla comment 3 by Shane Neuville [MSFT] on 2018-05-03 01:40 UTC_

This looks like it's fixed in 3.0 pre4

* * *

<br />

_Reference: <https://bugzilla.xamarin.com/show_bug.cgi?id=59974>_