Bug 430178 - App freezes when toggling currency in investment performance report
Summary: App freezes when toggling currency in investment performance report
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-09 10:38 UTC by spamme
Modified: 2020-12-13 07:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spamme 2020-12-09 10:38:25 UTC
SUMMARY
The currency in the investment performance reports is by default the base currency. The app stops responding when one tries to switch to the original currencies.

STEPS TO REPRODUCE
1. Open "Investment Performance by Account" (or by Type) report
2. Click "Configure"
3. Toggle "Convert values to base currency" off

OBSERVED RESULT
Application stops responding.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux, latest
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.12.2
Comment 1 Thomas Baumgart 2020-12-12 18:59:12 UTC
Git commit 2e1912fc639f5471f8f57d6979c182cc0b126854 by Thomas Baumgart.
Committed on 12/12/2020 at 18:58.
Pushed by tbaumgart into branch '5.1'.

Fix infinite loop in reports

The exchange algorithm for the total rows always kept exchanging the
last two entries with themselves and never ended. This is caused by
totals for multiple currencies.

This change detects this scenario and avoids the infinite loop.
FIXED-IN: 5.1.1

M  +8    -2    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/2e1912fc639f5471f8f57d6979c182cc0b126854
Comment 2 Thomas Baumgart 2020-12-13 07:20:50 UTC
Git commit 5053e4ecd556470c59db7fd42601be814f2f0b9f by Thomas Baumgart.
Committed on 13/12/2020 at 06:33.
Pushed by tbaumgart into branch 'master'.

Fix infinite loop in reports

The exchange algorithm for the total rows always kept exchanging the
last two entries with themselves and never ended. This is caused by
totals for multiple currencies.

This change detects this scenario and avoids the infinite loop.
FIXED-IN: 5.1.1

(cherry picked from commit 2e1912fc639f5471f8f57d6979c182cc0b126854)

M  +8    -2    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/5053e4ecd556470c59db7fd42601be814f2f0b9f