-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
ERROR: xsuspender.c:138:xsus_window_suspend: assertion failed: (! xsus_entry_find_for_window_rule (window, rule, suspended_entries)) #11
Comments
Still clueless as to why this happens, but ...
Might avoid above if we call Lines 202 to 204 in e719912
inside xsus_exit() SIGABRT handler, which is what GLib raises on failed assertions:Lines 183 to 186 in e719912
Lines 193 to 199 in e719912
|
I've managed to hit this assert a few times when switching to battery power and quickly switching to a suspended window (Firefox in my case). I replaced the assert to log a warning and return early to get some debug info. below are some logs from when this happens (anywhere you see Logs:
Config:
|
Ok, I'm able to reproduce hitting this assertion pretty reliably on my local laptop and have some idea of what the issue is. My xsuspender configuration is below.
I'm using a fork of xsuspender that:
The series of events to trigger this is:
This seems to be because the iterate_windows_kill_matching function only checks if each window is focused when deciding to suspend it or not, it doesn't check if the window in question belongs to the same process as another focused window. Log output from this series of events, running my fork is below:
Note that only one Firefox window is considered active, but because another Firefox window wasn't, it was suspended anyway at least once. So the following code // Skip currently focused window
if (wnck_window_is_active (window))
continue; should actually be something like: // Skip currently focused window
if (wnck_window_is_active (window) || belongs_to_same_process_as_active (window))
continue; Please let me know if any of this is unclear. Thanks! |
I've pushed a commit that seems to fix the issue here: 56quarters@1901fe2 I can PR if you'd like, thanks! |
Fixes an issue where the same process would be suspended more than once if it had multiple windows, one of them active and the others inactive, and the window then lost focus after a power change event (AC power being removed). Fixes kernc#11
Fixes an issue where the same process would be suspended more than once if it had multiple windows, one of them active and the others inactive, and the window then lost focus after a power change event (AC power being removed). Fixes kernc#11
Assertion failed, probably at/after system resume from suspend:
Xsuspender was killed with processes remaining suspended, so I had to reawaken them.
pkill -CONT .
The text was updated successfully, but these errors were encountered: