-
Notifications
You must be signed in to change notification settings - Fork 785
Open
Labels
a:renderer-femtovgFemtovg renderer (mS)Femtovg renderer (mS)need triagingIssue that the owner of the area still need to triageIssue that the owner of the area still need to triage
Description
Bug Description
Using winit and the femtovg renderer with the wgpu backend, makes resizing the window sometimes panic here
slint/internal/renderers/femtovg/wgpu.rs
Line 130 in dbe2c59
| let device = device.as_mut().unwrap(); |
This happens when data is modified that affects the window size of the closed/hidden window.
Reproducible Code (if applicable)
use std::rc::Rc;
use slint::{SharedString, VecModel};
slint::slint! {
import { Button } from "std-widgets.slint";
export component CrashWindow inherits Window {
in property <[string]> list;
callback crash-me();
VerticalLayout {
for s in root.list: Rectangle {
width: 100px;
height: 100px;
}
Button {
text: "Crash me!";
clicked => root.crash-me();
}
}
}
}
fn main() {
let window = CrashWindow::new().unwrap();
let w = window.clone_strong();
window.on_crash_me(move || {
// Close the window
w.hide().unwrap();
// Add some data to have the rectangle trigger a resize
w.set_list(Rc::new(VecModel::from_slice(&[SharedString::new()])).into());
});
window.show().unwrap();
slint::run_event_loop_until_quit().unwrap();
}[package]
name = "test"
version = "0.1.0"
edition = "2024"
[dependencies]
slint = { version = "1", default-features = false, features = [
"std",
"compat-1-2",
"renderer-femtovg-wgpu",
"backend-winit",
] }Environment Details
- Slint Version: 1.14
- Platform/OS: Linux/Wayland
- Programming Language: rust
- Backend/Renderer: winit femtovg
Product Impact
No response
Metadata
Metadata
Assignees
Labels
a:renderer-femtovgFemtovg renderer (mS)Femtovg renderer (mS)need triagingIssue that the owner of the area still need to triageIssue that the owner of the area still need to triage