Bug 455871 - SameGame: if you click very fast, you get a very high score
Summary: SameGame: if you click very fast, you get a very high score
Status: RESOLVED FIXED
Alias: None
Product: klickety
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: nihui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-24 03:07 UTC by tusooa
Modified: 2022-07-01 18:13 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2022-06-24 03:07:04 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
I got a score of 9890 by clicking very fast. Actually, I can reliably repeat the fast-clicking process and get a score of >4000. However, clicking slowly will result in a low score. I feel there is some race condition here.

STEPS TO REPRODUCE
1. Open SameGame.
2. Finish a game by randomly clicking very fast.
3. Finish a game by randomly clicking very slowly.

OBSERVED RESULT
They should have similar scores.

EXPECTED RESULT
(2) [>4000] gives a score way higher than (3) [~1000]

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  5.18.3-gentoo-x86_64 / 5.25.1
(available in About System)
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4-r3

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2022-06-29 22:32:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/games/klickety/-/merge_requests/7
Comment 2 Albert Astals Cid 2022-07-01 18:13:23 UTC
Git commit 54cabb534358f90734578a029d4c9f609be572bd by Albert Astals Cid.
Committed on 29/06/2022 at 22:32.
Pushed by aacid into branch 'release/22.04'.

Fix score being wrongly calculated if clicking while animation is running

M  +8    -0    src/gamescene.cpp

https://invent.kde.org/games/klickety/commit/54cabb534358f90734578a029d4c9f609be572bd