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

System.IndexOutOfRangeException: IItemsViewSource is empty #25357

Open
LeoJHarris opened this issue Oct 17, 2024 · 3 comments
Open

System.IndexOutOfRangeException: IItemsViewSource is empty #25357

LeoJHarris opened this issue Oct 17, 2024 · 3 comments
Labels
platform/iOS 🍎 s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working

Comments

@LeoJHarris
Copy link

LeoJHarris commented Oct 17, 2024

Description

iOS issue whereby the ItemsSource seems to be empty from the UI but I have added a few checks against empty ItemsSource from the MVVM when trying to access indexes of the ItemsSource. For the same source code Android never has the issue.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.92 SR9.2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15

Did you find any workaround?

No

Relevant log output

System.IndexOutOfRangeException: IItemsViewSource is empty
at Microsoft.Maui.Controls.Handlers.Items.EmptySource.get_Item(NSIndexPath indexPath)
at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateTemplatedCell(TemplatedCell cell, NSIndexPath indexPath) at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].GetCell(UICollectionView collectionView, NSIndexPath indexPath)
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 61

@LeoJHarris LeoJHarris added the t/bug Something isn't working label Oct 17, 2024
@LeoJHarris
Copy link
Author

Seems to be similar to #11666

@Zhanglirong-Winnie
Copy link

Could you provide us with a sample project so we can investigate it further? Looking forward to your reply!

@PureWeen PureWeen added the s/needs-repro Attach a solution or code which reproduces the issue label Oct 18, 2024
Copy link
Contributor

Hi @LeoJHarris. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/iOS 🍎 s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants