Skip to content
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

Can't launch wldash, if no mouse is connected. #43

Open
kkmp-dk opened this issue Nov 24, 2021 · 1 comment
Open

Can't launch wldash, if no mouse is connected. #43

kkmp-dk opened this issue Nov 24, 2021 · 1 comment

Comments

@kkmp-dk
Copy link

kkmp-dk commented Nov 24, 2021

I think it is a minor bug, but if you don't have a mouse connected you can't launch wldash in sway.

Not sure if it is a bug in your application or in wayland-client or sway.

To reproduce.

  • Start sway (important don't have mouse connected)
  • try launch wldash

Version

wldash version 0.2.0
sway version 1.6.1
wlroots 0.14.1-2

Stack trace

cargo run --release
thread 'main' panicked at 'unable to flush display: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/app.rs:342:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Full backtrace

RUST_BACKTRACE=full cargo run --release
    Finished release [optimized] target(s) in 0.03s
     Running `target/release/wldash`
thread 'main' panicked at 'unable to flush display: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/app.rs:342:30
stack backtrace:
   0:     0x55baa591db29 - std::backtrace_rs::backtrace::libunwind::trace::h7630ba4cba718aa0
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55baa591db29 - std::backtrace_rs::backtrace::trace_unsynchronized::he7498e79c157f5ac
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55baa591db29 - std::sys_common::backtrace::_print_fmt::hdaebadaee17bca49
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55baa591db29 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h82b0e3aaf8a96140
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55baa58cd9ec - core::fmt::write::h72801a82c94e6ff1
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/core/src/fmt/mod.rs:1149:17
   5:     0x55baa591c844 - std::io::Write::write_fmt::hc2da38dc44811df8
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/io/mod.rs:1697:15
   6:     0x55baa591cd7e - std::sys_common::backtrace::_print::h1c9a1d19c48821c1
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55baa591cd7e - std::sys_common::backtrace::print::h7ce8802039fa9d0e
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55baa591cd7e - std::panicking::default_hook::{{closure}}::hb2a74a8c1499c326
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:211:50
   9:     0x55baa591c5ef - std::panicking::default_hook::hf4f180b00076f2b2
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:228:9
  10:     0x55baa591c5ef - std::panicking::rust_panic_with_hook::he85ce8435493b711
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:606:17
  11:     0x55baa5942d13 - std::panicking::begin_panic_handler::{{closure}}::h31e15f69e6235bd2
  12:     0x55baa5942c96 - std::sys_common::backtrace::__rust_end_short_backtrace::hfce2fadb61aaa3ae
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x55baa5942c52 - rust_begin_unwind
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/std/src/panicking.rs:498:5
  14:     0x55baa58c0330 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/core/src/panicking.rs:107:14
  15:     0x55baa58c0612 - core::result::unwrap_failed::h885d3f7beb571353
                               at /rustc/a77da2d454e6caa227a85b16410b95f93495e7e0/library/core/src/result.rs:1613:5
  16:     0x55baa5993142 - core::result::Result<T,E>::expect::h1df884c65bf7552e
  17:     0x55baa59acb95 - wldash::main::he9601f43d7218618
  18:     0x55baa59a4589 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8bd52ec02aea305b
  19:     0x55baa59a9694 - main
  20:     0x7f5fbe5cfb25 - __libc_start_main
  21:     0x55baa58c52ce - _start
  22:                0x0 - <unknown>

The first stack trace I got is a little different I don't know why.
But I think this one is making more sense in a way of the mouse pointer was not plugged in.

[wayland-client] Protocol error while reading events: Protocol error 0 on object wl_seat@9: wl_seat.get_pointer called when no pointer capability has existed
Error while trying to read from the wayland socket: Os { code: 71, kind: Uncategorized, message: "Protocol error" }
thread 'main' panicked at 'unable to flush display: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/app.rs:342:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@kennylevinsen
Copy link
Owner

Yeah, wldash is calling wl_seat::get_pointer during setup indiscriminately to handle mouse events. We should check if the pointer capability is present first. No need to check if it appears later - we'll handle it next time we run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants