Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]Several requests were sent at the same time in a short period of time, and some failed to respond #2607

Closed
DreamMaoMao opened this issue Oct 24, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@DreamMaoMao
Copy link
Contributor

image

2023-10-24.23-22-02.mp4

In the video, you can see that worksapce 3 sometimes does not show up, but from the log,waybar has successfully received the IPC request

@DreamMaoMao DreamMaoMao changed the title Several requests were sent at the same time in a short period of time, and some failed to respond [Bug]Several requests were sent at the same time in a short period of time, and some failed to respond Oct 24, 2023
@Alexays Alexays added the bug Something isn't working label Oct 24, 2023
@Syndelis
Copy link
Contributor

Could you describe your setup so I can try to reproduce the problem? Specifically, these questions came to mind:

  1. What is it you're doing that seemingly spawns/destroys 5 workspaces at once?
  2. Are these workspaces populated by any windows?
  3. Are they set as "persistent" on your Waybar/Hyprland configuration?

Thanks in advance for your time opening this issue and recording a video!

@DreamMaoMao
Copy link
Contributor Author

Could you describe your setup so I can try to reproduce the problem? Specifically, these questions came to mind:

  1. What is it you're doing that seemingly spawns/destroys 5 workspaces at once?
  2. Are these workspaces populated by any windows?
  3. Are they set as "persistent" on your Waybar/Hyprland configuration?

Thanks in advance for your time opening this issue and recording a video!

1.What is it you're doing that seemingly spawns/destroys 5 workspaces at once?
I am making a hyprland pluginplugin

setup1 I moved the Windows of five workspaces to another workspace at the same time
setup2 I moved all the Windows I had previously moved back to the previous workspace

2.Are these workspaces populated by any windows?
the answer is no

3.Are they set as "persistent" on your Waybar/Hyprland configuration?
the answer is no

logfile:

waybar.log

It is worth noting that when I have only three workspaces, this bug is very unlikely to occur, but when I have six workspaces with Windows, this operation is very likely to occur (repeat the operation once to five times).

This seems to be a software performance issue under high load.

@Syndelis
Copy link
Contributor

2.Are these workspaces populated by any windows?
the answer is no

Correct me if I'm wrong, but Hyprland deletes empty workspaces, so that should be an expected behavior (?)

@DreamMaoMao
Copy link
Contributor Author

@Syndelis
What I mean is that no window is occupied before the deletion request is sent

The workspace is already occupied by a window before the create request is sent

@DreamMaoMao
Copy link
Contributor Author

DreamMaoMao commented Oct 25, 2023

When I sent five workspace creation requests, sometimes some workspaces didn't show up on waybar, but
hyprland's operations were not affected, it just didn't show up on waybar when I jump to that workspace.

@DreamMaoMao
Copy link
Contributor Author

image

Sometimes this workspace symbol is repeated

These problems rarely occur when there are only three workspaces and three Windows, but they are likely to occur when the number of workspaces and Windows becomes large

@DreamMaoMao
Copy link
Contributor Author

image
I tried to comment these two lines of code and found that the deletion and create loss issues were resolved (except for a few other minor issues)

So I think the problem is caused by asynchronous manipulation of global variables

@DreamMaoMao
Copy link
Contributor Author

image
That is to say, when the code at label:1 is executed, and before label:3 is executed, another event may trigger the new "workspaces_to_remove_.push_back" at label:2, and this new data is not used by label:1 but was deleted in label:3.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants