Public bug reported:
Environment
- Ubuntu 26.04.1
- gnome-shell 50.1-0ubuntu1.4, mutter 50.1
- Wayland
Summary
IconGridLayout.adaptToSize(), added by
ubuntu/Standardize-icon-sizes-and-fit-the-grid-to-the-screen.patch (GNOME merge
request !4122), sets rows = cols = 0 when the grid has no icons yet
(iconGrid.js:960-961 in the installed build). If the app grid is laid out
before its icons are filled in, items per page becomes 0. As soon as icons are
added, the grid breaks, and for the rest of the session the app grid is empty
or only partly shown.
In upstream GNOME 50.1, IconGrid._findBestModeForSize() picks one of the
predefined _gridModes, so laying out an empty grid never makes items per
page 0.
Cause
1. AppDisplay fills in its icons lazily through Main.initializeDeferredWork().
_redisplay() runs when the app grid is first shown, or 20 seconds after the
shell starts (DEFERRED_TIMEOUT_SECONDS). Until then the grid is empty.
2. If something forces a stage layout after the app grid becomes visible but
before _redisplay() runs, adaptToSize() is called on the empty grid and sets
rows = cols = 0.
3. When _redisplay() then adds icons, every page overflows.
_relocateSurplusItems() deletes the empty page and then tries to put the icon
on a page that no longer exists. This throws, and the grid is left broken.
Steps to reproduce
So far I can only reproduce this through a third-party extension. I haven't
found a way to reproduce it without extensions.
1. Install Blur my Shell v76 and turn on Dock blur (dash-to-dock blur).
2. Log out, log back in, and open Show Apps right away (within 20 seconds).
3. The app grid is empty, and the journal shows the errors below.
Opening it 20 seconds or more after login works fine. Blur my Shell
forces a layout with get_allocation_box() when the overview opens, which
creates condition 2 above. A fix is in progress on the Blur my Shell
side (issue #1159), but any other extension or code that forces a layout
at the same moment would cause the same problem.
Error log
JS ERROR: TypeError: can't access property "children",
this._pages[pageIndex] is undefined
_addItemToPage@resource:///org/gnome/shell/ui/iconGrid.js:502:9
_relocateSurplusItems@resource:///org/gnome/shell/ui/iconGrid.js:457:18
_addItemToPage@resource:///org/gnome/shell/ui/iconGrid.js:504:14
_relocateSurplusItems@resource:///org/gnome/shell/ui/iconGrid.js:457:18
_addItemToPage@resource:///org/gnome/shell/ui/iconGrid.js:504:14
addItem@resource:///org/gnome/shell/ui/iconGrid.js:787:14
addItem@resource:///org/gnome/shell/ui/iconGrid.js:1262:29
_addItem@resource:///org/gnome/shell/ui/appDisplay.js:1054:20
_redisplay/<@resource:///org/gnome/shell/ui/appDisplay.js:1105:26
_redisplay@resource:///org/gnome/shell/ui/appDisplay.js:1097:17
_redisplay@resource:///org/gnome/shell/ui/appDisplay.js:1382:15
_init/this._redisplayWorkId<@resource:///org/gnome/shell/ui/appDisplay.js:1338:18
_runDeferredWork@resource:///org/gnome/shell/ui/main.js:986:31
_runBeforeRedrawQueue@resource:///org/gnome/shell/ui/main.js:1001:25
_queueBeforeRedraw/<@resource:///org/gnome/shell/ui/main.js:1011:13
@resource:///org/gnome/shell/ui/init.js:20:20
After that, "page.visibleChildren is undefined" and "visiblePageItems is
undefined" errors follow.
Expected behavior
Laying out the grid while it's empty shouldn't make items per page 0. For
example, when there's no tile to measure, adaptToSize() could leave the columns
and rows unchanged and recompute them once icons exist. Since adaptToSize()
returns early when the page size hasn't changed, it would also need to skip
recording the page size in that case, so the next layout recomputes.
References
- Blur my Shell issue: https://github.com/aunetx/blur-my-shell/issues/1159
- GNOME merge request !4122:
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4122
ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: gnome-shell 50.1-0ubuntu1.4
ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14
Uname: Linux 7.0.0-38-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Oct 21 14:07:50 2026
DisplayManager: gdm3
InstallationDate: Installed on 2026-06-25 (118 days ago)
InstallationMedia: Ubuntu 26.04 "Resolute Raccoon" - Release amd64 (20260423.1)
ProcEnviron:
LANG=ko_KR.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-ghostty
XDG_RUNTIME_DIR=<set>
RelatedPackageVersions: mutter-common 50.1-0ubuntu2.4
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: gnome-shell (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug resolute wayland-session
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171575
Title:
App grid breaks with rows = cols = 0 when laid out before it is filled
(Standardize-icon-sizes-and-fit-the-grid-to-the-screen.patch)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2171575/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs