projecthamster / hamster-shell-extension

Shell extension for hamster
http://projecthamster.org
GNU General Public License v3.0
213 stars 91 forks source link

Causes problems with GNOME shell in Ubuntu Cosmic (3.30.1) #295

Open ruedigerkupper opened 5 years ago

ruedigerkupper commented 5 years ago

The current version of hamster shell extension can be installed in Ubuntu Cosmic Cuttlefish (GNOME 3.30.1) and initially seems to work. But it causes issues with screen locking and frequently kills GNOME shell:

Can you make the shell extension act nicely in GNOME 3.30.1?

Dave-B commented 5 years ago

+1 I'm seeing a similar problem with Gnome 3.30.1 in Debian buster/sid. No lilac for me on first Super+L, but the top bar flickers. A second Super+L brings up the lock screen.

ruedigerkupper commented 5 years ago

Thanks Dave-B, lilac or flicker, this looks like the same problen.

rhertzog commented 5 years ago

@elbenfreund I have the same problem too here and I tracked it down to some calls that you incorrectly re-introduced when you updated the coding style. Please merge #296.

NikMel commented 5 years ago

Another +1. Waking from suspend, every time the screen is purple with no login prompt. When I press Super-L the lock screen image shows and on swipe-up the login prompt shows as usual. When I login, gnome-shell has crashed and needs to be restarted (which sometimes crashes it hard so I get tossed out entirely).

If I disable hamster-shell-extension, the problem disappears.

This seems to be the relevant log entries (using journalctl /usr/bin/gnome-shell):

nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: Window manager warning: Trying to remove non-existent keybinding "show-hamster-dropdown".
nov 06 13:57:51 Spinky gnome-shell[2275]: Shutting down hamster-shell-extension.
nov 06 13:57:51 Spinky gnome-shell[2275]: Attempting to remove actor of type 'StBin' from group of class 'StBoxLayout', but the container is not the actor's parent.
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: == Stack trace for context 0x558fb963f2b0 ==
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #0   558fbdb58d58 i   /home/niklas/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:203 (7f8fb3c6d700 @ 225)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #1   558fbdb58c98 i   resource:///org/gnome/shell/ui/extensionSystem.js:83 (7f8fdea5a040 @ 436)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #2   558fbdb58c18 i   resource:///org/gnome/shell/ui/extensionSystem.js:354 (7f8fdea5ab80 @ 13)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #3   7ffd70d0fbe0 b   self-hosted:261 (7f8fdedc1dc0 @ 223)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #4   558fbdb58b98 i   resource:///org/gnome/shell/ui/extensionSystem.js:353 (7f8fdea5aaf0 @ 64)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #5   558fbdb58b18 i   resource:///org/gnome/shell/ui/extensionSystem.js:371 (7f8fdea5ac10 @ 87)
nov 06 13:57:51 Spinky gnome-shell[2275]: Source ID 894 was not found when attempting to remove it
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #6   7ffd70d10d20 b   resource:///org/gnome/gjs/modules/signals.js:128 (7f8fdedc18b0 @ 386)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #7   7ffd70d11b70 b   resource:///org/gnome/shell/ui/sessionMode.js:208 (7f8fde641ca0 @ 254)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #8   558fbdb588e8 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #9   558fbdb58858 i   resource:///org/gnome/shell/ui/sessionMode.js:177 (7f8fde641af0 @ 100)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #10   558fbdb587b0 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #11   558fbdb58718 i   resource:///org/gnome/shell/ui/screenShield.js:925 (7f8fde627c10 @ 55)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #12   558fbdb58670 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #13   558fbdb585b0 i   self-hosted:975 (7f8fdedf01f0 @ 392)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #14   558fbdb58510 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:208 (7f8fdeddb9d0 @ 54)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #15   558fbdb583f0 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:342 (7f8fdeddba60 @ 1742)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #16   558fbdb58360 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:355 (7f8fdeddbaf0 @ 100)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #17   558fbdb582e8 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:370 (7f8fdeddbb80 @ 10)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #18   558fbdb58218 i   resource:///org/gnome/gjs/modules/signals.js:128 (7f8fdedc18b0 @ 386)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #19   558fbdb58188 i   resource:///org/gnome/shell/ui/tweener.js:244 (7f8fdedd99d0 @ 159)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #20   558fbdb580e0 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #21   558fbdb58060 i   resource:///org/gnome/shell/ui/tweener.js:219 (7f8fdedd9940 @ 15)
nov 06 13:57:51 Spinky gnome-shell[2275]: Object Shell.GenericContainer (0x558fbbe2e440), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vf
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: == Stack trace for context 0x558fb963f2b0 ==
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #0   558fbdb58ef8 i   resource:///org/gnome/gjs/modules/overrides/GObject.js:468 (7f8fdedcc040 @ 25)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #1   558fbdb58e70 i   resource:///org/gnome/shell/ui/popupMenu.js:902 (7f8fdea274c0 @ 46)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #2   7ffd70d0db00 b   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #3   558fbdb58de8 i   resource:///org/gnome/shell/ui/panelMenu.js:191 (7f8fdea79670 @ 53)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #4   7ffd70d0ea70 b   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #5   558fbdb58d58 i   /home/niklas/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:204 (7f8fb3c6d700 @ 245)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #6   558fbdb58c98 i   resource:///org/gnome/shell/ui/extensionSystem.js:83 (7f8fdea5a040 @ 436)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #7   558fbdb58c18 i   resource:///org/gnome/shell/ui/extensionSystem.js:354 (7f8fdea5ab80 @ 13)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #8   7ffd70d0fbe0 b   self-hosted:261 (7f8fdedc1dc0 @ 223)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #9   558fbdb58b98 i   resource:///org/gnome/shell/ui/extensionSystem.js:353 (7f8fdea5aaf0 @ 64)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #10   558fbdb58b18 i   resource:///org/gnome/shell/ui/extensionSystem.js:371 (7f8fdea5ac10 @ 87)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #11   7ffd70d10d20 b   resource:///org/gnome/gjs/modules/signals.js:128 (7f8fdedc18b0 @ 386)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #12   7ffd70d11b70 b   resource:///org/gnome/shell/ui/sessionMode.js:208 (7f8fde641ca0 @ 254)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #13   558fbdb588e8 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #14   558fbdb58858 i   resource:///org/gnome/shell/ui/sessionMode.js:177 (7f8fde641af0 @ 100)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #15   558fbdb587b0 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #16   558fbdb58718 i   resource:///org/gnome/shell/ui/screenShield.js:925 (7f8fde627c10 @ 55)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #17   558fbdb58670 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #18   558fbdb585b0 i   self-hosted:975 (7f8fdedf01f0 @ 392)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #19   558fbdb58510 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:208 (7f8fdeddb9d0 @ 54)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #20   558fbdb583f0 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:342 (7f8fdeddba60 @ 1742)
nov 06 13:57:51 Spinky gnome-shell[2275]: clutter_actor_destroy: assertion 'CLUTTER_IS_ACTOR (self)' failed
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #21   558fbdb58360 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:355 (7f8fdeddbaf0 @ 100)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #22   558fbdb582e8 i   resource:///org/gnome/gjs/modules/tweener/tweener.js:370 (7f8fdeddbb80 @ 10)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #23   558fbdb58218 i   resource:///org/gnome/gjs/modules/signals.js:128 (7f8fdedc18b0 @ 386)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #24   558fbdb58188 i   resource:///org/gnome/shell/ui/tweener.js:244 (7f8fdedd99d0 @ 159)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #25   558fbdb580e0 i   resource:///org/gnome/gjs/modules/_legacy.js:82 (7f8fdedb0b80 @ 71)
nov 06 13:57:51 Spinky org.gnome.Shell.desktop[2275]: #26   558fbdb58060 i   resource:///org/gnome/shell/ui/tweener.js:219 (7f8fdedd9940 @ 15)
nov 06 13:57:51 Spinky gnome-shell[2275]: Object Shell.GenericContainer (0x558fbbe2e440), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vf
nov 06 13:57:52 Spinky gnome-shell[2275]: Ignoring excess values in shadow definition

/Niklas

Philambdo commented 5 years ago

Hi there,

im on Fedora 29 with Gnome 3.30 and experienced the same odd behaviour. I had to Lock Screen Twice to get my Notebook really locked.

