Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-time panic when declaring non-sensical layout constraint #257

Closed
tronical opened this issue Jun 8, 2021 · 3 comments
Closed

run-time panic when declaring non-sensical layout constraint #257

tronical opened this issue Jun 8, 2021 · 3 comments
Labels
a:layouts Related to the layouting and positioning of the elements (mO,bT) bug Something isn't working

Comments

@tronical
Copy link
Member

tronical commented Jun 8, 2021

The following test case is the result of reducing a larger (valid) design where a width was applied to a vertical layout, which in turn is in a horizontal layout, nested in more layouts.

export TestCase := Rectangle {
    VerticalLayout {
        HorizontalLayout {
            VerticalLayout {
                width: parent.width;
                Rectangle {}
            }
        }
    }
}

This produces the Recursion detected panic in the property system.

Ideally the compiler should detect this circular dependency.

@tronical tronical added the bug Something isn't working label Jun 8, 2021
ogoffart added a commit that referenced this issue Jun 18, 2021
@ogoffart
Copy link
Member

This no longer call a runtime panic.

But if we preview that, there is a loop that makes the window grow endlessly.
That's because the compile-time loop detection do not see the fact that the Window's size depends on the Windows's minimum-size and it maximum-size, indirectly through the window manager

@ogoffart
Copy link
Member

Actually, this has recently been reported as #2902
it has a better description, so i'll close this one as duplicated

@ogoffart ogoffart added the a:layouts Related to the layouting and positioning of the elements (mO,bT) label Jul 13, 2023
@ogoffart
Copy link
Member

closing as duplicate of #2902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:layouts Related to the layouting and positioning of the elements (mO,bT) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants