Multiple instances sometimes get unsynchronized #4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hey there, just tested the fixed from #3 and it works wonderfully. However, I noticed sometimes the instances get unsynchronized and don't update accordingly. Currently, I have a dual monitor setup with two instances (player name and track info) in each monitor bar. Here's how it looks after I've watched a video on Qutebrowser (based on chromium I think):
On the leftmost bar, it says there is no player active, but it shows the last used player on the rightmost one (green colour).
I'm willing to open a pull request to investigate it and submit a fix. What do you think?
Here are relevant parts of my config:
Edit: removed duplicate images and broken links. Added config.
Forgot to upload the log. I suspect that one instance which didn't have any output on the leftmost bar is the one that couldn't connect to the socket.
Could you send the commands for each of your components?Oh i'm blind, didn't see them.Ok yeah, it looks broken to me too. As soon as i run the instance with just
--order "PLAYER"
the output stops on the first.I think i've got it, the io.Writer I implemented might be giving errors on each write (despite working), and the failure means it doesn't continue to write to stdout. I've just switched round the order to run it last and it seems to be working.
Reopened. I'm on
fe85127
By chance, one bar appears to be working as intended with the new commit, however the problem persists.
Now, only one instance is missing.
Ok yeah, it's not working for me either. One of the writers was returning a wrong number of bytes written still so i've made it always return the expected number.
One thing I noticed was that sometimes one of the instances had no text but were showing on the bar:
8340ef1
solved it, thanks :)Btw, I did some investigation and it turns out it might be a race condition when waybar starts all of the 4 instances.
Here's the screenshot:
Here, I started waybar-mpris first and then waybar. If you want, I can investigate it a bit more and submit a pull request. What do you think?