bbatsov / helm-projectile

Helm UI for Projectile
329 stars 71 forks source link

helm-projectile says "Waiting for process to die...done" and quit #136

Open KaratasFurkan opened 4 years ago

KaratasFurkan commented 4 years ago

Expected behavior

Show project files and buffers.

Actual behavior

Show empty buffer and "Waiting for process to die...done" message, close itself if i type quickly. Note: also helm-M-x rarely show empty buffer or hangs after some typing but not often as helm-projectile.

Steps to reproduce the problem

Open a project and call the function "helm-projectile", start typing quickly.

init.el:

(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
                         ("melpa" . "https://melpa.org/packages/")
                         ("org" . "https://orgmode.org/elpa/")))
(package-initialize)

(setq-default ring-bell-function 'ignore) ; it sounds quite annoying in my pc

(unless (package-installed-p 'helm-projectile)
  (package-refresh-contents)
  (package-install 'helm-projectile))

(global-set-key (kbd "C-x f") 'helm-projectile)

Demonstration: https://www.youtube.com/watch?v=wzfrunbZuJA&feature=youtu.be

Backtraces if necessary (M-x toggle-debug-on-error)

There is no raised error.

Environment & version information

whirm commented 4 years ago

I'm hitting the same issue.

In my case it's not failing 100% of the time. I've noticed that some times when I start a fresh emacs it works for a bit and after a while it starts failing and it won't recover.

I've traced it down to helm-projectile.el:704:

(defvar helm-source-projectile-files-and-dired-list
  '(helm-source-projectile-dired-files-list
    helm-source-projectile-files-list))

Removing the dired source makes it work and re-adding it makes it fail.

Haven't had time to dig further than that but this may help you for now.

EDIT: As an additional data point: I'm using Spacemacs EDIT 2: I can't seem to reproduce the "fix" so disregard this for now.

KaratasFurkan commented 4 years ago

I re-installed my OS and build emacs 27.0.90 a few days ago and the problem seems gone. But i have not tried enough times, i will try your solution if i encounter the problem again, thank you.

edit: It happens again, even with your suggestion but less often.

kadircancetin commented 4 years ago

Hello, I have the same problem and I investigate it. It seems the problem is not about helm-projectile. I found any helm-sync-source with a function that has slow (like typo-suggest remote call or helm-projectile git call etc.) somehow helm stop processing because it thinks you press a key. I will create a detailed issue on helm.

Before that, I have a bad solution that worked for me. Could you please confirm that it fixes the problem.

(defun kadir/helm--collect-matches (orig-fun src-list &rest args)
    (let ((matches
           (cl-loop for src in src-list
                    collect (helm-compute-matches src))))
      (unless (eq matches t) matches)))

  (advice-add 'helm--collect-matches :around #'kadir/helm--collect-matches)
KaratasFurkan commented 4 years ago

I use @kadircancetin's solution for a week and never encounter the issue. Thank you @kadircancetin!

zhihuiFan commented 2 years ago

same here, thanks @kadircancetin and @KaratasFurkan .