Skip to content

Layout Cycle Detected when a Flexlayout is inside a StackLayout on Windows #11909

Closed

Description

@YiannisBourkelis

Description

Having a FlexLayout inside a StackLayout is causing Visual Studio to detect a " Layout Cycle " and throw an exception.
The issue appears only when running on Windows. On iOS/Android/MacCatalyst it just loads an empty page.

To reproduce the issue run the attached reproducible project or simply paste this code in a page (Targeting Windows):

    <ContentPage.Content>
        <StackLayout>
            <FlexLayout>
                <Label Text="ok" />
            </FlexLayout>
        </StackLayout>
    </ContentPage.Content>

This is the error on Visual Studio:
layout_cycle_detected_issue

The error messages I got are two:

  1. A Cycle occurred while laying out the GUI
    Layout cycle detected. Layout could not complete

  2. Element not found

This issue might be related with #9905

Steps to Reproduce

Run the attached reproducible project and click on the "CLICK HERE ... " button

Link to public reproduction project repository

https://github.com/YiannisBourkelis/maui_issues/tree/main/src/LayoutCycleFlexLayoutIssue

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

Windows 10

Did you find any workaround?

No

Relevant log output

No response

Activity

  1. added
    t/bug
    on Dec 6, 2022
  2. added
    area-layout
    layout-flex
    on Dec 6, 2022
  3. added this to the Backlog milestone on Dec 7, 2022
  4. jsuarezruiz commented on Dec 7, 2022

    @jsuarezruiz
    Contributor

    Seems the same or similar to #9075

  5. added
    s/duplicate 2️⃣
    on Dec 7, 2022
  6. added a commit that references this issue on Feb 8, 2023
    39ba91c
  7. self-assigned this
    on Feb 8, 2023
  8. added a commit that references this issue on Feb 13, 2023
    9b59594
  9. 1 remaining item

  10. added a commit that references this issue on Feb 16, 2023
    6ee362f
  11. added a commit that references this issue on Feb 18, 2023
    445f9a9
  12. added a commit that references this issue on Feb 21, 2023
    1811f30
  13. added
    fixed-in-8.0.0-preview.1.7762
    on Feb 22, 2023
  14. modified the milestones: Backlog, 8.0-preview1 on Feb 22, 2023
  15. raylight75 commented on Feb 27, 2023

    @raylight75

    Not working flex out even with a simple List collection

  16. added
    fixed-in-7.0.81
    on Apr 12, 2023
  17. ghost locked as resolved and limited conversation to collaborators on May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-layoutfixed-in-7.0.100fixed-in-7.0.101fixed-in-7.0.81fixed-in-8.0.0-preview.1.7762layout-flexplatform/windowss/duplicate 2️⃣t/bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions