Bug 455871

Summary: SameGame: if you click very fast, you get a very high score
Product: [Applications] klickety Reporter: tusooa <tusooa>
Component: generalAssignee: nihui <shuizhuyuanluo>
Status: RESOLVED FIXED    
Severity: normal CC: kde-games-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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