GnuCash
Contact   Instructions
Bug 797646 - Crash When Finishing Reconciliation After Editing Transaction To Un-Anchor To Account
Summary: Crash When Finishing Reconciliation After Editing Transaction To Un-Anchor To...
Status: NEEDINFO
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Register (show other bugs)
Version: 3.8
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-13 14:51 EDT by Adrien
Modified: 2021-09-24 18:34 EDT (History)
5 users (show)

See Also:


Attachments
MacOS Crash Report (14.85 KB, text/plain)
2020-03-13 14:51 EDT, Adrien
no flags Details
Tracefile (88.37 KB, application/octet-stream)
2020-03-13 14:52 EDT, Adrien
no flags Details

Description Adrien 2020-03-13 14:51:52 EDT
Created attachment 373604 [details]
MacOS Crash Report

I was reconciling a cash account and found two transactions, one with a blank debit and one with a blank credit. ($0.00 assigned to the anchoring split, likely entered in that register by mistake with the split not removed before starting the reconciliation)

I edited the credit transaction to remove the $0.00 split, and it seems it had another anchoring split with a value, so it remained in the account.

I then edited the debit transaction to remove the anchoring split, and while it did disappear from the register, it remained in the reconciliation window.

When I clicked the Finish button, GnuCash crashed with the attached report.
Comment 1 Adrien 2020-03-13 14:52:15 EDT
Created attachment 373605 [details]
Tracefile
Comment 2 Adrien 2020-03-13 14:58:33 EDT
Interestingly, some of the transactions were marked 'y' but not all. A subsequent reconciliation completed successfully.
Comment 3 John Ralls 2020-03-13 19:34:03 EDT
The crash is on attempting to get the priv element of a split, likely one of the deleted ones. Perhaps deleting a split doesn't cause the reconcile views to refresh. Bob-IT?

The reconcile process would have been traversing the list of splits-to-be-reconciled, so the ones that had been processed before it encountered the deleted one and crashed would be marked reconciled. IIRC you use a SQL backend so each transaction change is written out as the change is made.
Comment 4 Adrien 2020-03-13 20:52:21 EDT
Yes, I use SQlite. And while I didn't carefully look over the list of what wasn't reconciled on the first pass, based on what I did notice, your assessment seems reasonable. The list of transactions remaining to be reconciled were all more recent and thus likely past the date of the deleted transactions. (which were 1/3 to 1/2 'up' the list on each side) Sorry I didn't document more carefully.

This looks like a refresh issue then, which is what I suspected when I noticed the one transaction not disappear from the debit list. I'm not certain if that should or should not be fixed, or if just a warning instructing the user to cancel and restart the process would suffice. (or be more complicated)
Comment 5 John Ralls 2020-03-13 22:39:05 EDT
Just one thing: Are you sure you committed the transaction after deleting the split?
Comment 6 Adrien 2020-03-13 22:50:17 EDT
Yes, first, it disappeared from the current account register upon committal, but I also opened another account that was still properly anchored and made sure to 'enter through' and it still did not refresh the reconciliation dialog.
Comment 7 John Ralls 2020-04-09 20:11:13 EDT
Are you able to reproduce this at will? I'm not able to delete splits without having them disappear from the reconcile window.
Comment 8 Chris Good 2020-05-27 04:46:04 EDT
Was the account for the deleted transaction for a subaccount of the reconciliation account? If so, please test in GnuCash 4.0 to be released around end of June 2020.
The program was changed to take notice of modifications to transactions for subaccounts of the reconciliation account under bug 797688 and this was merged into master on 3rd May 2020.
Comment 9 Adrien 2021-03-16 13:13:10 EDT
Chris, sorry I didn't see Comment 8 sooner and get back to you.

No, the deleted transaction was in the account I was reconciling. It has no sub-accounts.

John, per Comment 7, I'm now going to see if I can reproduce this intentionally. (note, I'm now on 4.4, if you think I need to try to reproduce with 3.8 as originally reported, or some other version, please advise)
Comment 10 John Ralls 2021-03-16 13:20:20 EDT
Adrien, 
Please do try to reproduce on 4.4. first. If you can, good, we know it's still active. If not and you feel motivated try to reproduce it on 3.8. If you can reproduce it at will on 3.8 and not on 4.4 that's a good indication that it's gotten fixed somewhere in between and we can close this. 

If you can't reproduce it on either then there must be some special condition that provokes it to crash that we need to figure out.
Comment 11 John Ralls 2021-09-24 18:34:03 EDT
Adrien, are you able to reproduce this? If not, let's close it.

Note You need to log in before you can comment on or make changes to this bug.