Comments (2)
When you send a signal to dwmblocks by clicking or scrolling on the status bar, it has to handle the interrupt before it can finish what it was doing. If you were updating one of your blocks when this happened, then the fgets function will exit with the EINTR error and return NULL as if it could not read anything, causing the block to disappear. Because of this, this issue is more likely to occur if your blocks take longer to update.
There is a related issue where the sleep function is also broken out of during the interrupt. This causes the "time" variable to be incremented prematurely, updating the next block right away as well as updating blocks with larger longer update intervals much sooner in these scrolling scenarios. This also makes this bug more likely to happen.
The first issue is solved by writing the output of fgets to a temp buffer and copying it over on success, and optionally trying to read again until the EINTR error goes away. The second issue is solved by using nanosleep and continuing the sleep with whatever was left when it exited before moving on to update.
Both of these issues are solved (I cannot recreate this bug anymore) here https://github.com/dfuehrer/dwmblocks/tree/mychanges.
from dwmblocks.
void getcmd(const Block *block, char *output)
{
...
fgets(output+i, CMDLENGTH-(strlen(delim)+1), cmdf);
...
pclose(cmdf);
}
here at line 78 of dwmblocks.c , when inputting too quickly .( for example a quick scroll).
there will be a flush of function getcmd executed at once.and somehow this causes the
fgets(output+i, CMDLENGTH-(strlen(delim)+1), cmdf);
not printing anything to (output +i) ; so the block content got disappeared.
I have verified to let buttonhandler to handle another script but same signal. and commented out the buttonhandler's signal or status updating functions, the problem remains.Lets fix this problem , any ideas ?
I have similar issue. Is that what you are talking about?
https://imgur.com/a/EKPOFug
from dwmblocks.
Related Issues (20)
- dwmblocks not updating when running pywal HOT 1
- Statusbar freezes sometimes HOT 5
- Update Signal != 1/0 prints an additional rectangle emoji in front HOT 3
- Statusbar freezes HOT 2
- ZSH segmentation fault HOT 1
- Add SECURITY.md
- freezing HOT 19
- nothing shows up but on the original dwm it does HOT 2
- How can a dwmblock update its output based on $BUTTON? HOT 2
- Exclamation Mark at dwmblock HOT 1
- dwmblocks randomly hangs from time to time
- It no longer starts with dwm since I rebooted my computer
- status bar stop working if we start another X client HOT 1
- buttonhandler executes commands twice
- Wrong repo
- nvim's dwmblocks autocmd breaks sb-volume's scroll feature HOT 1
- Make modules in dwmblocks start asynchronously like https://github.com/UtkarshVerma/dwmblocks-async
- patch files don't correspond to anything in original dwmblocks source
- Neovim autocmd breaks dwmblocks signals HOT 1
- Neovim's autocmd for dwmblocks causes a coredump when you logout HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwmblocks.