dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.27k stars 1.76k forks source link

[MAUI][iOS18.0][macOS15.0] I6 & I9 - Clicking on some pages will throw an exception. #24838

Closed Zhanglirong-Winnie closed 3 weeks ago

Zhanglirong-Winnie commented 2 months ago

Description

I6 & I9 - Clicking on some pages will throw an exception. Note: This issue seems to have nothing to do with the MAUI control version, but is related to the iOS simulator. The iOS17.5 simulator does not repro this issue. Affected case: I6 - Grouping Vertical list with DataTemplates I6 - Grouping including empty groups for Vertical list with DataTemplates. I6 - Grouping with variable sized items for Vertical list with DataTemplates. I6 - Grouping with GridItemsLayouts for Vertical list with GridItemsLayout.VerticalItemSpacing. I9 -Scroll by index for grouped data. I9 -Scroll by object for grouped data.

Steps to Reproduce

  1. Install Xcode16.0 + Sonoma (macOS 14.5+)
  2. Deploy https://devdiv.visualstudio.com/Pkgs/_git/VS.TestAssets.Xaml?path=/Assets/Projects/ManualMauiTests to iOS 18.0 simulator.
  3. Navigate to 'I9_Scrolling'-> Click 'Scroll by index for grouped data' or 'Scroll by object for grouped data'
  4. Observe that the exception is thrown

Actual Behavior: The page throws an exception: ObjCRuntime.ObjCException: 'Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single image

Expected Behavior: The page displays normally and no exception is thrown.

Link to public reproduction project repository

https://devdiv.visualstudio.com/Pkgs/_git/VS.TestAssets.Xaml?path=/Assets/Projects/ManualMauiTests

Version with bug

Microsoft.Maui.Controls 8.0.82

Is this a regression from previous behavior?

Not a regression, the issue also repro on 8.0.90 & 8.0.72 & 8.0.3.

Affected platforms

iOS

github-actions[bot] commented 2 months ago

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:

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

tj-devel709 commented 2 months ago

I believe it is expected that there will be exceptions with Xcode 16 currently until support lands in November. https://github.com/dotnet/maui/issues/24819.

Perhaps this issue can be closed for now and reopened later when support is added if this is still an issue, or can be left here brought back up in November, thanks!

QianaJiao commented 2 months ago

As for debug on MacCatalyst, this issue also repro on MacOS Sequoia 15.0, not repro on Mac Sonoma 14.6.1

Zhanglirong-Winnie commented 1 month ago

This issue does not reproduce on Xcode16 iOS18 Microsoft.Maui.Controls 8.0.99-ci.net8.24509.1.

jfversluis commented 3 weeks ago

@Zhanglirong-Winnie can you try again with the latest available versions please? Thanks!

Zhanglirong-Winnie commented 3 weeks ago

Hi, @jfversluis Verify this issue does not reproduce on Xcode16 iOS18 Microsoft.Maui.Controls 8.0.92.

jfversluis commented 3 weeks ago

OK Seems like this is fixed then, thank you!