Comments (5)
We will take a while to get into this issue as everybody is at the embedded world conference this week. Sorry.
from slint.
I can reproduce this: The LSP seems fine though, the Live preview crashes (but since both are in the same binary, the difference is of course not really user-visible;-).
Here is the backtrace I get when I click on Show Preview
on AppWindow
:
thread 'main' panicked at internal/interpreter/eval.rs:1397:71:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: rust_begin_unwind
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:646:5
1: core::panicking::panic_fmt
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/panicking.rs:72:14
2: core::panicking::panic
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/panicking.rs:141:5
3: core::option::unwrap_failed
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/option.rs:1984:5
4: core::option::Option<T>::unwrap
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/option.rs:932:21
5: slint_interpreter::eval::enclosing_component_for_element
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:1397:31
6: slint_interpreter::eval::enclosing_component_instance_for_element
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:1424:48
7: slint_interpreter::eval::load_property_helper
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:1175:11
8: slint_interpreter::eval::eval_expression
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:152:13
9: slint_interpreter::eval::eval_expression
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:231:23
10: slint_interpreter::eval::eval_expression
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:318:19
11: slint_interpreter::eval::eval_expression
at /var/home/tobias/src/slint/internal/interpreter/eval.rs:322:30
12: slint_interpreter::dynamic_item_tree::make_binding_eval_closure::{{closure}}
at /var/home/tobias/src/slint/internal/interpreter/dynamic_item_tree.rs:1274:9
13: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/alloc/src/boxed.rs:2032:9
14: <i_slint_core::rtti::MaybeAnimatedPropertyInfoWrapper<Item,i_slint_core::properties::Property<T>> as i_slint_core::rtti::PropertyInfo<Item,Value>>::set_binding::set_binding_impl::{{closure}}
at /var/home/tobias/src/slint/internal/core/rtti.rs:210:25
15: <F as i_slint_core::properties::Binding<T>>::evaluate
at /var/home/tobias/src/slint/internal/core/properties.rs:710:9
16: i_slint_core::properties::Property<T>::set_binding::{{closure}}
at /var/home/tobias/src/slint/internal/core/properties.rs:903:28
17: <F as i_slint_core::properties::BindingCallable>::evaluate
at /var/home/tobias/src/slint/internal/core/properties.rs:294:9
18: i_slint_core::properties::alloc_binding_holder::evaluate::{{closure}}
at /var/home/tobias/src/slint/internal/core/properties.rs:397:13
19: i_slint_core::properties::CURRENT_BINDING::<impl i_slint_core::properties::CURRENT_BINDING>::set
at /var/home/tobias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scoped-tls-hkt-0.1.4/src/lib.rs:265:25
20: i_slint_core::properties::alloc_binding_holder::evaluate
at /var/home/tobias/src/slint/internal/core/properties.rs:396:9
21: i_slint_core::properties::PropertyHandle::update::{{closure}}
at /var/home/tobias/src/slint/internal/core/properties.rs:593:29
22: i_slint_core::properties::PropertyHandle::access
at /var/home/tobias/src/slint/internal/core/properties.rs:498:13
23: i_slint_core::properties::PropertyHandle::update
at /var/home/tobias/src/slint/internal/core/properties.rs:588:22
24: i_slint_core::properties::Property<T>::get
at /var/home/tobias/src/slint/internal/core/properties.rs:794:18
25: i_slint_core::items::Rectangle::background
at /var/home/tobias/src/slint/internal/core/items.rs:251:33
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Info - 12:41:36 PM] 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
from slint.
RUST_BACKTRACE=full cargo run -p slint-viewer -- /tmp/demo/test.slint
gives this backtrace:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s
Running `/var/home/tobias/src/slint/target/debug/slint-viewer /tmp/demo/test.slint`
thread 'main' panicked at internal/compiler/namedreference.rs:48:34:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: 0x55c02fd005b5 - std::backtrace_rs::backtrace::libunwind::trace::h7884d067d1055777
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
1: 0x55c02fd005b5 - std::backtrace_rs::backtrace::trace_unsynchronized::h6bc4d647cdcfd833
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55c02fd005b5 - std::sys_common::backtrace::_print_fmt::hde15b23869dacdeb
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:68:5
3: 0x55c02fd005b5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9a7c8ebfe0e5a9ea
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:44:22
4: 0x55c02fd30bbb - core::fmt::rt::Argument::fmt::h12ee69ff17c60b9e
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/fmt/rt.rs:142:9
5: 0x55c02fd30bbb - core::fmt::write::hafeb62294a20d279
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/fmt/mod.rs:1153:17
6: 0x55c02fcfbedf - std::io::Write::write_fmt::h83162bfc67f19d63
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/io/mod.rs:1843:15
7: 0x55c02fd0038e - std::sys_common::backtrace::_print::hd55ca7a5e2e3de7e
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:47:5
8: 0x55c02fd0038e - std::sys_common::backtrace::print::he94870e87e3768e8
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:34:9
9: 0x55c02fd019c9 - std::panicking::default_hook::{{closure}}::hd193b85d1d659c30
10: 0x55c02fd01733 - std::panicking::default_hook::h6de7d4d748c8b263
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:292:9
11: 0x55c02fd01e84 - std::panicking::rust_panic_with_hook::ha4c10d4e371025d4
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:789:13
12: 0x55c02fd01d2d - std::panicking::begin_panic_handler::{{closure}}::h8d8b80cfb6d2af9a
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:650:13
13: 0x55c02fd00a79 - std::sys_common::backtrace::__rust_end_short_backtrace::hedf50fb5defff019
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:171:18
14: 0x55c02fd01a97 - rust_begin_unwind
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:646:5
15: 0x55c02fd2def6 - core::panicking::panic_fmt::hde3e2c796a3a5416
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/panicking.rs:72:14
16: 0x55c02fd2df9f - core::panicking::panic::h150613825d1ad83d
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/panicking.rs:141:5
17: 0x55c02fd2dc79 - core::option::unwrap_failed::h83da879f26f94880
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/option.rs:1984:5
18: 0x55c02f11adc4 - core::option::Option<T>::unwrap::h8bb67adddf6d6d2e
at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/option.rs:932:21
19: 0x55c02f11adc4 - i_slint_compiler::namedreference::NamedReference::element::he93ab89019114672
at /var/home/tobias/src/slint/internal/compiler/namedreference.rs:48:9
fish: Job 1, 'RUST_BACKTRACE=full cargo run -…' terminated by signal SIGABRT (Abort)
from slint.
Duplicate of #1461
The issue is fairly hard to solve and will need some refactoring of the compiler to solve it.
Marking as duplicated, but thanks anyway for reporting.
from slint.
Actually, re-opening because the panic could get fixed and replaced by an error just like we did for the original testcase of #1461
from slint.
Related Issues (20)
- Add the aibility to reference a component from another one
- [slint-lsp/vscode] action to open the element's document at the cursor's position HOT 4
- OpenCV's highgui::select_roi() function does not render fully when used with Slint (Rust)
- TimePicker widget HOT 2
- LineEdit Widget Error HOT 2
- Quickstart Rust Example Code Display Defect HOT 2
- Using Path in an embedded project will result in a compilation error. HOT 1
- is it possible to express a tree in this type system? HOT 1
- Path: Can't parse commands containing scientific notation HOT 3
- Performance issues using imports vs single .slint file HOT 6
- RFC: date-time builtin type HOT 2
- Component catalogue in Design Mode includes component under preview, resulting in compilation errors on drop HOT 2
- Component catalogue shows user defined duplicates in gallery demo HOT 1
- Built-in VirtualKeyboard element for improved support for in-process embedded virtual keyboards
- A bug with booleans, rust slint. HOT 3
- Android: double-clicked callback not work on TouchArea HOT 2
- Android: default-font-family not work
- Support libraries in LSP
- Compiler panic compiling `init` callback from a component inlined into a repeater HOT 1
- Include LTS Version as slintpad dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slint.