i3blocks icon indicating copy to clipboard operation
i3blocks copied to clipboard

Missing clicks

Open diesphink opened this issue 5 years ago • 5 comments

Distro/DE: regolith (ubuntu based)/i3

i3bar is losing some clicks (one miss in every 3 or 4 clicks, sometimes more), and I can't find the reason.

Tried compiling i3blocks from source (regolith uses the i3xrocks fork, which has the same issue) but problem remained, I've used this minimum configuration to reproduce:

[click]
full_text=Click me!
command=echo "$(date +%s) Got clicked with button $BLOCK_BUTTON" >> /tmp/log2

That's everything on cfg file, I'm running it like this, from i3: status_command /path/to/cloned/i3blocks -c $i3xrocks_config -vvv 2>/tmp/i3blocks.err

This is the i3blocks version: i3blocks 1.5 © 2014-2019 Vivien Didelot and contributors

And this is the i3bar version: i3bar version 4.16.1 (2019-01-27) © 2010 Axel Wagner and contributors

And when I download i3blocks from ubuntu repo (i3blocks 1.4 © 2014 Vivien Didelot and contributors) I got the clicking right, but it's not the best solution as I'm using the new features from 1.5.

This is the log from 4 clicks, the 3rd and 4th lost. The spaces were added for clarity, after each click.

<7>line.c:line_parse:65: &0:000: ,{"name":"click","button":1,"modifiers":[],"x":3242,"y":1066,"relative_x":18,"relative_y":6,"width":62,"height":20}
<7>block.c:block_click:206: [click] clicked
<7>block.c:block_parent:346: [click] forked child 22030
<5>read(0, 1): Resource temporarily unavailable
<7>bar.c:bar_poll_exited:149: [click] exited
<7>block.c:block_wait:416: [click] process 22030 exited with 0
<7>block.c:block_update:146: [click] updated successfully
<5>waitid(): No child processes
<7>i3bar.c:i3bar_print_block:160: [foo] no text to display, skipping

<7>line.c:line_parse:65: &0:000: ,{"name":"click","button":1,"modifiers":[],"x":3242,"y":1066,"relative_x":18,"relative_y":6,"width":62,"height":20}
<7>block.c:block_click:206: [click] clicked
<7>block.c:block_parent:346: [click] forked child 22032
<5>read(0, 1): Resource temporarily unavailable
<7>bar.c:bar_poll_exited:149: [click] exited
<7>block.c:block_wait:416: [click] process 22032 exited with 0
<7>block.c:block_update:146: [click] updated successfully
<5>waitid(): No child processes
<7>i3bar.c:i3bar_print_block:160: [foo] no text to display, skipping

<5>read(0, 1): Resource temporarily unavailable
<7>line.c:line_parse:65: &0:000:
<5>read(0, 1): Resource temporarily unavailable

<5>read(0, 1): Resource temporarily unavailable
<7>line.c:line_parse:65: &0:000:
<5>read(0, 1): Resource temporarily unavailable

Those clicks have about one second of interval, I'm not maniacally clicking in order to reproduce this problem.

diesphink avatar Dec 01 '19 22:12 diesphink

Can confirm this. On Fedora 31, started since 1.5 release.

Build from my copr

full log edit: (changed to pastebin, fpaste expired)

Relevant log lines:

<7>i3bar.c:i3bar_print_block:160: [foo] no text to display, skipping
<5>read(0, 1): Resource temporarily unavailable
<7>line.c:line_parse:65: &0:000:
<5>read(0, 1): Resource temporarily unavailable
<5>read(0, 1): Resource temporarily unavailable
<7>line.c:line_parse:65: &0:000:
<5>read(0, 1): Resource temporarily unavailable
<7>bar.c:bar_poll_expired:103: [bandwidth:enp2s0] expired
<7>block.c:block_parent:346: [bandwidth:enp2s0] forked child 69405
<7>bar.c:bar_poll_exited:149: [bandwidth:enp2s0] exited
<7>block.c:block_wait:416: [bandwidth:enp2s0] process 69405 exited with 0
<7>line.c:line_parse:65: &3:000: I 0K E 0K
<7>block.c:block_update:146: [bandwidth:enp2s0] updated successfully
<7>i3bar.c:i3bar_print_block:160: [foo] no text to display, skipping

This:

<5>read(0, 1): Resource temporarily unavailable
<7>line.c:line_parse:65: &0:000:
<5>read(0, 1): Resource temporarily unavailable

appears in response to missing clicks on [time] blocklet which should send cal output to notify-send and refresh bar text. dunst prints a notification counter so it's easy to track missed clicks. the script itself.

I could not reproduce the issue with only [time] blocklet enabled.

p.s. These two logs from here also raise a question about what this '[foo]' blocklet is, it's not contained in my config and is not indicated as read from configuration file in i3blocks log.

skidnik avatar Feb 10 '20 12:02 skidnik

I have the same issue. This shows up in my error log, while I don't have anything called foo in my config.

<7>i3bar.c:i3bar_print_block:160: [foo] no text to display, skipping

captn3m0 avatar May 24 '20 17:05 captn3m0

Could somebody test whether it works (or not) with #404?

zsugabubus avatar May 24 '20 19:05 zsugabubus

Yes, it does work, thank you.

I even did a stress test: xdotool click --delay 5 --repeat 400 1, without any issue.

diesphink avatar Nov 02 '20 16:11 diesphink

Oops, worth mentioning: just cloned the repo and haven't tried with #404. Seems like it was an issue with environment? Now I'm coming from a new OS install on new machine (still ubuntu-based though).

This is the i3bar version on the new install: i3bar version 4.17.1 (2019-08-30) © 2010 Axel Wagner and contributors

diesphink avatar Nov 02 '20 16:11 diesphink

I tested the click block above and I don't miss any click, I can't reproduce the click issue for now.

vivien avatar Dec 15 '22 21:12 vivien

I leave this issue open for the [foo] block to be removed.

vivien avatar Dec 15 '22 21:12 vivien

The empty 'foo' block isn't created anymore. I'm closing this issue since I can't reproduce the click issue. Feel free to reopen if I'm missing something.

vivien avatar Dec 16 '22 04:12 vivien