Skip to content

Don't loop forever with invalid quick add date#749

Merged
diegogangl merged 1 commit intogetting-things-gnome:masterfrom
syvb:infinite-loop-bad-date
Jan 8, 2022
Merged

Don't loop forever with invalid quick add date#749
diegogangl merged 1 commit intogetting-things-gnome:masterfrom
syvb:infinite-loop-bad-date

Conversation

@syvb
Copy link
Copy Markdown
Contributor

@syvb syvb commented Jan 8, 2022

Quick entering Do a thing due:meh causes GTG to completely freeze, and need to be killed. This fixes it to treat tokens with invalid dates the as other invalid tokens, ignoring them (and removing them from the input text).

This issue was caused since the the continue in the parsing loop didn't remove the token, causing it to loop forever on the invalid token.

Quick entering "Do a thing due:meh" causes GTG to completely freeze, and
need to be killed. This fixes it to treat tokens with invalid dates the
as other invalid tokens, ignoring them (and removing them from the
input text).

This issue was caused since the the `continue` in the parsing loop
didn't remove the token, causing it to loop forever on the invalid
token.
Copy link
Copy Markdown
Contributor

@Neui Neui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was able to reproduce the issue and this fixed the issue. Test seems also work (just hangs, which hopefully would indicate something is wrong).

@diegogangl diegogangl merged commit 1fb80a0 into getting-things-gnome:master Jan 8, 2022
@diegogangl
Copy link
Copy Markdown
Contributor

Merged, thanks!

@syvb syvb deleted the infinite-loop-bad-date branch January 9, 2022 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants