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

in the Init function, ScrollView to the bottom, panicked Recursion detected #4522

Open
Aileyugg opened this issue Feb 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Aileyugg
Copy link

Aileyugg commented Feb 2, 2024

Rectangle {
        background: #fff9;
        border-radius: 6px;
        scroll-view := ScrollView {
            protected function to-bottom() {
                self.viewport-y = self.visible-height - self.viewport-height;
            }

            VerticalLayout {
                alignment: start;
                padding: 8px;
                for i in root.message-data: Text {
                    text: i.text;
                    wrap: word-wrap;
                    init => {
                        debug("first");
                        to-bottom();
                    }
                }
            }
}

first
thread 'main' panicked at C:\Users\xx.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\i-slint-core-1.4.0\properties.rs:486:9:
Recursion detected
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@ogoffart
Copy link
Member

ogoffart commented Feb 2, 2024

Thanks for filling a bug.

Reproducer

Although I am getting a different panic (BorrowMutError)

Maybe related to #3725

@ogoffart ogoffart added the bug Something isn't working label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants