francma / wob

A lightweight overlay volume/backlight/progress/anything bar for Wayland.
ISC License
907 stars 50 forks source link

Sometimes wob fails with working settings #48

Closed paper42 closed 4 years ago

paper42 commented 4 years ago

Sometimes wob fails even though the settings are correct. This happens only sometimes and only when I change an argument. The next run with the same settings works fine.

tail -f /run/user/1000/sway-ipc.1000.1694.sock.wob  |
    wob --border-color=#ffaa0000 \
        --background-color=#77000000 \
        --bar-color=#ffaa0000 \
        --output=\* -v -W 400 -H 20 -o 0 -p 0 --border=3
1596892275.917285 ERROR main.c:571: Border color must be a value between #00000000 and #FFFFFFFF.
francma commented 4 years ago

You probably forgot to escape the # character. Modify your script to look like this ... wob --border-color='#ffaa0000' ...

paper42 commented 4 years ago

That's not it, I modified the script, but it still happens (this time it happened on 4th try)

tail -f /run/user/1000/sway-ipc.1000.1694.sock.wob  |
    wob --border-color='#ffaa0000' \
        --background-color='#77000000' \
        --bar-color='#ffaa0000' \
        --output=\* -v -W 400 -H 30 -o 0 -p 0 --border=3
paper42 commented 4 years ago

So, the version which I was testing until now was 0.9 from a void package. Manual build without any additional flags works as expected. Here is the progress of the void build:

=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
x86_64-repodata: [1697KB 0%] -- stalled -- ETA: 00m00s
x86_64-repodata: [1697KB 64%] 1140KB/s ETA: 00m00s
x86_64-repodata: 1697KB [avg rate: 1778KB/s]
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/debug/x86_64-repodata' ...
x86_64-repodata: [728KB 0%] 19MB/s ETA: 00m00s
x86_64-repodata: [728KB 46%] 694KB/s ETA: 00m01s
x86_64-repodata: 728KB [avg rate: 1503KB/s]
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ...
x86_64-repodata: [616KB 0%] -- stalled -- ETA: 00m00s
x86_64-repodata: [616KB 59%] 638KB/s ETA: 00m00s
x86_64-repodata: 616KB [avg rate: 1068KB/s]
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> wob-0.9_1: removing autodeps, please wait...
=> wob-0.9_1: building [meson] for x86_64...
   [host] pkg-config-0.29.2_2: found (https://alpha.de.repo.voidlinux.org/current)
   [host] scdoc-1.11.0_1: found (https://alpha.de.repo.voidlinux.org/current)
   [host] wayland-devel-1.18.0_3: found (https://alpha.de.repo.voidlinux.org/current)
   [host] meson-0.55.0_1: found (https://alpha.de.repo.voidlinux.org/current)
   [target] libffi-devel-3.3_2: found (https://alpha.de.repo.voidlinux.org/current)
   [target] libseccomp-devel-2.4.3_2: found (https://alpha.de.repo.voidlinux.org/current)
   [target] wayland-devel-1.18.0_3: found (https://alpha.de.repo.voidlinux.org/current)
   [target] wayland-protocols-1.20_3: found (https://alpha.de.repo.voidlinux.org/current)
=> wob-0.9_1: installing host dependencies: pkg-config-0.29.2_2 scdoc-1.11.0_1 wayland-devel-1.18.0_3 meson-0.55.0_1 ...
=> wob-0.9_1: installing target dependencies: libffi-devel-3.3_2 libseccomp-devel-2.4.3_2 wayland-devel-1.18.0_3 wayland-protocols-1.20_3 ...
=> wob-0.9_1: running do-fetch hook: 00-distfiles ...
=> wob-0.9_1: running do-extract hook: 00-distfiles ...
=> wob-0.9_1: extracting distfile(s), please wait...
=> wob-0.9_1: running do_patch ...
=> wob-0.9_1: running do-patch hook: 00-patches ...
=> wob-0.9_1: running pre-configure hook: 00-gnu-configure-asneeded ...
=> wob-0.9_1: running pre-configure hook: 01-override-config ...
=> wob-0.9_1: running pre-configure hook: 02-script-wrapper ...
=> wob-0.9_1: running do_configure ...
The Meson build system
Version: 0.55.0
Source dir: /builddir/wob-0.9
Build dir: /builddir/wob-0.9/build
Build type: native build
Project name: wob
Project version: 0.9
Using 'CC' from environment with value: 'cc'
Using 'CFLAGS' from environment with value: '-fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe   '
Using 'LDFLAGS' from environment with value: '-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    '
Using 'CPPFLAGS' from environment with value: '   '
Using 'AR' from environment with value: 'ar'
Using 'CC' from environment with value: 'cc'
Using 'CFLAGS' from environment with value: '-fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe   '
Using 'LDFLAGS' from environment with value: '-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    '
Using 'CPPFLAGS' from environment with value: '   '
C compiler for the host machine: cc (gcc 9.3.0 "x86_64-unknown-linux-gnu-gcc (GCC) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
Using 'AR' from environment with value: 'ar'
Host machine cpu family: x86_64
Host machine cpu: x86_64
Using 'PKG_CONFIG' from environment with value: 'pkg-config'
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency wayland-protocols found: YES 1.20
Program wayland-scanner found: YES
Run-time dependency wayland-client found: YES 1.18.0
Library rt found: YES
Run-time dependency libseccomp found: YES 2.4.3
Using 'PKG_CONFIG' from environment with value: 'pkg-config'
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Build-time dependency scdoc found: YES 1.11.0
Program /usr/bin/scdoc found: YES
Program sh found: YES
Build targets in project: 6

Found ninja-1.10.0 at /usr/bin/ninja
Using 'STRIP' from environment with value: 'strip'
Using 'STRIP' from environment with value: 'strip'
=> wob-0.9_1: running pre-build hook: 02-script-wrapper ...
=> wob-0.9_1: running do_build ...
ninja: Entering directory `build'
[1/27] Generating 'libxdg_shell.a.p/xdg-shell-protocol.c'.
[2/27] Generating 'libxdg_shell.a.p/xdg-shell-client-protocol.h'.
[3/27] Generating 'libxdg_output_unstable_v1.a.p/xdg-output-unstable-v1-protocol.c'.
[4/27] Generating 'libxdg_output_unstable_v1.a.p/xdg-output-unstable-v1-client-protocol.h'.
[5/27] Generating 'libwlr_layer_shell_unstable_v1.a.p/wlr-layer-shell-unstable-v1-protocol.c'.
[6/27] Generating 'libwlr_layer_shell_unstable_v1.a.p/wlr-layer-shell-unstable-v1-client-protocol.h'.
[7/27] Generating 'wob.p/xdg-output-unstable-v1-client-protocol.h'.
[8/27] Generating 'wob.p/wlr-layer-shell-unstable-v1-client-protocol.h'.
[9/27] Generating 'wob.p/xdg-shell-client-protocol.h'.
[10/27] Generating wob.1 with a custom command
[11/27] Compiling C object test-parse-input.p/color.c.o
[12/27] Compiling C object test-parse-input.p/parse.c.o
[13/27] Compiling C object test-parse-input.p/tests_wob_parse_input.c.o
[14/27] Compiling C object libxdg_shell.a.p/meson-generated_xdg-shell-protocol.c.o
[15/27] Compiling C object libwlr_layer_shell_unstable_v1.a.p/meson-generated_wlr-layer-shell-unstable-v1-protocol.c.o
[16/27] Linking static target libxdg_shell.a
[17/27] Compiling C object libxdg_output_unstable_v1.a.p/meson-generated_xdg-output-unstable-v1-protocol.c.o
[18/27] Linking static target libwlr_layer_shell_unstable_v1.a
[19/27] Compiling C object wob.p/pledge_seccomp.c.o
[20/27] Linking static target libxdg_output_unstable_v1.a
[21/27] Linking target test-parse-input
[22/27] Compiling C object wob.p/color.c.o
[23/27] Compiling C object wob.p/parse.c.o
[24/27] Compiling C object wob.p/buffer.c.o
[25/27] Compiling C object wob.p/log.c.o
[26/27] Compiling C object wob.p/main.c.o
[27/27] Linking target wob
=> wob-0.9_1: skipping check (XBPS_CHECK_PKGS is disabled) ...
=> wob-0.9_1: running pre-install hook: 00-lib32 ...
=> wob-0.9_1: running pre-install hook: 02-script-wrapper ...
=> wob-0.9_1: running pre-install hook: 98-fixup-gir-path ...
=> wob-0.9_1: running do_install ...
ninja: Entering directory `build'
[0/1] Installing files.
Installing wob to /destdir//wob-0.9/usr/bin
Installing wob.1 to /destdir//wob-0.9/usr/share/man/man1
=> wob-0.9_1: running post_install ...
=> wob-0.9_1: running post-install hook: 00-compress-info-files ...
=> wob-0.9_1: running post-install hook: 00-lib32 ...
=> wob-0.9_1: running post-install hook: 00-uncompress-manpages ...
=> wob-0.9_1: running post-install hook: 01-remove-localized-manpages ...
=> wob-0.9_1: running post-install hook: 01-remove-misc ...
=> wob-0.9_1: running post-install hook: 02-remove-libtool-archives ...
=> wob-0.9_1: running post-install hook: 02-remove-perl-files ...
=> wob-0.9_1: running post-install hook: 02-remove-python-bytecode-files ...
=> wob-0.9_1: running post-install hook: 03-remove-empty-dirs ...
=> wob-0.9_1: running post-install hook: 04-create-xbps-metadata-scripts ...
=> wob-0.9_1: running post-install hook: 05-generate-gitrevs ...
=> wob-0.9_1: running post-install hook: 06-strip-and-debug-pkgs ...
   Stripped position-independent executable: /usr/bin/wob
=> wob-0.9_1: running post-install hook: 10-pkglint-devel-paths ...
=> wob-0.9_1: running post-install hook: 11-pkglint-elf-in-usrshare ...
=> wob-0.9_1: running post-install hook: 12-rename-python3-c-bindings ...
=> wob-0.9_1: running post-install hook: 13-pkg-config-clean-xbps-cross-base-ref ...
=> wob-0.9_1: running post-install hook: 99-pkglint-warn-cross-cruft ...
=> wob-0.9_1: running pre-pkg hook: 03-rewrite-python-shebang ...
=> wob-0.9_1: running pre-pkg hook: 04-generate-runtime-deps ...
   SONAME: libc.so.6 <-> glibc>=2.29_1
   SONAME: libwayland-client.so.0 <-> wayland>=1.10.0_1
   SONAME: librt.so.1 <-> glibc>=2.29_1
   SONAME: libseccomp.so.2 <-> libseccomp>=2.0.0_1
=> wob-0.9_1: running pre-pkg hook: 05-prepare-32bit ...
=> wob-0.9_1: running pre-pkg hook: 06-shlib-provides ...
=> wob-0.9_1: running pre-pkg hook: 90-set-timestamps ...
=> wob-0.9_1: setting mtimes to Sat 08 Aug 2020 02:21:51 PM CEST
=> wob-0.9_1: running pre-pkg hook: 99-pkglint-subpkgs ...
=> wob-0.9_1: running pre-pkg hook: 99-pkglint ...
=> wob-0.9_1: running pre-pkg hook: 999-collected-rdeps ...
   glibc>=2.29_1 wayland>=1.10.0_1 libseccomp>=2.0.0_1 
=> wob-0.9_1: running do-pkg hook: 00-gen-pkg ...
=> wob-0.9_1: skipping existing wob-0.9_1.x86_64.xbps pkg...
=> wob-0.9_1: running post-pkg hook: 00-register-pkg ...
=> Registering new packages to /host/binpkgs
index: 62 packages registered.
=> wob-0.9_1: removing autodeps, please wait...
=> wob-0.9_1: cleaning build directory...
=> wob: removing files from destdir...
francma commented 4 years ago

Found a bug in code - I forgot to null terminate buffer string from which I then parsed the color value (ba0e8506569aeaae4bef89264ea1f0ff335d8769). This is probably the cause of this issue.

paper42 commented 4 years ago

Awesome, that was it, thanks alot.