Bug 430178

Summary: App freezes when toggling currency in investment performance report
Product: [Applications] kmymoney Reporter: spamme
Component: reportsAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.1.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.1

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