Bug: GNOME 51 crash - metaWindow.set_unmaximize_flags() causes Mutter SIGSEGV on window close
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, linux
调研方向
从lib/extension/window.js开始,检查move(metaWindow, rect)和window-create-queue回调,issue指出导致崩溃的调用就在这里。按照issue中提出的修复,在取消窗口最大化之前检查其最大化状态。在GNOME Shell 51上关闭一个平铺窗口以重现问题;会话不再崩溃即表示完成。
由索引模型根据 Issue 内容生成。
描述
Issue/Bug Description/Video Capture/Screenshots
On GNOME 51 (Fedora 45 Rawhide / libmutter-51), closing a window causes gnome-shell to crash with a segmentation fault (SIGSEGV), immediately terminating the user session and dropping the user back to GDM / login screen.
Root Cause Analysis
In lib/extension/window.js, move(metaWindow, rect) and the window-create-queue event callback unconditionally invoke metaWindow.set_unmaximize_flags(Meta.MaximizeFlags.BOTH); followed by metaWindow.unmaximize();.
In Mutter 51 (GNOME 51), invoking set_unmaximize_flags during window re-tiling/destruction triggers a crash inside meta_window_update_monitor:
Stack trace of thread 27746:
#0 0x00007fe51d1bff16 meta_window_update_monitor (libmutter-51.so.0 + 0x1bff16)
#1 0x00007fe51d24f30b meta_window_wayland_update_main_monitor (libmutter-51.so.0 + 0x24f30b)
#2 0x00007fe51d1bff51 meta_window_update_monitor (libmutter-51.so.0 + 0x1bff51)
#3 0x00007fe51d1c101b meta_window_move_resize_internal (libmutter-51.so.0 + 0x1c101b)
#4 0x00007fe51d1bc6e9 meta_window_set_unmaximize_flags (libmutter-51.so.0 + 0x1bc6e9)
#5 0x00007fe51c4e6056 ffi_call_unix64 (libffi.so.8 + 0xb056)
#8 0x00007fe51d69c3f4 _ZN3Gjs8Function6invoke... (libgjs.so.0 + 0x1303f4)
Proposed Fix
Only attempt to unmaximize if the window is actually currently horizontally or vertically maximized, and avoid calling set_unmaximize_flags:
// In move(metaWindow, rect) and window-create-queue:
try {
if (metaWindow.maximized_horizontally || metaWindow.maximized_vertically) {
metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
}
} catch (e) {
// ignore
}
Testing this patch on Fedora 45 / GNOME Shell 51.1 completely resolves the crash when closing tiled windows.
Steps to reproduce
- Enable Forge on GNOME Shell 51.
- Open two or more tiled windows (e.g. terminals).
- Close one of the windows (e.g. using Super+Q or Alt+F4).
gnome-shellcrashes with SIGSEGV inmeta_window_set_unmaximize_flags, logging out the user.
Distribution and Linux version
NAME="Fedora Linux"
VERSION="45 (Workstation Edition)"
ID=fedora
VERSION_ID=45
PRETTY_NAME="Fedora Linux 45 (Workstation Edition)"
Linux fedora 7.2.15-300.fc45.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Nov 1 16:11:16 UTC 2026 x86_64 GNU/Linux
Journal Logs from the last hour
Nov 07 15:31:25 fedora systemd-coredump[32773]: Process 27746 (gnome-shell) of user 1000 dumped core.
Stack trace of thread 27746:
#0 0x00007fe51d1bff16 meta_window_update_monitor (libmutter-51.so.0 + 0x1bff16)
#1 0x00007fe51d24f30b meta_window_wayland_update_main_monitor (libmutter-51.so.0 + 0x24f30b)
#2 0x00007fe51d1bff51 meta_window_update_monitor (libmutter-51.so.0 + 0x1bff51)
#3 0x00007fe51d1c101b meta_window_move_resize_internal (libmutter-51.so.0 + 0x1c101b)
#4 0x00007fe51d1bc6e9 meta_window_set_unmaximize_flags (libmutter-51.so.0 + 0x1bc6e9)
GNOME Shell version
GNOME Shell 51.1
Forge version
Version 89 (gnome-shell-extension-forge-89-4.fc45)
Other installed/enabled extensions
[email protected] (Forge)
[email protected] (Background Logo)
[email protected] (Launch New Instance)
Monitor Setup
1 x 1080p laptop display (eDP-1, 1920x1080 @ 60Hz)
Other Notes
Also also noting that "51" is not yet listed in metadata.json's shell-version array.
- 主要语言
- JavaScript
- 星标
- 1.3k
- 派生
- 112
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
forge-ext/forge 的其他 Issue
-
Bug: Changing a setting while Forge is disabled (e.g. screen locked) throws errors; old handlers keep running可能已有人在做 @mattchristenson 于 39 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
-
Bug: Windows overlap while resizing, until slower apps catch up可能已有人在做 @mattchristenson 于 39 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 30/100
-
Bug: Tabbed and stacked groups that contain a split show windows on top of each other可能已有人在做 @mattchristenson 于 39 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 20/100
-
Bug: Windows in a stacked group are hidden without a trace可能已有人在做 @mattchristenson 于 39 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
-
Bug: Toggling stacked or tabbed layout off changes the container's split direction可能已有人在做 @mattchristenson 于 39 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 30/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
obsidianmd/obsidian-help#1169 ·
维护者通常 2 天内回复
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish step可能已有人在做 @albertteoh 今天认领。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 85/100
jaegertracing/jaeger-ui#4739 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
keepassxreboot/keepassxc-browser#3159 · 1 条评论 ·
-
Add: ESP 2 RS未关闭approved check:passed feeds:add
难度 1/5 1 小时以内 新手友好度 67/100