linuxmint / linuxmint/cinnamon
workspace-switcher TypeError: this.buttons[from] is undefined
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 915
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 3
Description
Distribution
Fedora 42
Package version
Cinnamon 6.4.9
Graphics hardware in use
Advanced Micro Devices [AMD/ATI] Kaveri [Radeon R7 Graphics]
Frequency
Always
Bug description
got this whenever I issue a "journalctl -b | grep cinnamon" at boot:
aoû 04 07:30:53 cinnamon[3878]: JS ERROR: TypeError: this.buttons[from] is undefined _onWorkspaceChanged@/usr/share/cinnamon/applets/workspace-switcher@cinnamon.org/applet.js:355:9
Steps to reproduce
Happens at every boot, no matter which kernel I'm using.
Expected behavior
Not sure, but this should not be there.
Additional information
System is using Xorg on Fedora workstation (gnome) and cinnamon desktop.
I've changed the function to
_onWorkspaceChanged(wm, from, to) {
if (this.buttons[from]) {
this.buttons[from].activate(false);
} else {
global.log("workspace-switcher: this.buttons[from] is undefined, from =", from, "buttons =", this.buttons);
}
this.buttons[to].activate(true);
}
and will report whether or not it's fixed by tomorrow.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with applets/workspace-switcher@cinnamon.org/applet.js at _onWorkspaceChanged, line 355, and inspect how this.buttons is initialized and updated during boot. Reproduce with journalctl -b | grep cinnamon on Fedora 42 using Cinnamon 6.4.9. Done means the workspace-switcher no longer logs this TypeError at boot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100