After relogin the extension wasn't shown anymore in the top bar. Alt+F2 with r (reload gnome shell) fixed it until the next Lock Screen...

I patched away the lines mentioned in Note from rhertzog from Issue https://github.com/projecthamster/hamster-shell-extension/pull/296 and everything seems to be working fine now.

Greetings, Florian

NikMel commented 5 years ago

Hi there,

im on Fedora 29 with Gnome 3.30 and experienced the same odd behaviour. I had to Lock Screen Twice to get my Notebook really locked.

After relogin the extension wasn't shown anymore in the top bar. Alt+F2 with r (reload gnome shell) fixed it until the next Lock Screen...

I patched away the lines mentioned in Note from rhertzog from Issue https://github.com/projecthamster/hamster-shell-extension/pull/296 and everything seems to be working fine now.

Greetings, Florian

Thanks! Applied the patch, and the problem is gone!

/N

karolszk commented 5 years ago

Biggest thanks @rhertzog for effort and patch! :) Unfortunately nn Debian testing/buster gnome 3.30.2 I applied extension from @rhertzog repo and is better because rest of my installed extension after Super-Lock apperared and work properly (redshift, sound-output and dash-todock) but hamster-extension not. Here are log:

lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: == Stack trace for context 0x561f85db3320 == lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #0 0x561f8617f3a8 i resource:///org/gnome/gjs/modules/overrides/GObject.js:460 (0x7f7d880c4890 @ 25) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #1 0x561f8617f320 i resource:///org/gnome/shell/ui/popupMenu.js:902 (0x7f7d76529b38 @ 46) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #2 0x7fffcbcae110 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f7d880b5de0 @ 71) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #3 0x561f8617f298 i resource:///org/gnome/shell/ui/panelMenu.js:191 (0x7f7d7657b340 @ 53) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #4 0x7fffcbcaecc0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f7d880b5de0 @ 71) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #5 0x561f8617f210 i /home/karol/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:157 (0x7f7d74d11230 @ 188) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #6 0x561f8617f150 i resource:///org/gnome/shell/ui/extensionSystem.js:83 (0x7f7d765581a8 @ 441) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #7 0x561f8617f0d0 i resource:///org/gnome/shell/ui/extensionSystem.js:297 (0x7f7d76558808 @ 13) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #8 0x561f8617f000 i self-hosted:251 (0x7f7d880c4ab0 @ 223) lis 12 12:47:35 nvme org.gnome.Shell.desktop[18972]: #9 0x561f8617ef80 i resource:///org/gnome/shell/ui/extensionSystem.js:294 (0x7f7d765585e8 @ 113)

karolszk commented 5 years ago

and rest of the log stack trace: is 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: == Stack trace for context 0x561f85db3320 == lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #0 0x561f8617fe98 i resource:///org/gnome/gjs/modules/overrides/GObject.js:460 (0x7f7d880c4890 @ 25) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #1 0x561f8617fe10 i resource:///org/gnome/shell/ui/popupMenu.js:902 (0x7f7d76529b38 @ 46) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #2 0x7fffcbca6000 b resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f7d880b5de0 @ 71) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #3 0x561f8617fd88 i resource:///org/gnome/shell/ui/panelMenu.js:191 (0x7f7d7657b340 @ 53) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #4 0x7fffcbca7340 b resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f7d880b5de0 @ 71) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #5 0x561f8617fd00 i /home/karol/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:157 (0x7f7d74d11230 @ 188) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #6 0x561f8617fc40 i resource:///org/gnome/shell/ui/extensionSystem.js:83 (0x7f7d765581a8 @ 441) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #7 0x561f8617fbc0 i resource:///org/gnome/shell/ui/extensionSystem.js:354 (0x7f7d76558c48 @ 13) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #8 0x7fffcbca8070 b self-hosted:251 (0x7f7d880c4ab0 @ 223) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #9 0x561f8617fb40 i resource:///org/gnome/shell/ui/extensionSystem.js:353 (0x7f7d76558bc0 @ 64) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #10 0x561f8617fac0 i resource:///org/gnome/shell/ui/extensionSystem.js:371 (0x7f7d76558cd0 @ 87) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #11 0x7fffcbca9540 b resource:///org/gnome/gjs/modules/signals.js:128 (0x7f7d880d2230 @ 386) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #12 0x7fffcbcaa2d0 b resource:///org/gnome/shell/ui/sessionMode.js:206 (0x7f7d760742b8 @ 254) lis 12 13:44:50 nvme org.gnome.Shell.desktop[18972]: #13 0x561f8617f890 i resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f7d880b5de0 @ 71) lis 12 13:44:50 nvme gnome-shell[18972]: Object Shell.GenericContainer (0x561f87c4a810), has been already deallocated - impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs

