GNOME Bugzilla – Bug 663064
alternate-tab shell error on alt-tab if no windows open
Last modified: 2011-12-01 16:25:33 UTC
Alt tab with alternate tab extension installed (Fedora 15 - GNOME Shell 3.0.2) when no windows open causes xsession-errors log: JS ERROR: !!! Exception was: TypeError: ap1 is null JS ERROR: !!! lineNumber = '77' JS ERROR: !!! fileName = '/usr/share/gnome-shell/extensions/alternate-tab@gnome-shell-extensions.gnome.org/extension.js' This is due to "normal_windows.shift()" in the show function adding a null entry to normal_windows when normal_windows is empty. The following "if" clause can be wrapped around the problem code to protect against this: if(normal_windows.length) { let win_on_top = normal_windows.shift(); normal_windows.push(win_on_top); } With this fix a deeper problem emerges when the method subsequently exits at: if (!windows.length) return false; An error then occurs outside of this class when this._appSwitcher is dereferenced, it being null. It appears that the return false from the show function is not being respected by the caller. After the faults the usual effect is for mouse clicks to be disabled in overview mode, however sometimes the shell crashes and drops back to the login prompt. This has been tested with no other extensions running. I will test again with 3.2 when Fedora 16 is released in a few days.
I fixed this is master by exiting with this.destroy() if the window list is empty. Can you test it? If it works for you, I'll mark this resolved fixed. Thanks!
Yes that works perfectly. Thanks for fixing the problem. For info, I've not been able to test with Fedora 16 yet because the alternate-tab extension is not yet compatible with its Gnome3 version.
Closing then.
Ok, I went on and committed this. I still don't expect to release tarballs of the gnome-3-0 branch, so people having this bug will have to clone, or to update to 3.2. In any case, thanks for the bug report and thanks for the patch!
(In reply to comment #4) > Ok, I went on and committed this. > I still don't expect to release tarballs of the gnome-3-0 branch, so people > having this bug will have to clone, or to update to 3.2. > In any case, thanks for the bug report and thanks for the patch! Obviously, this comment was meant for the other bug...