[Bug]: "Apply budget template" to future month with certain schedules causes infinite loop/crash #735

Closed
opened 2026-02-28 19:15:38 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @star-szr on GitHub (Nov 16, 2023).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

Here is a sample file which demonstrates the issue: 2023-11-16-My-Finances-2-7f4509e.zip

If you prefer, you can manually set this up from a fresh file with:

  1. Enabling goal templates
  2. Creating an account (maybe not necessary but anyway...)
  3. Creating one scheduled item set to start 2023-11-30, recur monthly, and move schedule before weekends
  4. Choose any budget category and in the notes add #template schedule test where test is the name of the schedule you set up in the previous step

Navigate to a future month in the budget and select "Apply budget template".

The CPU spikes and the app locks up. I suspect an infinite loop somewhere but haven't dug into the code to try to confirm or deny this. It seems to be some kind of edge case related to this particular schedule.

In addition to the steps and file above here is a screenshot of the schedule that triggers the bug:

IMG_4972(2)

If you:

  • Set the schedule to "after" weekend, the bug goes away.
  • Uncheck the Move schedule modifier, the bug goes away.
  • Move the start date earlier in the month, the bug goes away.

What error did you receive?

No response

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

Firefox, Chrome

Operating System

Linux

Originally created by @star-szr on GitHub (Nov 16, 2023). ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### What happened? Here is a sample file which demonstrates the issue: [2023-11-16-My-Finances-2-7f4509e.zip](https://github.com/actualbudget/actual/files/13378792/2023-11-16-My-Finances-2-7f4509e.zip) If you prefer, you can manually set this up from a fresh file with: 1. Enabling goal templates 2. Creating an account (maybe not necessary but anyway...) 3. Creating one scheduled item set to start 2023-11-30, recur monthly, and move schedule *before* weekends 4. Choose any budget category and in the notes add `#template schedule test` where `test` is the name of the schedule you set up in the previous step Navigate to a future month in the budget and select "Apply budget template". The CPU spikes and the app locks up. I suspect an infinite loop somewhere but haven't dug into the code to try to confirm or deny this. It seems to be some kind of edge case related to this particular schedule. In addition to the steps and file above here is a screenshot of the schedule that triggers the bug: ![IMG_4972(2)](https://github.com/actualbudget/actual/assets/327943/d5616991-8ab7-414c-9a17-38658d650cb6) If you: - Set the schedule to "after" weekend, the bug goes away. - Uncheck the Move schedule modifier, the bug goes away. - Move the start date earlier in the month, the bug goes away. ### What error did you receive? _No response_ ### Where are you hosting Actual? Locally via Yarn ### What browsers are you seeing the problem on? Firefox, Chrome ### Operating System Linux
GiteaMirror added the buggoal templates labels 2026-02-28 19:15:38 -06:00
Author
Owner

@Kidglove57 commented on GitHub (Nov 16, 2023):

Bug confirmed when testing in my live budget!

@Kidglove57 commented on GitHub (Nov 16, 2023): Bug confirmed when testing in my live budget!
Author
Owner

@shall0pass commented on GitHub (Nov 16, 2023):

Please check if this resolves it the issue: https://github.com/actualbudget/actual/pull/1917

Thanks!

@shall0pass commented on GitHub (Nov 16, 2023): Please check if this resolves it the issue: https://github.com/actualbudget/actual/pull/1917 Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#735