Bug 513883 - Crash when invoking calculator in amount widget
Summary: Crash when invoking calculator in amount widget
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: git (master)
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-27 17:27 UTC by Thomas Baumgart
Modified: 2025-12-27 17:38 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2025-12-27 17:27:26 UTC
SUMMARY & STEPS TO REPRODUCE
When entering an amount edit widget in the transaction editor the full amount is selected (highlighted) by default. To reproduce the crash, only select a portion of the value. For example, if the amount is 36.00, only select 36. Then, press e.g. the slash key on the keyboard to divide.

OBSERVED RESULT
The window freezes and the app crashes. 

EXPECTED RESULT
I expect the calculator window to appear with the full amount being loaded.

ADDITIONAL INFORMATION
Highlighting the full amount (dollars and cents) works just fine without crashing.
Comment 1 Thomas Baumgart 2025-12-27 17:37:59 UTC
Git commit 7ed05dc50cf8eea74b720caab8aca69375db6833 by Thomas Baumgart.
Committed on 27/12/2025 at 17:37.
Pushed by tbaumgart into branch 'master'.

Prevent infinite recursion in amount edit widget

When the text in the amount edit widget is only partially selected and a
math operation key is pressed an infinite recursion was caused which
leads to crashes. This change prevents this from happening.
FIXED-IN: 5.2.2

M  +0    -11   kmymoney/widgets/amountedit.cpp

https://invent.kde.org/office/kmymoney/-/commit/7ed05dc50cf8eea74b720caab8aca69375db6833
Comment 2 Thomas Baumgart 2025-12-27 17:38:20 UTC
Git commit 69b68eb735dbf8049e8387ccdf9298362e515ef3 by Thomas Baumgart.
Committed on 27/12/2025 at 17:38.
Pushed by tbaumgart into branch '5.2'.

Prevent infinite recursion in amount edit widget

When the text in the amount edit widget is only partially selected and a
math operation key is pressed an infinite recursion was caused which
leads to crashes. This change prevents this from happening.
FIXED-IN: 5.2.2
(cherry picked from commit 7ed05dc50cf8eea74b720caab8aca69375db6833)

M  +0    -11   kmymoney/widgets/amountedit.cpp

https://invent.kde.org/office/kmymoney/-/commit/69b68eb735dbf8049e8387ccdf9298362e515ef3