Bug 445458 - Investment Cap Gains by Account (Customized) crashes with my dataset. Changing the date of one ledger entry fixes the crash.
Summary: Investment Cap Gains by Account (Customized) crashes with my dataset. Changin...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: reports (show other bugs)
Version: 5.1.2
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-14 04:22 UTC by Dr. John-Patrick Lestrade
Modified: 2021-11-14 12:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.3


Attachments
Kmymoney file for client Walter White. (4.71 KB, application/gzip)
2021-11-14 04:22 UTC, Dr. John-Patrick Lestrade
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. John-Patrick Lestrade 2021-11-14 04:22:16 UTC
Created attachment 143529 [details]
Kmymoney file for client Walter White.

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
***


STEPS TO REPRODUCE
1. Load my file KM1.kmy
2. Go to Reports and choose Inv. Cap Gains by Account (Custom) (N.B. I did not create that custom report)
3. Crash. Restart
4. Go into ledger for "MethProfits". Change the date of the 737.85 ADDED Shares from 10/10/17 to 10/10/10 (mm/dd/yy)
5. Repeat step 3 above. This time it does not crash.

OBSERVED RESULT
Wife leaves me. etc

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Ubuntu/Gnome 

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2021-11-14 10:17:49 UTC
Git commit 16afce344c239ac7b1919dbff3d7f638ca4ac3cf by Thomas Baumgart.
Committed on 14/11/2021 at 10:13.
Pushed by tbaumgart into branch 'master'.

Prevent a division by zero in  Investment Cap Gains reports

When the sum of all buys in the reporting period was zero a division by
zero could happen

M  +9    -4    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/16afce344c239ac7b1919dbff3d7f638ca4ac3cf
Comment 2 Thomas Baumgart 2021-11-14 12:23:14 UTC
Git commit f11f53c8a61495c6ac65e938075af9f8a106d481 by Thomas Baumgart.
Committed on 14/11/2021 at 12:22.
Pushed by tbaumgart into branch '5.1'.

Prevent a division by zero in Investment Cap Gains reports

When the sum of all buys in the reporting period was zero a division by
zero could happen
FIXED-IN: 5.1.3

(cherry picked from commit 16afce344c239ac7b1919dbff3d7f638ca4ac3cf)

M  +9    -4    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/f11f53c8a61495c6ac65e938075af9f8a106d481