A plain return when logical_monitor is not found actually worked — GNOME Shell no longer crashes. However, it causes the cursor to freeze briefly when triggering the issue.
I also added some logging to the meta_monitor_manager_get_logical_monitor_at and here’s what it shows: lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1851,000000, 23,000000) lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1851,000000, 23,000000) lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,000000) lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:14 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:14 F2A gnome-shell[84990]: Can't update stage views actor unnamed [Gjs_ui_windowPreview_WindowPreview] is on because it needs an allocation. lip 27 22:52:14 F2A gnome-shell[84990]: Can't update stage views actor unnamed [ClutterActor] is on because it needs an allocation. lip 27 22:52:14 F2A gnome-shell[84990]: Can't update stage views actor unnamed [ClutterClone] is on because it needs an allocation. lip 27 22:52:14 F2A gnome-shell[84990]: Can't update stage views actor unnamed [StIcon] is on because it needs an allocation. lip 27 22:52:14 F2A gnome-shell[84990]: Can't update stage views actor unnamed [ClutterActor] is on because it needs an allocation. lip 27 22:52:15 F2A gnome-shell[84990]: _st_create_shadow_pipeline_from_actor: assertion 'clutter_actor_has_allocation (actor)' failed lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,352386) lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,352386) lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:15 F2A gnome-shell[84990]: ASSERTION WORKAROUND: NO LOGICAL MONITORS AT ALL lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,352386) lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,352386) lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:15 F2A gnome-shell[84990]: ASSERTION WORKAROUND: NO LOGICAL MONITORS AT ALL lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,352386) lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Checking logical monitors for point (1920,000000, 23,352386) lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=0 y=555 width=1920 height=1080 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=4480 y=0 width=1440 height=2560 lip 27 22:52:15 F2A gnome-shell[84990]: [MUTTER DEBUG] Monitor: x=1920 y=683 width=2560 height=1600 lip 27 22:52:15 F2A gnome-shell[84990]: ASSERTION WORKAROUND: NO LOGICAL MONITORS AT ALL -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2117277 Title: gnome-shell crash on unplugging external monitor – meta_window_get_work_area_for_logical_monitor assertion Status in mutter package in Ubuntu: New Bug description: While unplugging an external monitor (HDMI), GNOME Shell crashed immediately. The session was terminated and returned to the login screen. I am running Ubuntu 25.04 with GNOME Shell 48.0 and Mutter 48.1 under Wayland. This issue seems related to monitor hotplug or logical monitor handling. In my case, the crash most frequently occurs while a YouTube video is playing in Google Chrome. However, it is very rare overall and difficult to reproduce consistently. Unplugging the monitor during video playback seems to trigger the bug more reliably. similar issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/3402 lip 18 16:11:26 F2A gnome-shell[3582]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed lip 18 16:11:26 F2A gnome-shell[3582]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed lip 18 16:11:26 F2A gnome-shell[3582]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed lip 18 16:11:26 F2A gnome-shell[3582]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed lip 18 16:11:26 F2A gnome-shell[3582]: meta_display_get_monitor_in_fullscreen: assertion 'monitor >= 0 && monitor < n_logical_monitors' failed lip 18 16:11:26 F2A gnome-shell[3582]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed lip 18 16:11:26 F2A gnome-shell[3582]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed lip 18 16:11:26 F2A gnome-shell[3582]: ** lip 18 16:11:26 F2A gnome-shell[3582]: libmutter:ERROR:../src/core/window.c:5986:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor) lip 18 16:11:26 F2A gnome-shell[3582]: Bail out! libmutter:ERROR:../src/core/window.c:5986:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor) lip 18 16:11:26 F2A gnome-shell[3582]: GNOME Shell crashed with signal 6 lip 18 16:11:26 F2A gnome-shell[3582]: == Stack trace for context 0x65310685c930 == lip 18 16:11:26 F2A gnome-shell[3582]: #0 6531069518f8 i resource:///org/gnome/shell/ui/init.js:21 (65af8270c90 @ 48) lip 18 16:11:26 F2A systemd-coredump[2170777]: Process 3582 (gnome-shell) of user 1000 terminated abnormally with signal 6/ABRT, processing... lip 18 16:11:26 F2A systemd[1]: Started [email protected] - Process Core Dump (PID 2170777/UID 0). lip 18 16:11:27 F2A systemd-coredump[2170778]: Process 3582 (gnome-shell) of user 1000 dumped core. ProblemType: Bug DistroRelease: Ubuntu 25.04 Package: gnome-shell 48.0-1ubuntu1 ProcVersionSignature: Ubuntu 6.14.0-23.23-generic 6.14.5 Uname: Linux 6.14.0-23-generic x86_64 ApportVersion: 2.32.0-0ubuntu5.3 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Fri Jul 18 18:41:11 2025 DisplayManager: gdm3 InstallationDate: Installed on 2025-07-01 (17 days ago) InstallationMedia: Ubuntu 25.04 "Plucky Puffin" - Release amd64 (20250415.3) ProcEnviron: LANG=pl_PL.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> RebootRequiredPkgs: Error: path contained symlinks. RelatedPackageVersions: mutter-common 48.1-1ubuntu3.1 SourcePackage: gnome-shell UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2117277/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

