Description
Bug Description
Provided code crashes slint-viewer and slintpad, but it seems to working fine when building and running normally.
EDIT:
It works fine when width
is in px
instead %
.
Stack backtrace when running it with slint viewer from git.
thread 'main' panicked at internal/interpreter/dynamic_item_tree.rs:1649:30:
called `Result::unwrap()` on an `Err` value: ()
stack backtrace:
0: 0x55d9e077a98b - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::he089f96442833f67
1: 0x55d9dfebc003 - core::fmt::write::h2f210ed4c94745cb
2: 0x55d9e077a292 - std::io::Write::write_fmt::h7de08171ab770fb2
3: 0x55d9e077a7c3 - std::sys::backtrace::BacktraceLock::print::h810fbd31421329e6
4: 0x55d9e077a0a9 - std::panicking::rust_panic_with_hook::ha9131beeb2ddc506
5: 0x55d9e07b8ab8 - std::panicking::begin_panic_handler::{{closure}}::h1bba0eaeb6da506f
6: 0x55d9e07b8a19 - std::sys::backtrace::__rust_end_short_backtrace::h1d1ca3eade483f4c
7: 0x55d9e07b8f0c - rust_begin_unwind
8: 0x55d9dfc9039f - core::panicking::panic_fmt::h896a0727a1a943f9
9: 0x55d9dfc90715 - core::result::unwrap_failed::h1b5ed8541c7bebd6
10: 0x55d9e065f9df - i_slint_compiler::generator::handle_property_bindings_init::handle_property_inner::h79c222d9825fb963
11: 0x55d9e06a400c - i_slint_compiler::object_tree::recurse_elem::h0225c9efabb1955b
12: 0x55d9e06409f4 - slint_interpreter::dynamic_item_tree::instantiate::h5535c40527df5add
13: 0x55d9e0643f5d - slint_interpreter::dynamic_item_tree::ItemTreeDescription::create::h1e43b5f290bf9238
14: 0x55d9e069c3f6 - slint_interpreter::api::ComponentDefinition::create::h40d4c2cd221d59a8
15: 0x55d9e0708aec - slint_viewer::main::h0317ab19c67c2b92
16: 0x55d9e0732063 - std::sys::backtrace::__rust_begin_short_backtrace::h0fe71f6b539d2804
17: 0x55d9e0704e14 - main
18: 0x7f1402033d68 - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
19: 0x7f1402033e25 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
20: 0x55d9dfcd9a31 - _start
21: 0x0 - <unknown>
Aborted
Reproducible Code (if applicable)
import { StandardButton } from "std-widgets.slint";
export component Demo {
property <bool> flag;
StandardButton {
clicked => {
root.flag = !root.flag;
}
}
HorizontalLayout {
HorizontalLayout {
width: root.flag ? 0% : 100%;
animate width { duration: 200ms; }
}
}
}
Environment Details
- Slint Version: Slintpad / Slintviewer (1.9.2 / master)
- Platform/OS: Linux
- Programming Language: Slint
- Backend/Renderer: any
Product Impact
No response