Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android][CollectionView]Crash when quickly clicking to delete item #22674

Closed
BaY1251 opened this issue May 28, 2024 · 2 comments · Fixed by #22676
Closed

[Android][CollectionView]Crash when quickly clicking to delete item #22674

BaY1251 opened this issue May 28, 2024 · 2 comments · Fixed by #22676
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@BaY1251
Copy link
Contributor

BaY1251 commented May 28, 2024

Description

I test with the latest nightly build,still has this issue.
This seems to be an exception caused by a BindingAdapterPosition of -1.

Steps to Reproduce

Download https://github.com/BaY1251/MauiDebug.git

  1. Open /BindingAdapterPositionException/BindingAdapterPositionException.sln
  2. deployment the project
  3. Quick click on CollectionView items
  4. Crash

Link to public reproduction project repository

https://github.com/BaY1251/MauiDebug.git

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android7.1

Did you find any workaround?

No response

Relevant log output

System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')'

 	0xFFFFFFFFFFFFFFFF in Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception	C#
 	0x1A in Android.Runtime.JNINativeWrapper._unhandled_exception at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:12,5	C#
 	0x1E in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:122,26	C#
 	0x8 in System.ThrowHelper.ThrowArgumentOutOfRange_IndexMustBeLessException	C#
 	0x9 in System.Collections.Generic.List<object>.get_Item	C#
 	0x2 in System.Collections.Generic.List<object>.System.Collections.IList.get_Item	C#
 	0x11 in Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.ElementAt at /_/src/Controls/src/Core/Handlers/Items/Android/ItemsSources/ObservableItemsSource.cs:232,5	C#
 	0x8 in Microsoft.Maui.Controls.Handlers.Items.ObservableItemsSource.GetItem at /_/src/Controls/src/Core/Handlers/Items/Android/ItemsSources/ObservableItemsSource.cs:71,4	C#
 	0x7 in Microsoft.Maui.Controls.Handlers.Items.UngroupedItemsSource.GetItem at /_/src/Controls/src/Core/Handlers/Items/Android/ItemsSources/UngroupedItemsSource.cs:54,4	C#
 	0x3D in Microsoft.Maui.Controls.Handlers.Items.SelectableItemsViewAdapter<Microsoft.Maui.Controls.ReorderableItemsView,Microsoft.Maui.Controls.Handlers.Items.IGroupableItemsViewSource>.UpdateMauiSelection at /_/src/Controls/src/Core/Handlers/Items/Android/Adapters/SelectableItemsViewAdapter.cs:139,6	C#
 	0x2 in Microsoft.Maui.Controls.Handlers.Items.SelectableItemsViewAdapter<Microsoft.Maui.Controls.ReorderableItemsView,Microsoft.Maui.Controls.Handlers.Items.IGroupableItemsViewSource>.SelectableClicked at /_/src/Controls/src/Core/Handlers/Items/Android/Adapters/SelectableItemsViewAdapter.cs:126,4	C#
 	0xD in Microsoft.Maui.Controls.Handlers.Items.SelectableViewHolder.OnViewHolderClicked at /_/src/Controls/src/Core/Handlers/Items/Android/SelectableViewHolder.cs:59,4	C#
 	0xF in Microsoft.Maui.Controls.Handlers.Items.SelectableViewHolder.OnClick at /_/src/Controls/src/Core/Handlers/Items/Android/SelectableViewHolder.cs:47,5	C#
 	0x11 in Android.Views.View.IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Views.View.cs:2374,5	C#
 	0x9 in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:121,5	C#
@BaY1251 BaY1251 added the t/bug Something isn't working label May 28, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 28, 2024
@RoiChen001
Copy link

Can repro this issue at Android platform on the latest 17.11.0 Preview 1.0(8.0.21/8.0.40)

@Eilon Eilon added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label May 28, 2024
@PureWeen PureWeen self-assigned this May 30, 2024
@PureWeen PureWeen added this to the .NET 8 SR7 milestone May 31, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@PureWeen PureWeen modified the milestones: .NET 8 SR7, .NET 8 SR8, .NET 8 SR9 Aug 2, 2024
@PureWeen PureWeen modified the milestones: .NET 8 SR9, .NET 9 SR1 Oct 1, 2024
@PureWeen PureWeen modified the milestones: .NET 9 SR1, .NET 9 Servicing Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants