Skip to content

top@ryannerd: Fix empty values ​​when the system language is not English#1623

Open
KopfdesDaemons wants to merge 5 commits intolinuxmint:masterfrom
KopfdesDaemons:top
Open

top@ryannerd: Fix empty values ​​when the system language is not English#1623
KopfdesDaemons wants to merge 5 commits intolinuxmint:masterfrom
KopfdesDaemons:top

Conversation

@KopfdesDaemons
Copy link
Copy Markdown
Contributor

@KopfdesDaemons KopfdesDaemons commented Nov 2, 2025

closes #1348, closes #619

@rcalixte
Copy link
Copy Markdown
Member

rcalixte commented Nov 3, 2025

cc @RyanNerd

@fredcw
Copy link
Copy Markdown
Contributor

fredcw commented Dec 9, 2025

@RyanNerd hasn't been active on github since 2022.

When testing this, I still get lots of zeros:
Screenshot from 2025-12-09 21-32-21

It's also spamming ~/.xsession-errors once a second with:

Cjs-Message: 21:34:45.441: JS LOG: [LookingGlass/error] Error reading stream: top.task.sleeping is undefined
Cjs-Message: 21:34:46.443: JS LOG: [LookingGlass/error] Error reading stream: top.task.sleeping is undefined

My $LANG is en_GB.UTF-8

@fredcw
Copy link
Copy Markdown
Contributor

fredcw commented Dec 9, 2025

🤷‍♂️ Here's my output from top -n 1 -b

top - 21:29:34 up 13 days,  3:48,  2 users,  load average: 1.48, 1.38, 1.16
Tasks: 413 total, 1 running, 309 sleep, 0 d-sleep, 0 stopped, 103 zombie
%Cpu(s):  4.7 us,  9.3 sy,  0.0 ni, 86.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
MiB Mem :  14927.4 total,   1854.9 free,   7935.5 used,   5929.8 buff/cache     
MiB Swap:  15665.0 total,  14634.3 free,   1030.7 used.   6991.8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
3575567 fred      20   0   11188   7360   5200 R  17.7   0.0   0:00.02 top
      1 root      20   0   23568  10884   7648 S   0.0   0.1   1:44.19 systemd
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.61 kthreadd
      3 root      20   0       0      0      0 S   0.0   0.0   0:00.00 pool_workqueue_release
      4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/R-kvfree_rcu_reclaim
      5 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/R-rcu_gp

@KopfdesDaemons
Copy link
Copy Markdown
Contributor Author

In your output, one name is different: "sleep" -> "sleeping". I've adjusted that. Please try again.

Tasks: 289 total,   2 running, 287 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.3 us,  2.8 sy,  0.0 ni, 92.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
MiB Mem :  15937.3 total,   6944.2 free,   5679.5 used,   3822.1 buff/cache     
MiB Swap:   1952.0 total,   1952.0 free,      0.0 used.  10257.8 avail Mem 

@KopfdesDaemons KopfdesDaemons changed the title top@ryannerd: Fix empty values ​​when the system language is not English closes #1348, closes #619 top@ryannerd: Fix empty values ​​when the system language is not English Feb 15, 2026
@fredcw
Copy link
Copy Markdown
Contributor

fredcw commented Feb 18, 2026

the sleep thing is fixed. but const UUID = "devtest-top@ryannerd"; stops the desklet from starting.

This problem already existed of course but when you turn off certain combinations of "show tasks", "show cpu", "show ram", etc, it continuously spams ~/.xsession-errors with stuff like:

(cinnamon:164511): Cjs-CRITICAL **: 06:48:59.162: Object St.Label (0x561660a1e700), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x56165e34bf30 ==
#0   7ffff5a22cf0 b   /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:496 (3a217bc90060 @ 617)
#1   7ffff5a22d50 I   /usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function:592 (3a217bc90290 @ 416)

e.g. turn off "show cpu" and "show ram" (without restarting the desklet)

@github-actions
Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Having code flagged
by it doesn't automatically disqualify a pull request.

This check is not perfect will not replace a normal review.


Found 2 potential issue(s):

⚠️ lang_bind

top@ryannerd/files/top@ryannerd/desklet.js:477

this.getTopOutput(Lang.bind(this, (topOutput) => {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

top@ryannerd/files/top@ryannerd/desklet.js:562

this.timeout = Mainloop.timeout_add_seconds(this.cfgRefreshRate, Lang.bind(this, this._refresh));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.


Automated pattern check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

top@ryannerd: All values ​​are 0 top@ryannerd: No values are being loaded

3 participants