Closed zozowell closed 2 years ago
@zozowell Can you test the patch #398?
hi @jcs090218, @twlz0ne I verified, it works as expected now, the behavior is identical with helm-do-grep
. Thanks!
And I'm very curious about how you experts debug and identified this root cause, may you share some tips please?
helm-ag--last-command
: ("rg" "--no-heading" "--ignore=node_modules" "--ignore=workspaces" "|he")Actual behavior
Some weird error messages are showed from minibuffer, emacs hangs there.
C-g
has no effect, or just suspend the process and asks for dumping core. It was triggered by the empty pattern before or symbol|
, this will cause rg returns every line of every files, basically a mage output.The hanging sometimes ends with following error message, but most of the time, it very very slowly recovered with the error message in minibuffer disappeared one by one... feel like there were some long run processes finally gradually finished. However, from sys monitor, I couldn't see massive processes, or even couldn't see "rg" process ran there.
I tried to debug, but couldn't capture the real stuck point,
debug-on-message
can't capture the error message.debug-on-quit
did work because c-g didn't resolve the hang actually.Profiling shows following weird call stack, I couldn't see where the function
minibuffer-error-function
is called at all...helm-log didn't reveal too much, the biggest time cost was here:
Expected behavior
C-g
can stop the searching process.Steps to reproduce
helm-ag-do-project-root
command do the project search, search pattern|helm