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 #19006 ] bug.n window list leak #9
Comments
I could find In the current version this is not done anymore; it is only used in I had to go back all the way to version 3.5.1 to find the use of @fuhsjr00: Did you have anything specific in mind, when using It could be made more efficient by only adding windows to |
I think that maybe I misunderstood the purpose of Manager_allWndIds. I think that we only need the managed windows so that they can be re-managed if bug.n stops working. All the others shouldn't be needed. Note that I'm assuming "isManaged" means "assigned to a view". I'm not sure what would be done with non-managed Windows. |
Correct.
Nothing is and should be done with them by bug.n.
As far as I can see |
My thought on restoring accidentally hidden windows is to create a second process that records all Windows that are opened, removes them when they're closed, and watches the main bug.n process. If it detects that bug.n stops or fails, it should make sure that all Windows that should be visible are visible. By doing this in a second process, we make it very resilient to unexpected bug.n failures. The save/restore subsystem might be able to handle this, but it relies on bug.n being restarted. However, save/restore bugs could still result in lost Windows, and those bugs are more likely since its responsibilities are more involved. |
I juste deleted a 10000 line long (edited because I had mistaken the "Closed" just above for this issue being closed) |
Deleting my 5700 line long _WindowState.ini file has also helped tremendously. I was getting to the point where it would take 5-10 seconds to do a simple switch between two programs. I also had issues where suddenly I could not select one of my tiled windows, or where empty space got tiled. I do get quite a few popups, and one app I use produces unmanaged windows, so this at least makes some sense now. |
I've been using bug.n for a few weeks now and found my _WindowState.ini was 700kb. bug.n was terribly slow and yet after deleting is extremely responsive again. I think that even an option to delete the file on restart would be appreciated as I'd much rather re-organize my windows than wait 10-30 seconds to do a single operation in bug.n |
Just confirming this is definitely still an issue. Minor manual maintenance of _WindowState.ini or just deleting it is an easy short term fix. I'm not familiar enough with the code or ahk syntax in general to really debug, but am willing to debug or test things. |
Any update on this? |
I am not sure that bug.n is still in active development, but I love using it, and have learned a workaround for this bug that may help others. I have a shortcut on my desktop to the /Users/..../AppData/Roaming/bug.n/data folder that has two files in it. If _WindowState(.ini) gets too large (anything over 100-200 KB), bug.n gets really slow and hard to use. This is where the memory leak is being stored. I use Notepad++ (which is free) to edit the file. I usually start by exiting bug.n (Ctrl-Win-Q), then right click on _WindowState & choose Edit with Notepad++. I click on Find/Replace in the menu or toolbar. Copy this into Find What and leave Replace With blank: The memory leak seems to be worst when I have let the computer go to sleep while bug.n is running. If it is very slow, this process, which only takes me about 30 sec or so repairs everything, but doesn't lose the way that bug.n has been set up. I hope this helps someone else. |
Looks like the latest commits say otherwise, I've switched to komorebi and haven't looked back ever since. |
Import from berliOS:
Date: 2013-May-20 01:40
Submitted By: fuhsjr00
Assigned To: fuhsjr00
Category: None
Priority: 6
Bug Group: None
Resolution: None
Summary: bug.n window list leak
Original Submission:
If monitoring
%APPDATA%/bug.n/data/_WindowState.ini
, you'll notice thatit slowly grows over time.
Normal windows that are controllable by bug.n seem to get added and
removed as expected. However, pop-up windows (such as Win-R) get
recorded in the window list and stay. This also means that the window
forever remains in the internal Manager_allWndIds list because this is
exactly what is being dumped to _WindowState.ini.
I'm able to eventually get bug.n to saturate a core (_WindowState.ini
was around 260 lines with Config_maintenanceInterval set to 100ms). Once
this happens, bug.n is virtually unusable. However, the window count
doesn't seem to be the only factor because I can restart bug.n and see
CPU consumption fall back down to 1-2% with the same _WindowState.ini file.
Work-around:
Exit and restart bug.n. The _WindowState.ini file won't get smaller, but
the application may become usable again. If your WindowState.ini file
is ridiculously large, it is safe to delete window entries that don't
appear in the View* list. The windows of interest will not have
descriptions.
Followups
2014-Mar-05 21:11 joten
The problem might indeed be the use of Manager_allWndIds. This list
first was intended to allow restoring of windows, when bug.n crashed and
unintendedly left windows from an unvisible view hidden; therefore every
window is listed.
I added a comment in front of Manager_sync regarding Manager_allWndIds.
Manager_managedWndIds is used in Manager_cleanup, which previously
served a similar (but one sided) purpose as the session management.
Perhaps managedWndIds should be used in this case, too (?).
The questions also might be, if Manager_allWndIds is really used
anywhere in the current code rev.
The text was updated successfully, but these errors were encountered: