Closed szecket closed 1 month ago
rust backtrace provided:
1: core::panicking::panic_fmt
2: core::panicking::panic
3: core::option::unwrap_failed
4: slint_lsp::preview::drop_location::find_filtered_location
5: slint_lsp::preview::can_move_selected_element
6: i_slint_core::callbacks::Callback<Arg,Ret>::set_handler::{{closure}}
7: core::ops::function::FnOnce::call_once
8: i_slint_core::callbacks::Callback<Arg,Ret>::set_handler::{{closure}}
9: core::ops::function::FnOnce::call_once
10: i_slint_core::callbacks::Callback<Arg,Ret>::set_handler::{{closure}}
11: core::ops::function::FnOnce::call_once
12: i_slint_core::items::TouchAreaVTable::input_event
13: i_slint_core::window::WindowInner::process_mouse_input
14: <i_slint_backend_winit::event_loop::ActiveEventLoopSetterDuringEventProcessing<Handler> as winit::application::ApplicationHandler<Event>>::window_event
15: winit::platform_impl::macos::event_loop::map_user_event::{{closure}}
16: winit::platform_impl::macos::event_handler::EventHandler::handle_event
17: winit::platform_impl::macos::app_state::ApplicationDelegate::maybe_queue_event
18: winit::platform_impl::macos::view::WinitView::mouse_motion
19: <unknown>
20: <unknown>
21: <unknown>
22: <unknown>
23: winit::platform_impl::macos::app::WinitApplication::send_event
24: <unknown>
25: <unknown>
26: <i_slint_backend_winit::Backend as i_slint_core::platform::Platform>::run_event_loop
27: slint_lsp::main
tried another much more direct reproducible test in that file.
placed a button inside image.
select said button and drag it out of the image.
as it drags out onto toucharea I get the crash
There are, as it looks like, two crashes. The moving around of the button triggering the panic in parser.rs
, and the unwrap in slint_lsp::preview::drop_location::find_filtered_location
failing.
I think that's the same panic actually. find_filtered_location inline calls find_element_to_drop_into then is_recursive_inclusion which calls functions declared in the parser which causes the panic.
I'll add #[track_caller]
so that bugs in the preview won't be mistaken with bug in the parser 😸
running on mac in VS Code and just testing nightly for recent changes to drag/drop on full area by @tronical v2024.7.1717
added a button to card.slint in svg example moved the button around to different areas changed attributes in properties moved it interactively crashed