GnuCash
Contact   Instructions
Bug 797114 - Fixing an SX due to deleted account stuck in an error loop
Summary: Fixing an SX due to deleted account stuck in an error loop
Status: VERIFIED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Scheduled Transactions (show other bugs)
Version: 3.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-23 19:18 EST by Adrien
Modified: 2020-06-24 18:31 EDT (History)
5 users (show)

See Also:


Attachments

Description Adrien 2019-02-23 19:18:15 EST
I recently deleted an unused account. I had an SX which had a split assigned to this account in its template. (I never actually fired the SX)

Upon deleting the account, a warning appeared telling me of the problem with the SX and opened the template editor so I could fix it. I deleted the offending split which had no account assigned to it.

Upon trying to exit the template editor with the [OK] button, I get an error "Invalid Account in Split - split with memo 'foo' has an invalid account." and all I get is a [Close] button.

I can't exit the SX template editor and am stuck in a loop. I've tried re-entering the memo text and assigning a valid account, but GC still throws the same error.

I managed to exit the editor by clicking [Cancel] instead. This left the SX unchanged from its original state. (with the still offending split not assigned to an account)

I then edited the SX to first assign the split to a valid account and saving it. Then I edited it again by deleting the split.

While I was able to recover and find a workflow that accomplished the task, I'd think GC shouldn't have been stuck in the loop in the first place.

I unfortunately did not think to test deleting the offending split outright the second time I intentionally entered the editor via the Actions menu so I don't know if there is a different code path there that would not cause the loop.

If it is of any use, the SX in question was not marked as 'enabled'.
Comment 1 Jean Laroche 2020-04-11 23:56:03 EDT
I can reproduce the problem. You need a split with 3 accounts (at least), when removing the offending one, GC complains. Removing the entire transaction works well though.
I'll look into it.
Comment 2 Bob 2020-05-31 06:15:45 EDT
Jean's fix was added to maint and will be in the next release 3.11
Comment 3 Adrien 2020-06-24 18:31:32 EDT
I didn't get to test 3.11, but I can confirm this is fixed in 3.906.

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