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
That's a lot of updates! Looks like a rollover error, fun.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/1240
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
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
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
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/1250
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
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
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
>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?