Bug 421696 - Hard disk activity: duplicated sensors appear in the list
Summary: Hard disk activity: duplicated sensors appear in the list
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor widgets (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-17 21:29 UTC by Luca Beltrame
Modified: 2020-05-22 10:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2020-05-17 21:29:47 UTC
SUMMARY

Adding a new sensors representing the I/O of all disks causes the "All Sensors" list to grow two new "Disk Write Access" and "Disk Read Access" upon clicking "Apply". The new sensor name disappears as well, although the entry stays.

STEPS TO REPRODUCE
1. Add a hard disk activity widget
2. Go to preferences > Sensors Details
3. Select "partitions" > All > select a sensor and add it
4. Click Apply

OBSERVED RESULT

Two new pair of sensors appear in the list and the newly-added sensor in "Chart Sensors" loses its name (replaced by a blank string)

EXPECTED RESULT

Sensor is added correctly and the list of available sensor stay the same.

SOFTWARE/OS VERSIONS

Plasma from git master, KF5 from git master, Qt 5.15 RC.
Comment 1 David Edmundson 2020-05-17 21:31:10 UTC
>Adding a new sensors representing the I/O of all disks causes the "All Sensors" list to grow two new "Disk Write Access" and "Disk Read Access" upon clicking "Apply". The new sensor name disappears as well, although the entry stays


I don't understand, can you include a screenshot?
Comment 2 David Edmundson 2020-05-17 21:32:39 UTC
edit, nm. Reproduced then it was clearly what you meant
Comment 3 David Edmundson 2020-05-19 20:34:32 UTC
Found it eventually.

There's a "/" in the ID and SensorTreeModel trips up on it.

Should have a fix soon.
Comment 4 David Edmundson 2020-05-22 10:06:30 UTC
> @bug_id = 421696
> @bug_status = RESOLVED
> @resolution = FIXED
> @cf_commitlink = https://invent.kde.org/plasma/libksysguard/commit/53149ebd08c6cd5189969341d1eceed200d17fb1
>
> Git commit 53149ebd08c6cd5189969341d1eceed200d17fb1 by David Edmundson.
> Committed on 22/05/2020 at 10:02.
> Pushed by davidedmundson into branch 'Plasma/5.19'.
>
> [sensors] Avoid breaking IDs of nodes within SensorTreeModel
>
> item->name despite the name, is an ID of the relevant segment in the
> node.
>
> It is not the user facing name. That's always in d->sensorInfos.
>
> By changing it here when double clicking an item we get a metaDataChange
> as the Sensor object is constructed, which in turn breaks a lot of model
> assumptions.
>
> M  +0    -1    sensors/SensorTreeModel.cpp
>
> https://invent.kde.org/plasma/libksysguard/commit/53149ebd08c6cd5189969341d1eceed200d17fb1