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

[Bug] iOS Crash GroupFooterTemplate on CollectionView with Grouping #15393

Closed
sesitosvdx opened this issue Jun 1, 2023 · 4 comments
Closed
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working

Comments

@sesitosvdx
Copy link

sesitosvdx commented Jun 1, 2023

Description

Having a CollectionView with IsGrouped=True and add the GroupFooterTemplate with any Templatel that has a visibility binding or a dynamic changing makes it crash with the folllowing error:

An error occurred: 'Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: UICollectionView (<UICollectionView 0x114fe0000>) is stuck in its update/layout loop. This can happen for various reasons, including self-sizing views whose preferred attributes are not returning a consistent size. To debug this issue, check the Console app for logs in the "UICollectionViewRecursion" category. In particular, look for messages about layout invalidations, or changes to properties like contentOffset (bounds.origin), bounds.size, frame, etc. Native stack trace:

I was only able to reproduce it on certain iOS devices (not iPhone 6 SE, but yes on iPhone 12 Pro Max and iPhone 14 Pro Max). Couldn't reproduce it on any simulator.

Setting a HeightRequest does not fix it.

Steps to Reproduce

  1. You can use the maui-samples repo and edit any CollectionView example that uses GroupFooterTemplate with some Template that has a visibility binding with some logic that, e.g. changes if it's the first item
  2. It crashed on appearing.

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS

Did you find any workaround?

No

Relevant log output

No response

@sesitosvdx sesitosvdx added the t/bug Something isn't working label Jun 1, 2023
@Eilon Eilon added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jun 1, 2023
@MitchBomcanhao
Copy link

MitchBomcanhao commented Jun 2, 2023

We're still on xamarin forms but we've got an increasing number of crash groups that relate to NSInternalInconsistencyException and grouped listviews - Likely to be related to the same problem in the underlying platform. if this is investigated in maui, it probably needs backporting to xamarin forms too. though, admittedly, we're not seeing the same exception messages as on this particular bug report.

@moneosi
Copy link

moneosi commented Jul 13, 2023

Hello guys today I had this issue when work with grouped dates in collectionview. There any resolution? Or any future release with fix.

  • Thanks

@Zhanglirong-Winnie Zhanglirong-Winnie added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Jan 24, 2024
@ghost
Copy link

ghost commented Jan 24, 2024

Hi @sesitosvdx. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

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.

@Zhanglirong-Winnie
Copy link

Verified this issue with Visual Studio for Mac 17.6.8. Not repro with maui-samples/8.0/UserInterface/Views/CollectionViewDemos at main · dotnet/maui-samples (github.com) project.

@ghost ghost closed this as completed Jan 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants