Bug 418479 - Historical Investment Transactions causes crash
Summary: Historical Investment Transactions causes crash
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.5
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-04 19:20 UTC by JAH
Modified: 2022-11-08 06:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Anonomised data in support of bug description (3.90 MB, application/xml)
2020-04-08 11:07 UTC, JAH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JAH 2020-03-04 19:20:23 UTC
SUMMARY
I frequently "catch up" with posting my investment transactions at the end of the month and that sometimes involves creating new securities for transactions that happened earlier in the month. This hasn't caused a problem before

Now, posting investment transactions dated prior to a Security's/Equity's Opening_Date (kmmAccounts.openingDate) (which does not appear to be user definable) causes kmmoney to crash consistently.

STEPS TO REPRODUCE
1. Create an new Investment Security as normal 
2. Post an Investment transaction (Buy) with a date prior to today's date (i.e. the security's creation date)

OBSERVED RESULT
Kmymoney crashes

EXPECTED RESULT
Transaction should post as normal

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.12.8
KDE Frameworks Version: 5.55.0 and 5.45.0
Qt Version: 5.9.7 and 5.9.4

ADDITIONAL INFORMATION

Posting the same transaction using today's date or later is successful.

By saving the data in  a SQL database and then amending the security's kmmAccounts.openingDate to a time earlier than the transaction date allows the transaction to be posted without problem.

kmymoney is otherwise brilliant!
Comment 1 JAH 2020-03-06 11:39:20 UTC
This bug also creates a Data Consistency fault when saving work:

"The investment X has no price set for the Opening Date dd/mm/yy"
 
Normally entering the initial "Buy" transaction would also update the opening price but since you cannot complete the "Buy" transaction there is no price history. Nor is it obvious how to solve the data inconsistency because the security (having no holding) does no appear in the Menu > Tools > Prices dialog. I did discover eventually that it can be given a price by going via Accounts> Select Investment > Select Security > Right Click for "Manual Price Update" but that was anything but intuitive and I think many users would have given up by then.
Comment 2 Thomas Baumgart 2020-03-07 05:51:33 UTC
No need to have the product duplicated in the summary.
Comment 3 Thomas Baumgart 2020-03-07 06:10:18 UTC
I tried to duplicate this with 5.0.8 from the git stable branch. It did not happen to me. My test environment:

Investment account with opening date: 2018-01-01
Security account with opening date:   2018-01-15

When I enter a buy transaction with date 2018-01-02 no crash occurs. When I try to enter a buy transaction with date 2017/12/31 the date widget turns red and the enter button is disabled. Again, no crash.

Would you mind checking that using an AppImage version of KMyMoney (see https://kmymoney.org/appimage.html) in case your distro does not provide an updated package?
Comment 4 JAH 2020-03-07 16:58:13 UTC
Thanks for the quick reply. I have tried my data using AppImage Kmymoney Vn5.0.8 and problem recurs consistently with:

Investment Account A000362 Opened 01/01/2019 
Security A000366 (and others A000367 A000368) OpeningDate 04/03/2020
posted to Transaction Date 07/06/2019

I note however that the same posting process (i.e. Transaction Date prior to Security Opening Date) used on another Investment Account has been successful and resulted in the Security Opening Date being reset to the (earlier) Transaction posting date. Also new securities added (using Kmymoney Vn5.0.8) to InvAcct A000362 since do not seem to show the same problem.

Since it only affected 4 Securities for me I have worked around the problem by manually changing those Security's Opening Date via SQL but if you think it worth investigating, I have anonymised my data.

Thanks again for your consideration.
Comment 5 Bug Janitor Service 2020-03-22 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Thomas Baumgart 2020-03-22 06:14:45 UTC
Sorry, I must have missed your last reply. Of course we are interested to take a look at the details what is causing this problem. Your anonymized data will be very helpful in this respect. Thanks for your support.
Comment 7 Bug Janitor Service 2020-04-06 04:33:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 JAH 2020-04-08 11:07:51 UTC
Created attachment 127384 [details]
Anonomised data in support of bug description

Apologies for the delay in submitting this data
Comment 9 Thomas Baumgart 2020-04-12 08:15:01 UTC
Set state so that the bug janitor keeps calm next time
Comment 10 Justin Zobel 2022-10-06 06:37:16 UTC
Thank you for reporting this crash in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the crash with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 11 Jack 2022-10-06 16:53:08 UTC
JAH - at this point, 5.0.6 is pretty old, and OpenSUSE should have some 5.1 version released.  Can you check if this still happens in a newer version?
Comment 12 Bug Janitor Service 2022-10-21 05:00:59 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Bug Janitor Service 2022-11-05 05:09:22 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 14 JAH 2022-11-07 01:40:01 UTC
Sorry I've not been able to post for a while. This bug does indeed appear resolve in kmymoney-5.1-291-linux-64-gcc.AppImage. Thank you.