vn971 / timeplot

Personal activity logger & visualizer
GNU General Public License v3.0
26 stars 4 forks source link

timeplot only works if `xdotool` works #2

Closed oli-obk closed 6 years ago

oli-obk commented 6 years ago

Log:

Timeplot version 0.7.2
Config dir: /home/oliver/.config/timeplot
Image dir: /home/oliver/Bilder/timeplot
thread 'main' panicked at 'ERROR: command failed with exit code Some(1)
StdErr: XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error

StdOut: ', src/main.rs:192:2
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::panicking::default_hook::{{closure}}
             at libstd/sys_common/backtrace.rs:71
   2: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:227
             at libstd/panicking.rs:477
   3: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:391
   4: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:346
   5: timeplot::main
   6: std::rt::lang_start::{{closure}}
   7: main
   8: __libc_start_main
   9: _start

I am using debian and installed the packages mentioned in the README

vn971 commented 6 years ago

Thanks for the bug report! Could you please try to run the underlying command from terminal, to see if it works?: xdotool getactivewindow getwindowname

// This is really strange for me, I thought xdotool is mature and should work flawlessly.

oli-obk commented 6 years ago

Running that command yields

XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error

some googling suggests this might either be a graphics driver issue or a window manager issue. The drivers sound like they might be the issue. It's a laptop and I have two graphics cards. I played a lot with the driver installs to get something working, so I might have screwed up something in there.

vn971 commented 6 years ago

That must be the reason then. Timeplot works by using xdotool getactivewindow getwindowname: if it fails, there's nothing to do it seems. Apparently it can fail for in some cases, f.e. with wayland + graphics driver bug: https://askubuntu.com/questions/969874/xdotool-not-working-after-ubuntu-17-10-upgrade

vn971 commented 6 years ago

I've changed to issue title a bit if you don't mind.

vn971 commented 6 years ago

I don't think I really can fix it, and it's not in "timeplot" itself (not exactly).. Will have to close as "won't fix".:(

oli-obk commented 6 years ago

Thanks for looking into it!