helm-ag
helm-ag copied to clipboard
Deadlock on Windows with helm-do-ag
I'm experiencing random Emacs freezes when using helm-do-ag (or helm-do-ag-project-root) on Windows.
Steps to reproduce
M-xhelm-do-ag- type some search terms, look at the results, add some other search terms (or some
--ignoreoptions) - eventually Emacs freezes and needs to be killed from the windows process manager.
Note that when Emacs is frozen, there is no ag process in the windows process manager.
Software versions
- GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570
- helm 20151125.2229 (installed from melpa)
- helm-ag 20151029.2208 (installed from melpa)
- ag version 0.31.0
- Windows 7 64 bits
Which ag do you use ? cygwin ?
I've compiled ag from sources using mingw.
I've compiled ag from sources using mingw.
Thanks
And could you show me your configuration of helm-ag ?
I don't have Windows machine now. I'll check this issue next week.
And could you show me your configuration of
helm-ag?
Here it is:
(when (executable-find "ag")
(defun jmb/helm-do-ag-at-project-root-or-folder ()
"Run `helm-do-ag-project-root' or `helm-do-ag' depending on
whether a project root is found or not."
(interactive)
(if (helm-ag--project-root)
(helm-do-ag-project-root)
(helm-do-ag)))
(use-package
helm-ag
:commands helm-ag
:init
(eval-after-load 'helm
'(define-key helm-command-prefix (kbd "s")
'jmb/helm-do-ag-at-project-root-or-folder))))
You can see the rest of the helm configuration here.
Hmm, I cannot reproduce this issue.
Just in case, here is the ag binary I've compiled: https://www.dropbox.com/s/qi6gj7om4x0nv21/ag.zip?dl=0
Some extra information which may be relevant:
- I don't have the problem with the same emacs/helm/helm-ag/ag versions on Linux.
- The problem only occurs on local files. When I run
helm-do-agfor remote files on a tramp connection, everything works fine. - It may be related to typing speed: each time I've had the problem, Emacs froze while in the middle of typing a word, never when I pause between words, nor when I remember to type slowly.
I am experiencing the same issue. It occurs frequently.
One difference in my experience is that the ag.exe process is still running in the task manager, and if I kill the process, the helm-ag menu closes and emacs becomes responsive again.
Software versions
- GNU Emacs 25.0.91.1 (x86_64-w64-mingw32)
- helm 20160211.934 (installed from melpa)
- helm-ag 20160126.2147 (installed from melpa)
- ag version 0.29.1
- Windows 7 64 bits
NOTE: I installed Ag & Emacs via Chocolatey
Hmm, this is windows specific issue and I suppose it is necessary to fix helm or Emacs core for resolving this issue.
Yep it's specific to how Microsoft Windows kills processes : http://www.gnu.org/software/emacs/manual/html_mono/efaq-w32.html#Killing-subprocesses . Those freezes aren't usually reproducible on linux.
Terminating ag while its still running should un-hang emacs (or hit Ctrl-g).
In trying to deal with this, I tried to slow down helm's interactiveness by increasing helm-input-idle-delay or type the search term fast so that the ag subprocess does not start.
I have noticed that the ag process is not always visible in the task manager when these freezes occur. If it is, I can always kill the process and emacs becomes responsive, but if it's not listed in the task manager, I have to kill the emacs process instead.
I'm also seeing these kind of hangs
- emacs-24.4-bin-i686-pc-mingw32 (https://ftp.gnu.org/gnu/emacs/windows/)
- helm-20160530.424 (melpa)
- helm-ag-20160527.754 (melpa)
- ag version 0.31.0
- Windows 7 64 bits
I'm still getting this issue. I'm wondering if anyone has found a workaround?
Same here as well.
I recently use Windows machine. However I cannot reproduce this issue yet. Please tell me how to reproduce this issue in more detail.
- Reproduce steps
- Minimum configuration
I am experiencing a hang on a macOS machine. It just started when I upgraded to the new MacBook Pro with Touch Bar. I am using version 26.0.50 of Emacs.
same issue and platform here
how do we go about solving this? I'm inexperienced with debugging emacs / elisp, can anyone provide pointers?
I managed to get this stable on Windows by bumping a few delays up:
(setq helm-input-idle-delay 0.1) (setq helm-cycle-resume-delay 2) (setq helm-follow-input-idle-delay 1)
I guess it's due to the crappy interop on Windows, but didn't dig further