Bug: Changing a setting while Forge is disabled (e.g. screen locked) throws errors; old handlers keep running

Đang mở
#581 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@mattchristenson đang làm issue này rồi.

Từ ngày 30/9/2026.

  • #582 của @mattchristenson — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
desktop

Hướng nghiên cứu

Read lib/extension/window.js at _bindSignals() (line 300) and the disable path that sets this.settings = null. Disconnect the settings handlers on disable and avoid duplicate connections on enable. Confirm with scenarios/29_settings_after_disable.py: no JS errors and each setting change handled once.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem. Forge connects "changed" handlers to its settings, the window manager's (_bindSignals()) and the quick-settings indicator's, and never disconnects them. When Forge is disabled, the extension drops its settings object (this.settings = null), but the handlers stay connected. That happens on the lock screen too (_onSessionModeChanged()). Every later change of a Forge setting runs them, and they throw:

JS ERROR: TypeError: can't access property "get_boolean", this.ext.settings is null
renderTree@.../lib/extension/window.js:1167
_bindSignals/<@.../lib/extension/window.js:300

The same errors show in the journal log attached to #469. After Forge is enabled again, the old handlers keep running next to the new ones.

Desired outcome. Disabling Forge disconnects its settings handlers. Changing a setting while Forge is disabled does nothing, and after it is enabled again each change is handled once.

Acceptance criteria.

  • Disable Forge, then change a Forge setting (for example from the preferences, or with gsettings): no JS errors.
  • Enable it again: Forge works, and changing a setting raises no errors.

Steps to reproduce.

  1. With Forge enabled, run journalctl --user -f -o cat /usr/bin/gnome-shell in a terminal.
  2. Disable Forge (gnome-extensions disable [email protected], or lock the screen).
  3. Change a Forge setting, for example gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.forge focus-border-toggle false (from a second terminal or over ssh when the screen is locked).
  4. The journal shows JS ERROR: TypeError: can't access property "get_boolean", this.ext.settings is null for each change.

Automated reproduction: scenarios/29_settings_after_disable.py (in a nested GNOME Shell sandbox; it never touches your session). On main:

  FAIL  29.1 settings changed while Forge is disabled: new Forge errors 4 (expected 0)
  PASS  29.2 enabled again: a new window tiled: True; new Forge errors 0 (expected 0)
Ngôn ngữ chính
JavaScript
Star
1.3k
Fork
112
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của forge-ext/forge

Tất cả issue của forge-ext/forge

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.