Bug 445467 - App crash on duplicating the transaction
Summary: App crash on duplicating the transaction
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources All
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-14 11:20 UTC by Hamdsa
Modified: 2021-12-04 18:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hamdsa 2021-11-14 11:20:34 UTC
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.  Application crashes on duplicating a transaction the second time. (First duplicate seems to happen fine)
2. 
3. 

OBSERVED RESULT
Application crash
Tested on multiple transactions with same result

EXPECTED RESULT
Ability to duplicate transaction and change the date of the duplicate transaction.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Version 5.1.80-975809041
Comment 1 Thomas Baumgart 2021-11-14 12:33:38 UTC
Version 5.1.80-975809041 is rather old

> commit 975809041ec757304c440f8ac77eec9c4c515ce3
> Author: l10n daemon script <scripty@kde.org>
> Date:   Sat Sep 11 01:15:45 2021 +0000
> 
>    SVN_SILENT made messages (.desktop file) - always resolve ours
>    
>    In case of conflict in i18n, keep the version of the branch "ours"
>    To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

No, it is not meant that versions dated 9/11 are supposed to crash. That is pure coincidence.

Anyway, I was unable to reproduce it on current master on Linux. Can you confirm that the problem does not exist anymore or provide more details and what exactly are you doing to cause the crash.
Comment 2 Hamdsa 2021-11-14 12:59:06 UTC
Version 5.1.80-975809041: I installed it using the current master version link. Just downloaded and re-installed to make sure and I get the same version. Can you point me to if there is a later version for windows than this?
I am in the ledger view and trying to duplicate an existing transaction, while only changing the date of the transaction. The first duplicate operation seems to go through fine but if I try to duplicate the same transaction again (for a different date), it crashes. I tried with multiple transaction and same results.
Also what should I change the status to after providing information for a bug that is still open?
Thanks.
Comment 3 Thomas Baumgart 2021-11-14 15:30:22 UTC
Unfortunately, the windows builds depend on other material (libraries, build systems) that we don't control. We have informed upstream but did not receive any solution to the problem yet. 

Regarding the subject, I tried again to duplicate the crash. I have no problem whatsoever to duplicate a transaction multiple times and changing the postdate afterwards. Is there anything special about the transaction? In which account type do you do this? Is this a merged or imported transaction? It must be a little detail causing it (unless it is already fixed).

Regarding the state of a ticket when you provided information: simply change it back to REPORTED with you answer.
Comment 4 Thomas Baumgart 2021-11-15 19:28:23 UTC
Quick update on the failing windows builds: the root cause has been found and an update has been commited to the respective repository (see https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/300c129b1411d26c26a896ec1cdcf5266d71fd43). Hopefully, there is not something else in the way for a successful windows build.
Comment 5 Bug Janitor Service 2021-11-30 04:38:38 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 Hamdsa 2021-12-04 12:34:27 UTC
I installed the latest master version for windows "kmymoney-master-1349-windows-msvc2019_64-cl"
Apart from the slow over all responsiveness of the program, the issue of app crashing on duplicate transactions still exists.
Further testing revealed the crash does not happen simply at the time of duplicating itself but rather when you try to change the copied/duplicated transaction. Meaning if I duplicate the transaction and leave it as-is (with today's date as the default on duplication), the transaction stays in the register. If try to change the date on that transaction, the app crashes and the duplicated transaction is gone from the register.
Comment 7 Thomas Baumgart 2021-12-04 18:47:24 UTC
Thanks for the additional information. I located the problem: it is not related to a duplicate transaction, but can also happen when you modify the date of an existing transaction. The crash only happens when the post date changes to an older date and the new location of the modified transaction will remain in the ledger. If the date is changed in the other direction (becomes newer) even when the location in the ledger is not changed there is no crash. Also, if the transaction is moved to a different location in the former case no crash happens.
Comment 8 Thomas Baumgart 2021-12-04 18:49:20 UTC
Git commit 2a2e6a87f0d6ccbb4cc9273322162dc9da2248e3 by Thomas Baumgart.
Committed on 04/12/2021 at 18:48.
Pushed by tbaumgart into branch 'master'.

Catch corner case of unmodified order in model

M  +7    -2    kmymoney/mymoney/storage/journalmodel.cpp

https://invent.kde.org/office/kmymoney/commit/2a2e6a87f0d6ccbb4cc9273322162dc9da2248e3