-
-
Notifications
You must be signed in to change notification settings - Fork 50
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] nwg-panel hangs after period of time #225
Comments
Well, I've been working for 4+ hours now with 4 instances of panel running (v0.9.2, Arch), and nothing hung so far. You need to gather more info, please. Also upgrade the panel to the current version, if possible. |
I will upgrade nwg-panel when the newest version will be packaged. But, I am seeing this issue wth a few recent versions of nwg-panel, and tried to fire this issue before but had an issue with creating an issue :) (500 error code form Github) I can provide any information you need about this, just describe how can I help. |
The most wanted it the module that causes the issue. Could you try running the panel with just certain modules turned on? |
You mean running it with default config? Yes I can, and I will check if it will hang or not. |
Or you may turn off modules that you use one by one. |
Ok, I used nwg-panel for a while on default config and it works fine. So, you are right that there is an issue with a module. So I will experiment with disabling module and let you know when I will investigate which module causes the problem. Thank you. |
I've been using the panel w/ sway for an hour or so. Lately it doesn't happen to me often, as I'm working on Hyprland-related stuff. One way or another, nothing hags so far. Maybe some of your executors is the culprit? |
I found the issue. I ran strace to investigate what nwg-panel is doing and seen a lot of messages complaining there is no file |
I remember having some issue resolved by running |
I've just added these files in default folders content. Thanks for investigating the problem. |
I assume that the root cause of this issue is incorrect uses of We use them to schedule periodic tasks, expecting the next run to be launched after the given interval after the last run is finished, but these functions don't work in such a way. Instead, the interval specifies the time between launches of the task. For instance, if a task takes 300ms to finish and the specified interval is 500ms, the time between the last finish and the next start is only 200ms. If the task takes >500ms to finish, the next run will be launched immediately after the last run is finished! This can be verified with the following program, in which the task takes 3s to finish while the interval is 1s: from gi.repository import GLib
import time
class Runner:
def __init__(self, num_times):
self.num_times = num_times
self.count = 0
def __call__(self, *args):
self.count += 1
print("Periodic timer [{}]: args={}".format(self.count, args))
time.sleep(3)
print("Periodic timer [{}] end".format(self.count))
return self.count < self.num_times
run = Runner(5)
interval_ms = 1000
GLib.timeout_add(interval_ms, run, 'foo', 123)
loop = GLib.MainLoop()
loop.run() To fix this issue, we may need to carefully revise the use of these timeout functions. I proposed #239 to fix an obvious use, which schedules the next run at the end of the current run, but it may have room for improvement. |
I assume this to be resolved. Please reopen if I'm wrong. |
Describe the bug
I can see never versions of nwg-panel started to hang on Fedora. After launch, nwg-panel works normally, but works slover over time, and then hangs completety.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Nwg-panel should not hang
Screenshots

While executing top, I can see something like this:
Desktop (please complete the following information):
sway -v
: 1.8.1nwg-panel -v
: 0.9.1The text was updated successfully, but these errors were encountered: