Bug 421056 - Freeze: logarithmic vertical axis and negative data range From value
Summary: Freeze: logarithmic vertical axis and negative data range From value
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: reports (show other bugs)
Version: git (master)
Platform: Manjaro Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 12:57 UTC by Robert Szczesiak
Modified: 2020-06-05 04:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0


Attachments
Custom report configuration windows just before clicking 'Apply' (69.78 KB, image/png)
2020-05-05 12:57 UTC, Robert Szczesiak
Details
Warning window that appears after a while (34.81 KB, image/png)
2020-05-05 13:22 UTC, Robert Szczesiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Szczesiak 2020-05-05 12:57:26 UTC
Created attachment 128173 [details]
Custom report configuration windows just before clicking 'Apply'

SUMMARY
KMyMoney freezes when user tries to create a custom Net Worth Graph report chart with 'Logarithmic vertical axis' option checked and user defined Data range with From set to a negative value.

STEPS TO REPRODUCE
1. Go to Reports -> Net Worth Graph and click the 'Configure' button.
2. In the Report -> Chart tab enable 'Logarithmic vertical axis' checkbox.
3. In the Report -> Range tab select Range: User defined, then input a negative From value.
4. Click the Apply button.

OBSERVED RESULT
KMyMoney freezes and after a longer while a warning window appears, saying: Application "kmymoney" is not responding. 

EXPECTED RESULT
User should not be allowed to enter data range From and To values lower than zero when using logarithmic vertical axis. Zero value should be handled as "0" might mean incomplete positive value, e.g. "0.1".

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Please find attached screenshots presenting the issue.
Comment 1 Robert Szczesiak 2020-05-05 13:22:46 UTC
Created attachment 128175 [details]
Warning window that appears after a while
Comment 2 Thomas Baumgart 2020-05-08 11:40:15 UTC
Git commit d546edecf989a2c623bd42c72a4758d4916ac870 by Thomas Baumgart, on behalf of Robert Szczesiak.
Committed on 08/05/2020 at 11:38.
Pushed by tbaumgart into branch 'master'.

Fix Freeze: logarithmic vertical axis and negative data range From value

Summary:
Added a new validator for data range From and To values that ensures
user be unable to specify data range values lower than the precision
limit (always positive). The fields are re-validated when the user
checks/unchecks the 'Logarithmic vertical axis' option.

Reviewers: tbaumgart

Tags: #kmymoney

Differential Revision: https://phabricator.kde.org/D29446

M  +8    -0    kmymoney/kmymoneyutils.cpp
M  +21   -0    kmymoney/kmymoneyutils.h
M  +133  -46   kmymoney/plugins/views/reports/reporttabimpl.cpp
M  +19   -0    kmymoney/plugins/views/reports/reporttabimpl.h

https://commits.kde.org/kmymoney/d546edecf989a2c623bd42c72a4758d4916ac870
Comment 3 Thomas Baumgart 2020-05-08 11:48:30 UTC
Git commit 793483e956310cfee0841ceb8256c9c41c96c840 by Thomas Baumgart.
Committed on 08/05/2020 at 11:48.
Pushed by tbaumgart into branch '5.0'.

Fix Freeze: logarithmic vertical axis and negative data range From value

Summary:
Added a new validator for data range From and To values that ensures
user be unable to specify data range values lower than the precision
limit (always positive). The fields are re-validated when the user
checks/unchecks the 'Logarithmic vertical axis' option.
FIXED-IN: 5.0.9

Reviewers: tbaumgart

Tags: #kmymoney

Differential Revision: https://phabricator.kde.org/D29446

(cherry picked from commit d546edecf989a2c623bd42c72a4758d4916ac870)

M  +8    -0    kmymoney/kmymoneyutils.cpp
M  +21   -0    kmymoney/kmymoneyutils.h
M  +134  -47   kmymoney/plugins/views/reports/reporttabimpl.cpp
M  +19   -0    kmymoney/plugins/views/reports/reporttabimpl.h

https://commits.kde.org/kmymoney/793483e956310cfee0841ceb8256c9c41c96c840