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

ScrollView example crashes the live-preview when toolbar is hidden #7256

Open
NigelBreslaw opened this issue Jan 2, 2025 · 2 comments
Open
Labels
a:live preview The Live preview of slintpad or the LSP (mT,bO) bug Something isn't working

Comments

@NigelBreslaw
Copy link
Member

NigelBreslaw commented Jan 2, 2025

Bug Description

When trying to display the height of the scrollview the following example crashes live-preview on MacOS. This is with both the public and nightly slint extension.

Note: The Hide_ui checkbox in the settings needs to be checked before clicking "Show Preview".

Reproducible Code (if applicable)

import { ScrollView } from "std-widgets.slint";
export component MainWindow inherits Window {

    sv := ScrollView {
        VerticalLayout {
            for i in 100: Rectangle {
                x: 0;
                width: 100%;
                height: 100px;
                background: i.mod(2) == 0 ? red : blue;
            }
        }
    }

    Text {
        text: sv.height / 1px;
    }
}

Environment Details

  • Slint Version: 1.9.2
  • Platform/OS: Mac
  • Programming Language:
  • Backend/Renderer: Skia?

Product Impact

No response

@NigelBreslaw NigelBreslaw added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Jan 2, 2025
@tronical
Copy link
Member

tronical commented Jan 2, 2025

I can't reproduce this :-(. Could you paste output from the "Slint LSP" tab in vs code so that we can get some diagnostics?
Can you reproduce this using cargo run -p slint-viewer -- ~/test.slint if you save that test case into ~/test.slint?

@tronical tronical changed the title ScrollView example crashes the live-preview ScrollView example crashes the live-preview when toolbar is hidden Jan 2, 2025
@tronical
Copy link
Member

tronical commented Jan 2, 2025

Reproduced with the Hide_ui checkbox checked. It depends on that. Then the output tab has this:

thread 'main' panicked at internal/core/properties.rs:523:9:
Recursion detected
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Info  - 13:37:43] Connection to server got closed. Server will restart.
true
The Slint Language Server crashed. This is a bug. Please open an issue on https://github.com/slint-ui/slint/issues
The Slint Language Server crashed. This is a bug. Please open an issue on https://github.com/slint-ui/slint/issues
The Slint Language Server crashed. This is a bug. Please open an issue on https://github.com/slint-ui/slint/issues
[Error - 13:37:43] Server process exited with signal SIGABRT.

@tronical tronical added a:live preview The Live preview of slintpad or the LSP (mT,bO) and removed need triaging Issue that the owner of the area still need to triage labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:live preview The Live preview of slintpad or the LSP (mT,bO) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants