Open Brandontam29 opened 10 months ago
relevant issues / projects: https://github.com/slint-ui/slint/issues/4089 https://github.com/Smithay/smithay-clipboard/issues/52 <- I believe this is the actual crate whose version bump introduces the bug
@Brandontam29 does this fix it for you:
--- a/crates/egui-winit/Cargo.toml
+++ b/crates/egui-winit/Cargo.toml
@@ -76,7 +76,7 @@ serde = { version = "1.0", optional = true, features = ["derive"] }
webbrowser = { version = "0.8.3", optional = true }
[target.'cfg(any(target_os="linux", target_os="dragonfly", target_os="freebsd", target_os="netbsd", target_os="openbsd"))'.dependencies]
-smithay-clipboard = { version = "0.7.0", optional = true }
+smithay-clipboard = { version = "0.6.0", optional = true }
[target.'cfg(not(target_os = "android"))'.dependencies]
arboard = { version = "3.2", optional = true, default-features = false }
?
I am having a similar issue (failed unwrap at the same location in smithay-clipboard), except it isn't happening on window resize, and it isn't happening with the demo app, but is happening with a partial copy of the demo app I'm trying to integrate with an existing project.
It would be triggered when I moused-over the app window. Sometimes it would trigger immediately on startup, but not sure if there were maybe input events on the first frame. Otherwise it would wait until I hovered the app (including window border).
curiously, the window borders are different (and resize behavior is a bit different). I haven't been able to figure out what causes that.
The fix mentioned in the above linked issues (copying something to the clipboard after starting the app) fixes it.
Another fix for it is starting the demo app first, then starting my app.
If I trigger the crash for my app while the demo app is open, both crash in the same way.
Both produce the log entry [2024-01-23T03:43:11Z WARN egui_winit::clipboard] Failed to initialize arboard clipboard: Unknown error while interacting with the clipboard: Connection refused (os error 111)
on start
I tried setting smithay-clipboard = { version = "0.6.0", optional = true }
earlier, but it didn't help
I went to replicate the issue by copying the demo app from my larger project into it's own directory, and somewhere between taking the above screenshot and running this 3rd app, I lost the ability to replicate the bug (but could do so reliably before).
using ubuntu 22.04.3 via wsl2
@Brandontam29 does this fix it for you:
--- a/crates/egui-winit/Cargo.toml +++ b/crates/egui-winit/Cargo.toml @@ -76,7 +76,7 @@ serde = { version = "1.0", optional = true, features = ["derive"] } webbrowser = { version = "0.8.3", optional = true } [target.'cfg(any(target_os="linux", target_os="dragonfly", target_os="freebsd", target_os="netbsd", target_os="openbsd"))'.dependencies] -smithay-clipboard = { version = "0.7.0", optional = true } +smithay-clipboard = { version = "0.6.0", optional = true } [target.'cfg(not(target_os = "android"))'.dependencies] arboard = { version = "3.2", optional = true, default-features = false }
?
It does not help. I'm getting the following error (Debian on WSL2):
Io error: Broken pipe (os error 32)
warning: queue 0x7f28ac000de0 destroyed while proxies still attached:
wl_data_offer@4278190081 still attached
wl_data_device@38 still attached
wl_seat@34 still attached
wl_data_device_manager@35 still attached
wl_registry@36 still attached
[2024-01-24T12:29:49Z ERROR arboard::platform::linux::x11] Worker thread errored with: Unknown error while interacting with the clipboard: Connection reset by peer (os error 104)
[2024-01-24T12:29:49Z ERROR arboard::platform::linux::x11] Could not hand the clipboard data over to the clipboard manager: Unknown error while interacting with the clipboard: The X11 server closed the connection
[2024-01-24T12:29:49Z ERROR arboard::platform::linux::x11] Failed to flush the clipboard window. Error: Broken pipe (os error 32)
Io error: Broken pipe (os error 32)
Error: WinitEventLoop(ExitFailure(1))
Also version 0.5.0 crashes. Version 0.4.0 does not compile with the current head, so didn't check that version.
The problems are the unwrap
s here:
Make a PR to smithay-clipboard
to replace those unwrap
s, and replace them with state.reply_tx.send(Err(err))
or a log line.
Any takers?
I patched smithay-clipboard to handle errors at those places, but I still get a crash.
I'm not sure, but maybe the clipboard issue is just a symptom of something going wrong deeper in wayland stuff?
I found a workaround: you can run it as x11 and not wayland by explicitly including x11 and disabling default features for eframe:
eframe = { version = "0.26.1", features = ["wgpu", "x11"], default-features = false }
Describe the bug When resizing any examples with the mouse, the app simply crashes.
This is the error that we get:
To Reproduce Steps to reproduce the behavior:
cargo run
in terminalExpected behavior GUI should resize without crashing.
Desktop