Open dnlbauer opened 1 week ago
Small update on this: The issue seems to be related to assigning key bindings that are already assigned to other functions:
Super+C
has a default assignment to "Center window horizontally". When I try to assign it to "Center window", the extension settings crash. However, if i first delete the assignment to "Center window horizontally", I can assign it to "Center window" successfully.
I can't reproduce this on my Ubuntu 23.10 VM with Gnome Shell 45.2. So this may be a regression with Gnome 46.
For me I can simply set the keybinding and it shows that it has a conflict with another keybinding.
On my arch linux machine with Gnome 47 I was able to reproduce it. But only once. Starting the settings again and doing the same actions works now... But I still get the JS exception:
Oct 29 15:14:32 anarchy gjs[117161]: JS ERROR: TypeError: this.acceleratorParse is undefined
get keycode@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/prefsKeybinding.js:247:35
isValidBinding@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/prefsKeybinding.js:147:45
_updateKeybinding@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/prefsKeybinding.js:795:37
_onKeyPressed@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/prefsKeybinding.js:788:14
_init/<@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/prefsKeybinding.js:658:18
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:263:34
I also see this exception in Gnome 46, so I don't think it is causing the crash.
When it crashed I additionally got this:
plus a segfault.
I will try to take a look at this.
So I'm a bit stumped here. I managed to reproduce this only once and never again. Not even after rebooting...
Only looking at the stacktrace I posted above and the code, I couldn't figure out why this happens. It looks like at some point we try to use a Keybinding
object as a Combo
object. But in the code I don't see where this could be happening.
So unfortunately I'm not sure where to continue here :(
Thanks for reporting @dnlbauer.
I'll try reproduce this one over the weekend.
- Reset PaperWM config:
dconf reset -f /org/gnome/shell/extensions/paperwm/
- Disable/Enable PaperWM via the toggle in the extension menu.
Does this only occur on reset dconf? Given extensions inject into gnome shell itself, generally if you reset paperwm dconf settings it should be followed by a full logout/login (disabling/enabling doesn't actually reload extension extension code and prepare for extension load cycle).
There is some initialisation code in PaperWM that interacts with dconf (and user config files) and expects certain states etc.
Finally, PaperWM itself injects into the gnome shell instance, but extension settings don't (runs in it's own process separate from gnome shell). Prefs interact directly with dconf (and PaperWM, if running, receives signals from via gsettings). Hence, if you reset dconf while PaperWM is running, it will likely cause issues and desynchronisation (can't think of a better word) between settings (and keybindings) and paperwm.
One example is that paperwm will override gnome keybindings, and save (dconf) those original keybindings for restore when paperwm is disabled. Resetting dconf while paperwm is running, and then disabling paperwm will likely impact that and cause issues.
Anyways, that might not be to the problem but will have a look this weekend.
Hi,
Thanks for the details on the internals.
The issue came up before I resetted the config. I only included the config reset because I hoped that this would lead to a more reproduceable example.
Describe the bug Trying to assign/changing certain keybinding crash the extension for me. It does not happen for all combinations of keybindings and mappings for me, but it is reproducable.
One example is if I try to assign "Switch to window or workspace above", I can successfully assign the unused
Super+H
to it. However, when trying to assignSuper+Home
, the settings menu crashes:Syslog:
To Reproduce Steps to reproduce the behavior:
dconf reset -f /org/gnome/shell/extensions/paperwm/
Super+Home
to "Switch to window or workspace above"Expected behavior The keybinding is correctly assigned.
Screenshots
System information: PaperWM installed via extensions.gnome.org