madtibo commented 5 years ago

I had the same issue in Debian Buster:

Window manager warning: Trying to remove non-existent keybinding "show-hamster-dropdown".
Shutting down hamster-shell-extension.

I commented the line removing the binding in extension.js and my extension now works. Not sure what the correct keybinding removal should be...

diff --git a/extension/extension.js b/extension/extension.js
index cc3dfc6..2951613 100644
--- a/extension/extension.js
+++ b/extension/extension.js
@@ -188,7 +188,7 @@ function Controller(extensionMeta) {

         disable: function() {
             this.shouldEnable = false;
-            Main.wm.removeKeybinding("show-hamster-dropdown");
+            // Main.wm.removeKeybinding("show-hamster-dropdown");

             global.log('Shutting down hamster-shell-extension.');
             this._removeWidget(this.placement);
madtibo commented 5 years ago

Just removing the line was not a solution. I had problems on session lock. I had an error with a missing libspa-support.so. I found it was coming from the pipewire package. I installed the package and it is now working fine. @karolszk is the pipewire package install on your computer?

karolszk commented 5 years ago

Hi @madtibo no I am not pipewire package installed. Could you help me how can I check missing libspa-support.so? Thanks.

madtibo commented 5 years ago

From the debian package search, you can see that the /usr/lib/x86_64-linux-gnu/spa/support/libspa-support.so file is installed with pipewire.

I found the missing library message from: sudo journalctl /usr/bin/gnome-shell -f | grep libspa

Run a apt install pipewire and try to reactivate the hamster extension.

NikMel commented 5 years ago

@madtibo I doubt that is the problem. pipewire is a multimedia streaming library, and it would seem strange if the hamster extension depends on that. I'm not a developer of the hamster extension, so I may of course be wrong...

Are you sure that the log message you found is related to the hamster extension? The log you grep-ed is for the entire gnome shell, so it may be just about anything related to gnome-shell. And, I have had similar problems as @karolszk, I don't have pipewire installed, and I do not have anything in my gnome-shell log related to libspa or pipewire.

@karolszk Did you try to apply the patch from my previous post, and still see the problem?

@madtibo I improved on your patch so that it makes sure that removeKeybinding is not called if it already has been called (but it does need to get called when the extension is destroyed, e.g. when locking the screen).

It might fix it... Give it a try:

diff --git a/extension/extension.js b/extension/extension.js
index 64f1d1f..d6d6f3d 100644
--- a/extension/extension.js
+++ b/extension/extension.js
@@ -81,7 +81,7 @@ const WindowsProxyIface = ['',

 let WindowsProxy = Gio.DBusProxy.makeProxyWrapper(WindowsProxyIface);

-
+var isKeyBindingActive = 0; // Toggle whether keybinding is registered (attempt to fix crashing problems with Main.wm.RemoveKeyBinding in disable:)

 /**
@@ -183,12 +183,18 @@ function Controller(extensionMeta) {
                 Shell.KeyBindingMode ? Shell.KeyBindingMode.ALL : Shell.ActionMode.ALL,
                 Lang.bind(this.panelWidget, this.panelWidget.toggle)
             );
+            this.isKeyBindingActive = 1;
         },

         disable: function() {
             this.shouldEnable = false;
-            Main.wm.removeKeybinding("show-hamster-dropdown");
-
+            if(this.isKeyBindingActive == 1) {
+                               global.log('Removing keybinding.');
+                               Main.wm.removeKeybinding("show-hamster-dropdown");                              
+                       } else {
+                               global.log('(!!) Skipped removing keybinding as it was not enabled... Probably avoided a crash!');
+                       }
+                       this.isKeyBindingActive = 0;
             global.log('Shutting down hamster-shell-extension.');
             this._removeWidget(this.placement);
             this.panelWidget.destroy();
karolszk commented 5 years ago

Hi @NikMel I am using @rhertzog repo develop branch. What I have to apply?

NikMel commented 5 years ago

First checkout the development-branch from the main repo (much newer than rhertzog's repo): https://github.com/projecthamster/hamster-shell-extension.git

Then apply this patch (includes both rhertzog's pull request 296 and my attempt to fix the double remove keybinding problem):

diff --git a/extension/extension.js b/extension/extension.js
index cc3dfc6..d6d6f3d 100644
--- a/extension/extension.js
+++ b/extension/extension.js
@@ -21,7 +21,6 @@ Copyright (c) 2016 - 2018 Eric Goller / projecthamster <elbenfreund@projecthamst
 */

-const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Shell = imports.gi.Shell;
 const Meta = imports.gi.Meta;
@@ -82,7 +81,7 @@ const WindowsProxyIface = ['',

 let WindowsProxy = Gio.DBusProxy.makeProxyWrapper(WindowsProxyIface);

-
+var isKeyBindingActive = 0; // Toggle whether keybinding is registered (attempt to fix crashing problems with Main.wm.RemoveKeyBinding in disable:)

 /**
@@ -184,17 +183,20 @@ function Controller(extensionMeta) {
                 Shell.KeyBindingMode ? Shell.KeyBindingMode.ALL : Shell.ActionMode.ALL,
                 Lang.bind(this.panelWidget, this.panelWidget.toggle)
             );
+            this.isKeyBindingActive = 1;
         },

         disable: function() {
             this.shouldEnable = false;
-            Main.wm.removeKeybinding("show-hamster-dropdown");
-
+            if(this.isKeyBindingActive == 1) {
+               global.log('Removing keybinding.');
+               Main.wm.removeKeybinding("show-hamster-dropdown");              
+           } else {
+               global.log('(!!) Skipped removing keybinding as it was not enabled... Probably avoided a crash!');
+           }
+           this.isKeyBindingActive = 0;
             global.log('Shutting down hamster-shell-extension.');
             this._removeWidget(this.placement);
-            Main.panel.menuManager.removeMenu(this.panelWidget.menu);
-            GLib.source_remove(this.panelWidget.timeout);
-            this.panelWidget.actor.destroy();
             this.panelWidget.destroy();
             this.panelWidget = null;
             this.apiProxy = null;
madtibo commented 5 years ago

@NikMel you are right, it might have been a problem totally not related to hamster. It is not easy to separate problems during these dist upgrades. Well, nonetheless, I am much better now that pipewire is installed :-) I am not available for tests this week. I will give it a try next week. Cheers

madtibo commented 5 years ago

@NikMel Got a few minutes to test your patch and it's working great on my side! Thanks a lot

karolszk commented 5 years ago

@NikMel backed to main repo + your patch and it works! Thanks!

NinjaTurtle007 commented 5 years ago

So if we do git clone now, it will work on 18.10?

NikMel commented 5 years ago

@NinjaTurtle007 Nope, the patch isn't pushed to the repo, so you'll have to apply it yourself.

NinjaTurtle007 commented 5 years ago

when it will be pushed?

NikMel commented 5 years ago

No plans, really.

I'm not a developer for hamster (meaning, that I would need to set up a private repo and stuff that I don't immediately know how to do), and really just did a few tests to see if I could fix the issues described in this thread. Most of the patch I posted above comes from pull request 296 by @rhertzog, which is already waiting to be included in the hamster repo.

So, basically. Not sure I'll have the time to setup all that's needed to push the patch...

But if you just want to get hamster up and running (as I did), it should be quite straight-forward to just clone the repo and apply the patch

rrthomas commented 5 years ago

Confirmed that @PriOliveira's fix works for me; thanks very much. @PriOliveira, any chance of a pull request?

mwilck commented 4 years ago

I believe this issue should be fixed in gnome-shell-3.30. Please confirm and close.

jacek-pliszka commented 4 years ago

Works for me on Fedora 31 GNOME 3.34