Bug 25797 - Wrong display with gsmartcontrol
Summary: Wrong display with gsmartcontrol
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Sander Lepik
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-02 22:07 CET by Pierre Jarillon
Modified: 2021-07-07 00:23 CEST (History)
2 users (show)

See Also:
Source RPM: gsmartcontrol-1.1.3-2.mga7.src.rpm
CVE:
Status comment:


Attachments
Screenshot of Gsmartcontol display for a hard disc (116.64 KB, image/png)
2019-12-12 20:52 CET, Lewis Smith
Details

Description Pierre Jarillon 2019-12-02 22:07:08 CET
Gsmartcontrol has inserted strange characters in long numbers. I suppose they are thin spaces. But they are displayed as unknown characters.
These characters are not given by smartctl which is the source of data.
From a konsole, I get "Invalid UTF-8 string passed to pango_layout_set_text()"

Another inconvenience is the low contrast of gray characters on a gray background. It is a lack of ergonomics.

gsmartcontrol-0.9.0-1.mga6 had a far better look.
Comment 1 David GEIGER 2019-12-04 07:11:40 CET
Assigning to the registered maintainer!

CC: (none) => geiger.david68210
Assignee: bugsquad => mageia

Comment 2 Lewis Smith 2019-12-12 20:52:40 CET
Created attachment 11401 [details]
Screenshot of Gsmartcontol display for a hard disc

I wanted to look at this before assigning it, but it has gone the right way!
Needed to install both packages to see. Gsmartcontrol version as above SRPM.

Attached is the screenshot of my disc. Alas, the only really bug number visible is the disc Capacity, which displays correctly without the reported error (if there are others); here is the console output (Mate Terminal) corresponding to the screenshot:
 # gsmartcontrol
<error> [gtk] _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’

(gsmartcontrol:17912): IBUS-WARNING **: 20:23:56.761: The owner of /home/lewis/.config/ibus/bus is not root!
<error> [gtk] posix_spawn avoided (workdir specified) (fd close requested) 
<error> [gtk] posix_spawn avoided (workdir specified) (fd close requested) 
<error> [gtk] posix_spawn avoided (workdir specified) (fd close requested) 
<warn>  [app] SmartctlParser::parse_full(): No ATA sections could be parsed. Returning.
<warn>  [hz] FS warning: Error while opening file "/proc/scsi/sg/devices": No such file or directory.
<warn>  [app] {anonymous}::read_proc_scsi_sg_devices_file(): Sg devices file doesn't exist.
<error> [gtk] posix_spawn avoided (workdir specified) (fd close requested) 
<warn>  [hz] Warning: exit: Some SMART command to the disk failed, or there was a checksum error in a SMART data structure
<warn>  [hz] FS warning: Unable to check if a path "/home/lewis/.config/gsmartcontrol/gsmartcontrol.conf" points to directory: No such file or directory.

Moreover, copy/paste this string from the gmsartcontrol GUI into a terminal reveals no hidden bad characters:
 $ echo 1000204886016           [from gsmartcontrol display of the disc]
 1000204886016
---------------------
> Another inconvenience is the low contrast of gray characters on a
> gray background
Not in this screenshot (under Mate): black on grey, quite legible.
- Can you say what desktop & theme you are using?

- Do you *see* the strange characters on the gsmartcontrol display (rather than just the complaint in the terminal)?
- Can you please attach a screenshot of a display you know has bad characters?
- And add all the equivalent terminal output to the attachment comment.
- And say what language your system is.

CC: (none) => lewyssmith

Lewis Smith 2019-12-12 20:54:17 CET

Source RPM: gsmartcontrol => gsmartcontrol-1.1.3-2.mga7.src.rpm

Comment 3 Lewis Smith 2019-12-12 21:16:15 CET
See also bug 25859.
Sorry. I spoke too soon above... The screenshot:
 https://bugs.mageia.org/attachment.cgi?id=11399
attached to *that* bug clarifies this one (and would have helped here): it shows both problems, and negates my previous comment 2 and its requests for more info. Eat humble pie. I did not think to look at other tabs...

1. The lozenges are where ',' appears in an English-based system (thousands separator). Is yours French? It would be a LOCALE related problem.

2. The paler displays are in tabulated results, not generalised. I can see them in at least the Attributes, Self-tests, Advanced tabs.
Comment 4 Pierre Jarillon 2019-12-13 00:45:15 CET
The thousands separator in french must be a thin non breakable space.
With the traditonnal french notation, the comma is used to separate the decimal and the dot was the separartor for thousands .
But for more convenience with english, the dot is now often used for the decimal and the comma for thousands must be replaced with a thin space. Thus avoiding all confusion.
Comment 5 Lewis Smith 2019-12-14 11:36:10 CET
I know the traditional habit - living in France! Changing it is confusing.
But I thought computer systems honoured the normal French practice of '.' for thousands, ',' for decimal. If increasing practice is as you describe, the thin space is not I think a basic ASCII character, and asking for trouble to use it.
Just my view.

Worth confirming, please, how long numbers (with a decimal part) are displayed on your system by other software. If correctly, why does gsmartcontrol do differently?
Comment 6 Pierre Jarillon 2019-12-14 18:16:42 CET
Most of software display long numbers without separators (comma or space).
LibreOffice can manage the numeric format (Format -> Numeric).
value (entered) -> 12345678
displayed (money) -> 12 345 678,00 €
displayed (numbers) -> 12 345 678,00 
displayed (thousands separator) -> 12 345 678

Google maps uses English notation for distance measurement.
Kcalc displays: 123 456 789,33

gsmartcontrol translate the comma of smartctl in a non displayable character.
Started from a konsole this message is displayed dozens of time each time I open the pop-up of a disk:

(gsmartcontrol:16628): Pango-WARNING **: 18:05:02.657: Invalid UTF-8 string passed to pango_layout_set_text()
Comment 7 Lewis Smith 2019-12-14 20:30:27 CET
Thank you for the tests. It looks - does it not? - that the thousands separator is usually a normal 'space' on your system.

> gsmartcontrol translate the comma of smartctl in a non displayable character
Not necessarily so. I have just tried:
 # smartctl -A /dev/sda
...
 241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       96593654095914
 242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       133785299420308
and one can see that long figures (shown with comma thousands separator in Gsmartcontrol Attribute tab) do *not* have commas at all; such numeric strings are output 'straight'. So the problem seems to come from Gsmartcontrol's formatting of these straight numbers, rather than a translation of the separator.

No need to poke further. The issues are clear enough.
Comment 8 Aurelien Oudelet 2021-07-06 13:14:46 CEST
Mageia 7 is EOL since July 1st 2021.
There will not have any further bugfix for this release.

You are encouraged to upgrade to Mageia 8 as soon as possible.

@reporter, if this bug still apply with Mageia 8, please let us know it.

@packager, if you work on the Mageia 7 version of your package, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead.

This bug report will be closed OLD if there is no further notice within 1st September 2021.
Comment 9 Pierre Jarillon 2021-07-07 00:23:58 CEST
The wrong code for the separator is no longer true with Mageia 8.

So, I close the bug I have opened. Thanks to Lewis Smith!

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.