-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when running in WSL2 #52
Comments
Could you provide the full log generated by running it (both stdout and stderr) with the It really looks like this panic is just a symptom, and that the underlying issue may be that your Wayland connection was unexpectedly closed. This log would give more info on that. |
slint configuration |
Is this okay? |
It is puzzling, I was expecting to see maybe a protocol error or something like that in that log. Does this kind of crash occur when running the winit examples as well? |
@elinorbgr Which example? I clone the repo and some examples was crash under WSL2, but the example run well on my Windows. |
Well, given the code you cited seems to crash at initialization, if the crash is caused by smithay-clipboard itself I'd expect other code using it (like the winit examples) to crash similarly. Mostly I'm thinking to narrow the search and see if it's possible to reproduce the issue with something smaller than a |
@elinorbgr I don't know if it helps, more logs in debug mode:
|
Running winit --example window also crashes:
|
I think it is, if I clean the clipboard it'll not crash at all. Follow slint-ui/slint#4089 (comment) The example
The example
|
I can reproduce this after a fresh windows boot. The unwrap here fails with broken pipe: smithay-clipboard/src/worker.rs Line 98 in 858419b
I haven't figured out yet what fd is causing this. And it seems racey, too. |
I debugged this a little further - not very far but something: The compositor closes the wayland display connection FD. This will produce a proper Err with winit, but it causes a panic in the above unwrap(). I'll prepare a PR to terminate the thread, to allow for graceful handling on the app side. A dead clipboard thread is already "handled" on the main thread where the smithay-clipboard API runs. |
Instead, terminate the thread and consider the clipboard dead. The application can now gracefully deal with the situation. Closes: #52
I am running a demo code of slint on WSL2, smithay-clipboard is crashed.
Slint
Platform:
WSL2
Fedora release 39 (Thirty Nine)
Slint: 1.3.2
Running with
cargo run
, with default feature.The text was updated successfully, but these errors were encountered: