Stacer icon indicating copy to clipboard operation
Stacer copied to clipboard

RAM meter shows terrabyte usage with only a few gigs in actual use

Open TwoFistedJustice opened this issue 2 years ago • 2 comments

Stacer showed my RAM usage to be in terrabytes while System Monitor showed less than 3 gigs.

Kubuntu 20.04 I was running Chromium, Docker Desktop (no containers running), PhpStorm and WebStorm.

First RAM showed very low, a few hundred MB then the bar jumped to the 50% mark and showed 16777216.0TiB. It occasionally drops back down to a few hundred and then back to the same TiB amount with the bar always stopping at exactly the halfway point.

stacer terrabytes

TwoFistedJustice avatar Jul 25 '22 19:07 TwoFistedJustice

Looks like it is reading in the value as a negative as it gets lower and lower which, possibly because its a unsigned variable, then reverts to showing it misleadingly as a really high value (16.7 million). What i cant figure out is which intrinsic type in C++ (the code its written in) has a max value of 16.7m TiB. I dunno. I've only ever seen 16.7m as a max color value. I wonder then if maybe its trying to convert an invalid string value into a # (or viceversa) and getting it wrong e.g. Stacer is parsing incorrectly because the input value contains an illegal character.

For the record i am using Ubuntu 20.04 with 32GiB and Stacer doesnt have this problem. I might roam the code to see what part in the memory display could possibly due what ur snapshot shows.

amiga-500 avatar Jul 28 '22 12:07 amiga-500

There is something wrong with the measuring of the used memory: image

One way to replicate the bug is to close all the applications except for firefox and Stacer, then close stacer and you will get the negative number for the unsigned int that translates to the terabyte used memory.

You can also see that the memory usage shown is somehow lower than the real one, maybe that's the source of the problem: image

I hope this can help solve it

guilty-p01nt3r avatar Sep 10 '22 17:09 guilty-p01nt3r