Closed stesvis closed 4 years ago
It still crashes on me like this:
Device.BeginInvokeOnMainThread(() => Vehicles.Remove(vehicleToRemove));
@stesvis Can you please attach a small project that demonstrates this issue? Thanks!
Hello @samhouts can you try the one I have attached? After log in, go to the Inventory tab, click one of the camera icons and scan this barcode:
levitica-organeyes-scanner-6536d4cb0ca4.zip
It crashes on:
Device.BeginInvokeOnMainThread(() =>
{
// clear the list and only add the one found
InventoryItems.Clear();
InventoryItems.Add(item);
});
Please try with version 4.3.0.991221 released two days ago. In my case, this solves the issue.
Can you let us know if what @dblookup says is correct @stesvis ?
Can you test this with the latest 4.4 pre and/or nightly? https://github.com/xamarin/Xamarin.Forms/wiki/Nightly-Builds
@stesvis Since we haven't heard from you in more than 30 days, we hope this issue is no longer affecting you. If it is, please reopen this issue and provide the requested information so that we can look into it further. Thank you!
Description
I get an exception when I use
.Remove(item)
on the ItemsSource of a CollectionView.Steps to Reproduce
<CollectionView ItemsSource="{Binding Vehicles}">
Vehicles.Remove(vehicleToRemove);
Expected Behavior
Actual Behavior
System.ObjectDisposedException Message=Cannot access a disposed object. Object name: 'Xamarin.Forms.Platform.Android.GroupableItemsViewAdapter`2[[Xamarin.Forms.GroupableItemsView, Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null],[Xamarin.Forms.Platform.Android.IGroupableItemsViewSource, Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
Basic Information