GNOME Bugzilla – Bug 515502
Replay of .log files causes wrong running sum in account
Last modified: 2018-06-29 22:01:03 UTC
See attached screenshots. This is a bank account in GnuCash 2.2.0. The problem seems to have introduced since I replayed the log files of another version of the file. Some time ago, I had saved the file under a different filename, to make a backup, and forgot to go back to main file, worked on the backup. Today, (instead of just copying the backup over the main file,) I replayed the .log files of the backup file on top of the main file. This must have caused this state here. I still have the .log files, but they are privacy-sensitive of course, I won't send them around.
Created attachment 104805 [details] Screenshot 1
Created attachment 104806 [details] Screenshot 2
Not crash - major
Per http://bugzilla.gnome.org/page.cgi?id=bug-status.html#bug_severity , data loss is critical, and this is data loss - in fact, worse than data loss: silently *wrong* data.
Have you tried to save the file and reopen it to see if the values were corrected? Those balance values are not permanent values but are recalculated. Have you tried this again to see if it can be reproduced?
> Have you tried to save the file and reopen it to see if the values were > corrected? Yes. The problem was persistent. The only way I found to fix this was to go back to a much older file and manually redo everything I did since then.
I just tried the following: 1) Load file A 2) Save as file B (current file is now file B) 3) Add some transactions (to file B) 4) Save file B 5) Load file A 6) Replay file B's log As far as I can tell, everything is OK. I only added 2 transactions, one a deposit and one a withdrawal from a bank account. Is there any other information you can provide? I understand your privacy concern, but if I can't reproduce it, it makes it much harder to fix because I can't be sure I fixed your specific problem. My understanding is that you have a data file (your "main file") and a log file (activity on your "backup file"), and that if you apply the log file to the data file, you get this corruption. Can you send me those files? Can you remove extra transactions from your data file and send me what's left?
Any update here?
I haven't been asked any concrete question. For me, the problem is long solved for me by redoing everything (comment 6). I still have the fold, broken file and log files, though.
I suspect this bug is a duplicate of bug 378638. In the first example, the calculated balance is the result of adding 242 once and substracting 10744 three times: 18.105,11 + 242 - 10.744 - 10.744 - 10.744 = -13.884,89 In the second example, a similar calculation can be made: 7.358,28 - 6.647,92 - 6.647,92 = -5.936.56 (one transaction counted twice) -5936.56 - 6.647,92 - 6.647,92 + 1.119,05 = -18.113,35 (same transaction counted twice more) ... So it is very likely the log replay has recreated several transactions multiple times. According to bug 378638, this doesn't show because these transactions all have the same guid and hence are only displayed once in the register, but the balance calculation code does take all the transactions into account. Ben, can you verify if the old, broken data file effectively has these transactions multiple times ?
Yes. I have 2 transactions, both with the same transaction IDs, split IDs and account IDs, with value 10.744. I have 4 transactions (again with the same IDs everywhere) for 6.647,92. It does sound like bug 378638. Thanks a lot! What's wondering me is why that was acknowledged by GnuCash developers, but, despite being an obvious and severe bug, not fixed. The bug costed me many hours, if not a day. Everybody who tries to replay any log file more than once (which is likely, given the many small log files written) would run into it, apparently. *** This bug has been marked as a duplicate of bug 378638 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=515502. Please update any external references or bookmarks.