Description
This bug occurs for Collection View control. The bug occurs randomly, it is difficult to make the bug appear because the rate is low. This bug has existed for a long time.
Below is the log track:
System.Collections.Generic.List1[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Item(Int32 ) System.Collections.Generic.List1[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].System.Collections.IList.get_Item(Int32 )
Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.ElementAt(Int32 index)
Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.GetItem(Int32 position)
Microsoft.Maui.Controls.Handlers.Items.UngroupedItemsSource.GetItem(Int32 position)
Microsoft.Maui.Controls.Handlers.Items.SelectableItemsViewAdapter2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Handlers.Items.IGroupableItemsViewSource, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateMauiSelection(Int32 adapterPosition) Microsoft.Maui.Controls.Handlers.Items.SelectableItemsViewAdapter2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Handlers.Items.IGroupableItemsViewSource, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SelectableClicked(Object sender, Int32 adapterPosition)
Microsoft.Maui.Controls.Handlers.Items.SelectableViewHolder.OnViewHolderClicked(Int32 adapterPosition)
Microsoft.Maui.Controls.Handlers.Items.SelectableViewHolder.OnClick(View view)
Android.Views.View.IOnClickListenerInvoker.n_OnClick_Landroid_view_View_(IntPtr jnienv, IntPtr native__this, IntPtr native_v)
Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0)
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.12 SR1.2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
This pull seems to have fixed it but is not updated in .NET 9.0:
#22676
Relevant log output
Description
This bug occurs for Collection View control. The bug occurs randomly, it is difficult to make the bug appear because the rate is low. This bug has existed for a long time.
Below is the log track:
System.Collections.Generic.List
1[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Item(Int32 ) System.Collections.Generic.List1[[System.Object, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].System.Collections.IList.get_Item(Int32 )Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.ElementAt(Int32 index)
Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.GetItem(Int32 position)
Microsoft.Maui.Controls.Handlers.Items.UngroupedItemsSource.GetItem(Int32 position)
Microsoft.Maui.Controls.Handlers.Items.SelectableItemsViewAdapter
2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Handlers.Items.IGroupableItemsViewSource, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateMauiSelection(Int32 adapterPosition) Microsoft.Maui.Controls.Handlers.Items.SelectableItemsViewAdapter2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Controls.Handlers.Items.IGroupableItemsViewSource, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SelectableClicked(Object sender, Int32 adapterPosition)Microsoft.Maui.Controls.Handlers.Items.SelectableViewHolder.OnViewHolderClicked(Int32 adapterPosition)
Microsoft.Maui.Controls.Handlers.Items.SelectableViewHolder.OnClick(View view)
Android.Views.View.IOnClickListenerInvoker.n_OnClick_Landroid_view_View_(IntPtr jnienv, IntPtr native__this, IntPtr native_v)
Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0)
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.12 SR1.2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
This pull seems to have fixed it but is not updated in .NET 9.0:
#22676
Relevant log output