KEMBAR78
[iOS] CarouselView with CarouselViewHandler2 make app crash when Loop="False" and user scroll to the last position - fix by kubaflo · Pull Request #26868 · dotnet/maui · GitHub
Skip to content

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Dec 30, 2024

Issues Fixed

Fixes #26863

@rmarinho

@kubaflo kubaflo requested a review from a team as a code owner December 30, 2024 16:57
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 30, 2024
@dotnet-policy-service
Copy link
Contributor

Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks sensible, is it possible to add a test for this? I feel like a device test that just renders the CV should trigger this?

Can you set the position via code, or does the user have to scroll manually for this to occur?

@mattleibow
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 6, 2025

@mattleibow added :)

@rmarinho
Copy link
Member

rmarinho commented Jan 7, 2025

/azp run

@azure-pipelines

This comment was marked as outdated.

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems the test is failing

AppShouldNotCrashOnScrollingCarouselViewWithoutLoop

@kubaflo kubaflo force-pushed the CarouselView-with-CarouselViewHandler2-make-app-crash-when-Loop=-False-and-user-scroll-to-the-last-position- branch from 0cf6808 to a913297 Compare January 7, 2025 17:23
@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 7, 2025

@rmarinho can we try again?

@jfversluis jfversluis added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jan 9, 2025
@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@CleverSoftwarePoland

This comment was marked as off-topic.

@bcaceiro

This comment was marked as off-topic.

@Bamich
Copy link

Bamich commented Mar 25, 2025

This also fixes phantom items in carousel with 1-2 elements when loop = false

(without the fix, the binded items are followed by their "broken" clones at the end of the carousel)

@CleverSoftwarePoland
Copy link

Also facing this issue. Cannot use the CarouselViewHandler2 (and .net10 is coming and it will be the default)

Did you find any workaround?

@kubaflo
Copy link
Contributor Author

kubaflo commented Mar 25, 2025

Hi! @CleverSoftwarePoland, I don't know when it will make it into release but you can ask @rmarinho

@CleverSoftwarePoland
Copy link

Any plans to try again to pass tests or we have to search for other solution? As right now CarouselViewHandler2 is broken when set to loop = false
@jfversluis @rmarinho

@jfversluis jfversluis added this to the .NET 9 SR6 milestone Mar 28, 2025
@jfversluis jfversluis removed this from the .NET 9 SR6 milestone Mar 28, 2025
@seanrodda
Copy link

@rmarinho @jfversluis
What's needed to get this in the next release? I'm happy to help. Do you think it will be in .NET 9 SR7 ?

@jfversluis
Copy link
Member

@seanrodda what is always useful is to test the changes in a PR and let us know if that resolves your issue. Instructions for that can be found here: https://github.com/dotnet/maui/wiki/Testing-PR-Builds

@seanrodda
Copy link

@jfversluis Thanks. The build doesn't exist on the build pipeline from the PR, however I have copied the code changes for the change locally and can confirm it fixes the crash when loop = false fixes the phantom items issue @Bamich mentioned above.

@kubaflo kubaflo self-assigned this Apr 28, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR7, .NET 9 SR8 May 8, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR8, .NET 9 SR9 Jun 9, 2025
@PureWeen PureWeen dismissed rmarinho’s stale review June 9, 2025 19:51

Changes Made

