Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in process sentinel: magit-todos--line-item: Stack overflow in regexp matcher #63

Closed
lbolla opened this issue Jan 9, 2019 · 12 comments
Assignees

Comments

@lbolla
Copy link

lbolla commented Jan 9, 2019

I am getting this error when enabling magit-todos in one of my repos:
error in process sentinel: magit-todos--line-item: Stack overflow in regexp matcher

I can't find the offending line/regex. magit-todos-keyword-suffix is configured to be just ":" (column).

Any idea how I can debug this more?

@alphapapa
Copy link
Owner

Please try to reproduce in the same repo using emacs -q, to confirm that it's not a configuration issue. Thanks.

@lbolla
Copy link
Author

lbolla commented Jan 9, 2019

Same results. I did emacs -q. Then loaded magit and magit-todos (with (require ...)) and then did magit on my repo (and magit-todos-list).

Same error.

@alphapapa
Copy link
Owner

Please provide some basic info like: Emacs version, Magit version, magit-todos version, which scanner you're using and which version.

Also, you said it happens in one of your repos. Do you mean that it only happens in that repo, and not in any others? If so, it will probably be necessary to look at the to-do items in the repo.

The most direct way to see what the problem is would be to edebug-defun on the magit-todos--line-item function, and then, when edebug activates, get the contents of the scanner output buffer by pressing e and eval'ing (setq scanner-output (buffer-string)), then you should be able to insert the scanner-output variable into another buffer and examine it.

@lbolla
Copy link
Author

lbolla commented Jan 11, 2019

It turns out the problem is that in my repo there are some files which have enormously long lines (they are mechanically concatenated and uglified JS files). Emacs regex parser chokes on them. I've excluded them using magit-todos-exclude-globs.

@lbolla lbolla closed this as completed Jan 11, 2019
@alphapapa
Copy link
Owner

@lbolla Thanks. If you encounter this in any more of your repos, let me know, and maybe I can figure out a way to give a more helpful error message.

@seanfarley
Copy link

I just ran into this error and was about to report it but found this issue already did. It'd be nice to not have such a esoteric error :-D

@alphapapa
Copy link
Owner

I'll see if I can make the error useful and continue scanning other files.

@nedijahij
Copy link

I do too get this error. Not sure what is going on:

error in process sentinel: magit-todos--line-item: Stack overflow in regexp matcher
error in process sentinel: Stack overflow in regexp matcher

@alphapapa
Copy link
Owner

@nedijahij See lbolla's comment.

@BlindingDark
Copy link

You can set max columns if you use rg:

(setq magit-todos-rg-extra-args '("-M 120"))
-M, --max-columns <NUM> 

@nedijahij
Copy link

@BlindingDark i used ag actually.

@BlindingDark
Copy link

@nedijahij try -W/--width

(setq magit-todos-ag-extra-args '("-W 120"))

alphapapa added a commit that referenced this issue Jul 9, 2019
Fixes #63.  Or works around it.  There's only so much we can do.
These tend to be e.g. minified JavaScript files, which shouldn't be
scanned, and the user will have to exclude them.
alphapapa added a commit that referenced this issue Jul 9, 2019
Fixes #63.  Or works around it.  There's only so much we can do.
These tend to be e.g. minified JavaScript files, which shouldn't be
scanned, and the user will have to exclude them.
alphapapa added a commit that referenced this issue Jul 9, 2019
Fixes #63.  Or works around it.  There's only so much we can do.
These tend to be e.g. minified JavaScript files, which shouldn't be
scanned, and the user will have to exclude them.
alphapapa added a commit that referenced this issue Jul 9, 2019
Fixes #63.  Or works around it.  There's only so much we can do.
These tend to be e.g. minified JavaScript files, which shouldn't be
scanned, and the user will have to exclude them.
alphapapa added a commit that referenced this issue Jul 9, 2019
Fixes #63.  Or works around it.  There's only so much we can do.
These tend to be e.g. minified JavaScript files, which shouldn't be
scanned, and the user will have to exclude them.
alphapapa added a commit that referenced this issue Jul 9, 2019
Fixes #63.  Or works around it.  There's only so much we can do.
These tend to be e.g. minified JavaScript files, which shouldn't be
scanned, and the user will have to exclude them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants