Comments (20)
Thanks so much @antoinemadec, you rock! And thanks @skywind3000 for the awesome plugin.
from asyncrun.vim.
I will inspect it. Do you have any clue to reproduce it ? Could you see the "[Finished in xxx seconds]" in the quickfix window when vim got stuck ?
from asyncrun.vim.
Does ":AsyncStop!" help (AsyncStop with a "!" ) ?
from asyncrun.vim.
The latest MacVim includes only 8.0.124.
How can you use 8.0.134 ??
from asyncrun.vim.
I am not doing anything special. I have a command run on every document save. After a while the problem appears. It is possible that at some point MacVim stopped responding to input and I had to Ctrl+C a few times it which got it unstuck but that maybe prevents some state cleanup. No I don't see the message in quickfix window.
I built MacVim myself applying patches from upstream also (all scripted away). So usually have newer versions that officially available MacVim build. BTW, if you build directly from head, it is at 134 already as of a few days ago ( https://github.com/macvim-dev/macvim/commits/master ) without any manual patching needed.
I'll try AsyncStop!
next time the problem appears.
from asyncrun.vim.
I have this same problem and it's starting to make me a little crazy. I use this plugin to run a build script so that I can quickly compile the code I'm editing. I just updated the plugin today and the frequency of the jobs getting stuck has gone up.
I tried AsyncStop!
and it doesn't help, nor does AsyncStop
.
My build command is: nnoremap <leader>b :AsyncRun! -save=2 ./build*<cr>
with build*
being some shell script that kicks off a MSVC process. I see the [Finished in X seconds] message and a success status. I don't know how to consistently recreate the bug though. It just seems to randomly happen and I have to close vim to get it working again.
I'm using vim 8.0 with patches 1-606 on Windows 7. I built it myself.
from asyncrun.vim.
I also have another command that sometimes triggers this bug:
function! HideAsyncResults()
call asyncrun#quickfix_toggle(g:build_window_size, 0)
endfunction
function! SilentBuild()
AsyncStop
exec "AsyncRun! -save=2 -post=call\\ HideAsyncResults() ./build*"
endfunction
nnoremap <F8> :call SilentBuild()<cr>
I wonder if the -save=2 flag is the culprit. I'm going to remove it for a bit and see if that helps.
UPDATE: still experiencing this when I remove -save=2
from asyncrun.vim.
I noticed that if I get into the stuck state and then try to reload my vimrc using so $MYVIMRC
I get this error: Error detected while processing function AsyncRun_Job_OnTimer[11]..<SNR>51_AsyncRun_Job_Update:
Followed by these two errors repeatedly until I close vim
E716: Key not present in Dictionary: raw == 1
E15: Invalid expression: s:async_info.raw == 1
from asyncrun.vim.
don't press ctrl-c
from asyncrun.vim.
don't press ctrl-c
Can you please be more specific? I don't recall pressing ctrl-c at any point when experiencing the stuck job state I described above.
from asyncrun.vim.
@skywind3000 I have the same issue on Ubuntu16.04, vim 8.0.14.18 (complied today).
The issue happens only if the command is executed super fast.
For instance, the following command works fine and can be repeated as many time as I want:
:AsyncRun sleep 1; echo foo
However, the second execution of the follwing command will trigger the error "ERROR: background job is still running":
:AsyncRun echo foo
The first execution does not print [Finished in ? seconds].
Also, AsyncStop!
does not help.
Do you know what that could be ?
Thanks for the excellent plugin anyway :)
Antoine
from asyncrun.vim.
sorry, it can't be reproduced on my debian / cygwin and mac os x.
Could you try to disable other plugins temporarily before invoking AsyncRun ?
from asyncrun.vim.
Thanks for the quick response.
I did some investigation, here is the minimal vimrc to reproduce the bug:
call plug#begin('~/.vim/plugins_by_vimplug')
Plug 'skywind3000/asyncrun.vim'
call plug#end()
set nocompatible
autocmd BufWinEnter * call system("sleep 1")
Also, you have to add copen | to trigger the issue:
:copen | AsyncRun echo foo
Running that command will trigger autocmd system("sleep 1"), echo foo finishes first, hence the bug.
I hope this help,
Antoine
from asyncrun.vim.
:help job
says:
Note that if the job exits before you read the output, the output may be lost.
This depends on the system (on Unix this happens because closing the write end
of a pipe causes the read end to get EOF). To avoid this make the job sleep
for a short while before it exits.
from asyncrun.vim.
@skywind3000 , do you have any news about this bug ?
Were you able to reproduce it ?
from asyncrun.vim.
I have changed the order of some variable assigment for better state handling. Please update.
from asyncrun.vim.
This issue seems to be fixed by #92 and should be closed now. If you still encounter this error, you can reopen it.
from asyncrun.vim.
Your latest commit has been tested and works as well.
Thanks a lot !
from asyncrun.vim.
I still have this issue, just install the Asyncrun today.
It happens when I edit the vimrc(init.vim) file then I run command
AsyncRun alacritty, alacritty started, then come back to the previous nvim window, then press :w
to save the file.
Error shows:
Error detected while processing function AsyncRun_Job_OnTimer[11].57_AsyncRun_Job_Update:
line 12:
E716 Key not prsent in Dictionary: errorformat
Seems Just happened when edit vimrc file how to solve this?
nvim v0.4.4
Manjaro 20.1.2 Mikah
from asyncrun.vim.
Same here. My issue happens if I reload my init.vim file while in vim:
:source init.vim
When I run a :w, it shows the "Error: background job is still running".
This is my AsyncRun command in my init.vim:
au BufWritePost * :AsyncRun sh generate_tags.sh
Thanks for the help!
from asyncrun.vim.
Related Issues (20)
- 当多个任务运行时,g:asyncrun_exit是不是不够用了。 HOT 1
- -pos 参数不生效 HOT 1
- Feature: Run in a terminal, but send output to quickfix? HOT 4
- 与其他使用 quickfix 的插件冲突 HOT 1
- should be able to use "%" like all other normal vim commands. HOT 4
- -post function calling fails if function has character # in name HOT 5
- E117: Unknown function: asyncrun#run from .vimrc, but call asyncrun#run works fine after vim starts HOT 6
- Feature request: add an autocmd when project rooted. HOT 1
- Any way to auto-scroll when using term with no focus? HOT 6
- Job queues HOT 2
- AsyncStop does not work when I use it to kill a endless loop HOT 2
- unknown bug (duplicate output maybe) HOT 1
- floaterm: allow to set "autoclose"?
- Can this plugin run code in docker container and get the result in quickfix list? HOT 2
- no way to stop the job when running with -pos=hide
- How to run python scripts with other python interpreter? HOT 1
- 用quickui显示 结束关闭后buffer也不会消除, 新开也不会重用该buffer HOT 5
- Document option -append
- runner为floaterm时出现错误:不允许在弹出窗口中使用 HOT 7
- [nvim] Changing shell options on windows breaks AsyncRun HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asyncrun.vim.