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.21k stars 1.75k forks source link

[Windows] System.Runtime.InteropServices.COMException raised when changing the items source for Indicator view with DateTemplate #24732

Open NanthiniMahalingam opened 1 month ago

NanthiniMahalingam commented 1 month ago

Description

IndicatorView with DataTemplate (custom image) raised the exception When dynamically changing the items source which contains the count exceed the existing items source count.

Steps to Reproduce

  1. Run the sample
  2. Click on Change Source button
  3. Ensure exception raised or not.

image

Link to public reproduction project repository

https://github.com/msivers/Maui-IndicatorView-Issue

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 1 month 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:

Closed similar issues:

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

ninachen03 commented 1 month ago

I can repro this issue at windows platform on the latest 17.12.0 Preview 1.0(8.0.82 & 8.0.3). image below is call stack

TestCarouselView.dll!TestCarouselView.MainPage.Images.set(System.Collections.Generic.IReadOnlyList value) Line 32 C# TestCarouselView.dll!TestCarouselView.MainPage.OnChangeSourceClicked(object sender, System.EventArgs e) Line 50 C#

mattleibow commented 1 month ago

Is there more detail in the Data property of the exception?

This feels like some sort of issue where it is trying to add a view to a new parent when it is still attached to an old parent... Maybe not, but feels like it.