Bug 513676 - Discover pops notification showing ≈uint64 updates available
Summary: Discover pops notification showing ≈uint64 updates available
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 6.5.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-21 20:09 UTC by Apicultor
Modified: 2026-01-27 18:06 UTC (History)
2 users (show)

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


Attachments
Screenshot (13.05 KB, image/png)
2025-12-21 20:09 UTC, Apicultor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Apicultor 2025-12-21 20:09:39 UTC
Created attachment 187858 [details]
Screenshot

SUMMARY
Discover pops notification showing ≈uint64 updates available

STEPS TO REPRODUCE
I cannot reproduce this reliably.

OBSERVED RESULT
uint64 minus a few

EXPECTED RESULT
sanity

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Kinoite 43.20251215.0
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Comment 1 Nate Graham 2025-12-22 20:52:10 UTC
That's a lot of updates! Looks like a rollover error, fun.
Comment 2 Bug Janitor Service 2026-01-21 11:41:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/1240
Comment 3 Harald Sitter 2026-01-26 15:05:32 UTC
Git commit e5090761d534f1024c13f70dea0623370ffdeade by Harald Sitter.
Committed on 26/01/2026 at 15:05.
Pushed by sitter into branch 'master'.

discoverobject: don't impliclity convert signedness

this seems to cause headaches where we endup sending a negative number
into an unsigned.

add a tiny conversion helper that makes sure the values are sound so we
don't underflow. if nothing else it should at least help us understand
when/how exactly things go wrong

M  +7    -0    discover/CMakeLists.txt
M  +24   -4    discover/DiscoverObject.cpp

https://invent.kde.org/plasma/discover/-/commit/e5090761d534f1024c13f70dea0623370ffdeade
Comment 4 Harald Sitter 2026-01-26 15:05:34 UTC
Git commit 1dd78ff935c0a1918e977e8d232b9f6f20b3ac66 by Harald Sitter.
Committed on 26/01/2026 at 15:05.
Pushed by sitter into branch 'master'.

discoverobject: update job amounts when transactions get added

this is the complementary function to refreshInfo. when the
TransactionModel gets another transaction added we incraese the job's
amount by **exactly** 1. this allows for a trivial assertion that the
oldAmount is not at the numeric limit to prevent an overflow.

M  +10   -0    discover/DiscoverObject.cpp

https://invent.kde.org/plasma/discover/-/commit/1dd78ff935c0a1918e977e8d232b9f6f20b3ac66
Comment 5 Harald Sitter 2026-01-26 15:05:40 UTC
Git commit 1d95622767552f0f41a3c8f5ddcea2614dd0c164 by Harald Sitter.
Committed on 26/01/2026 at 15:05.
Pushed by sitter into branch 'master'.

discoverobject: do not change amounts during start() & refine assertion

we actually have somewhat different expectations depending on how the
refresh was called. when called as part of start we strictly expect no
change. when called by the remove function we strictly expect a decrease
of exactly one.

this actually works in our favor because we can now untangle the +1
mess.

start() now calls refreshInfo(nullptr) to bypass the amount update.
meanwhile the actual remove signal will pass a valid transaction and
allow us to subtract **exactly** 1 from the oldAmount. this then means
we can simply assert that the oldAmount isn't 0 to prevent an underflow.

this does now require additional tracking of transaction adding! to be
added in a follow-up commit

M  +12   -8    discover/DiscoverObject.cpp

https://invent.kde.org/plasma/discover/-/commit/1d95622767552f0f41a3c8f5ddcea2614dd0c164
Comment 6 Bug Janitor Service 2026-01-26 15:07:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/1250
Comment 7 Nate Graham 2026-01-27 17:40:37 UTC
Git commit a801b7a50d33a02a0e2b4c7fc54e7f93dc234e09 by Nate Graham, on behalf of Harald Sitter.
Committed on 27/01/2026 at 17:40.
Pushed by ngraham into branch 'Plasma/6.6'.

discoverobject: do not change amounts during start() & refine assertion

we actually have somewhat different expectations depending on how the
refresh was called. when called as part of start we strictly expect no
change. when called by the remove function we strictly expect a decrease
of exactly one.

this actually works in our favor because we can now untangle the +1
mess.

start() now calls refreshInfo(nullptr) to bypass the amount update.
meanwhile the actual remove signal will pass a valid transaction and
allow us to subtract **exactly** 1 from the oldAmount. this then means
we can simply assert that the oldAmount isn't 0 to prevent an underflow.

this does now require additional tracking of transaction adding! to be
added in a follow-up commit
(cherry picked from commit 1d95622767552f0f41a3c8f5ddcea2614dd0c164)

M  +12   -8    discover/DiscoverObject.cpp

https://invent.kde.org/plasma/discover/-/commit/a801b7a50d33a02a0e2b4c7fc54e7f93dc234e09
Comment 8 Nate Graham 2026-01-27 17:40:39 UTC
Git commit 099b214dc0b6f691bef08d5aefb9d0c1d0d57379 by Nate Graham, on behalf of Harald Sitter.
Committed on 27/01/2026 at 17:40.
Pushed by ngraham into branch 'Plasma/6.6'.

discoverobject: update job amounts when transactions get added

this is the complementary function to refreshInfo. when the
TransactionModel gets another transaction added we incraese the job's
amount by **exactly** 1. this allows for a trivial assertion that the
oldAmount is not at the numeric limit to prevent an overflow.
(cherry picked from commit 1dd78ff935c0a1918e977e8d232b9f6f20b3ac66)

M  +10   -0    discover/DiscoverObject.cpp

https://invent.kde.org/plasma/discover/-/commit/099b214dc0b6f691bef08d5aefb9d0c1d0d57379
Comment 9 Nate Graham 2026-01-27 17:40:45 UTC
Git commit 11e5e5c3673266f44ceb43fc929c3e2d78da7f82 by Nate Graham, on behalf of Harald Sitter.
Committed on 27/01/2026 at 17:40.
Pushed by ngraham into branch 'Plasma/6.6'.

discoverobject: don't impliclity convert signedness

this seems to cause headaches where we endup sending a negative number
into an unsigned.

add a tiny conversion helper that makes sure the values are sound so we
don't underflow. if nothing else it should at least help us understand
when/how exactly things go wrong
(cherry picked from commit e5090761d534f1024c13f70dea0623370ffdeade)

M  +7    -0    discover/CMakeLists.txt
M  +24   -4    discover/DiscoverObject.cpp

https://invent.kde.org/plasma/discover/-/commit/11e5e5c3673266f44ceb43fc929c3e2d78da7f82
Comment 10 Apicultor 2026-01-27 18:06:49 UTC
>we endup sending a negative number into an unsigned

Stupid question, but how do we end up with a negative value for the number of updates available in the first place?