KEMBAR78
[Windows] Fix crash using SwipeView inside CollectionView by jsuarezruiz · Pull Request #6220 · dotnet/maui · GitHub
Skip to content

Conversation

@jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Apr 19, 2022

Description of Change

Fix crash using SwipeView inside CollectionView on Windows.

Issues Fixed

Fixes #6153
Fixes #6401

bool CanMeasureContent(FrameworkElement frameworkElement)
{
// Measure the SwipeControl before has loaded causes a crash on the first layout pass
if (frameworkElement is SwipeControl swipeControl && !swipeControl.IsLoaded)
Copy link
Member

Choose a reason for hiding this comment

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

Is this exclusive to SwipeControl? Should this just check for a Control that IsLoaded ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A far as I reviewed cannot Measure the SwipeControl with left or right items before is loaded, but, not happens in the rest of the controls.

@LanceMcCarthy
Copy link

Looking forward to this fix! Thanks Javier.

@Redth Redth merged commit c785ec6 into main Apr 25, 2022
@Redth Redth deleted the fix-6153 branch April 25, 2022 19:37
@SamuelJames101
Copy link

SamuelJames101 commented Jun 26, 2023

What .net Version did this come into? As I am using .net 7.0.3 and I can still see the exception on Windows
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'" when I have a swipe view in the XAML @jsuarezruiz

@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-swipeview SwipeView fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/windows t/bug Something isn't working

Projects

None yet

5 participants