@PureWeen PureWeen changed the base branch from main to inflight/current June 9, 2025 19:51
@PureWeen PureWeen merged commit 42ca2bd into dotnet:inflight/current Jun 9, 2025
102 of 104 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Jun 9, 2025
github-actions bot pushed a commit that referenced this pull request Jun 10, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
kubaflo added a commit to kubaflo/maui that referenced this pull request Jun 11, 2025
…="False" and user scroll to the last position - fix (dotnet#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
github-actions bot pushed a commit that referenced this pull request Jun 11, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
github-actions bot pushed a commit that referenced this pull request Jun 16, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
PureWeen pushed a commit that referenced this pull request Jun 21, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
PureWeen pushed a commit that referenced this pull request Jun 25, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
PureWeen pushed a commit that referenced this pull request Jun 25, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
github-actions bot pushed a commit that referenced this pull request Jun 26, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
github-actions bot pushed a commit that referenced this pull request Jun 26, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
PureWeen pushed a commit that referenced this pull request Jun 27, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
github-actions bot pushed a commit that referenced this pull request Jun 27, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
PureWeen pushed a commit that referenced this pull request Jun 27, 2025
…="False" and user scroll to the last position - fix (#26868)

* Update CarouselViewController2.cs

* Added a UI test for Matt
PureWeen added a commit that referenced this pull request Jun 28, 2025
For more information about inflight process check
https://github.com/dotnet/maui/wiki/Inflight-Branch-Process

# .NET MAUI Release Notes - Inflight/Candidate Branch

## What's Changed

### MAUI Product Fixes
* [iOS] CarouselView with CarouselViewHandler2 make app crash when
Loop="False" and user scroll to the last position - fixes #26863 by
@kubaflo in #26868
* Fixes Setting BackgroundColor to null does not actually changes
BackgroundColor - fixes #22914 and #19576 by @jgonzalez-gft in
#22917
* Fixed the picker title's color - fixes #16737 by @kubaflo in
#23075
* [android] Fallback to default icons in SearchHandler by @aheubusch in
#25067
* ScrollView's Background on iOS - fixes #24016 by @kubaflo in
#25541
* [iOS] Enabled MultiTouch Support for Handling Multi-Touch Points in
GraphicsView - fixes #29461 by @prakashKannanSf3972 in
#29895
* Optimize converters for GridLength, ColumnDefinition, and
RowDefinition - performance improvement by @emiller in
#20048
* Add defensive IsAlive check to Android ViewExtensions.OnUnloaded -
fixes #28051 by @jfversluis in #29934
* [Windows] Fixed runtime update issue for SearchBar PlaceholderColor
and BackgroundColor - fixes #29962 by @Tamilarasan-Paranthaman in
#29965
* Weak subscription to CanExecuteChange events - fixes #16124 by
@sneumaier in #29837
* [iOS, Mac] Fix for downsized image retaining original dimensions in
GraphicsView - fixes #30006 by @SyedAbdulAzeemSF4852 in
#30007
* [Android] Prevent Picker from Gaining Focus on Touch - fixes #19739,
#8546, #13503, #24862, #28121, #21704, #15394 by @bhavanesh2001 in
#29068
* Fix CV1 GridItemsLayout centering single item AND Fix Empty view not
resizing when bounds change - fixes #29595, #29634 by @albyrock87 in
#29639

### Testing
* [Testing] Feature Matrix UITest Cases for Button by @TamilarasanSF4853
in #29803
* [Testing] Feature matrix UITest Cases for BoxView Control by
@HarishKumarSF4517 in #29808
* [Testing] Enable HandlerDoesNotLeak for Button and ProgressBar by
@bhavanesh2001 in #29896
* [Testing] Add Validation Test For Issue28051 On Android by
@prakashKannanSf3972 in #30026
* [Testing] Fixed Test case failure in PR 30115 - [2025/06/23] Candidate
by @HarishKumarSF4517 in #30136

### Dependency Updates
* Bump to 1.7.250606001 of WindowsAppSDK by @sneumaier in
#29915

### Housekeeping
* [housekeeping] Update namespaces in HostApp and Shared tests projects
by @bhavanesh2001 in #29904
* Update SetterSpecificity.cs Remove Extra Line From Bad Merge by
@sneumaier in #29987
* Revert - Fixed the Label not sized correctly on Android by @Ahamed-Ali
in #30023
* Revert "Fixes Setting BackgroundColor to null does not actually
changes BackgroundColor #22914 (#22917)" by @mattleibow in
#30031
* [create-pull-request] automated change by @github-actions[bot] in
#30019
* [create-pull-request] automated change by @github-actions[bot] in
#30043
* [create-pull-request] automated change by @github-actions[bot] in
#30078
* Update Controls.TestCases.HostApp.csproj by @HarishKumarSF4517 in
#30124

## New Contributors
* @albyrock87 made their first contribution in
#29639
* @SyedAbdulAzeemSF4852 made their first contribution in
#30007
* @emiller made their first contribution in
#20048
* @jgonzalez-gft made their first contribution in
#22917
* @aheubusch made their first contribution in
#25067

**Full Changelog**:
https://github.com/dotnet/maui/compare/main..inflight/candidate
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[iOS] CarouselView with CarouselViewHandler2 make app crash when Loop="False" and user scroll to the last position

9 participants