quick-scope icon indicating copy to clipboard operation
quick-scope copied to clipboard

Throws error if invoked while a background asynchronous process is running (with skywind3000/asyncrun.vim)

Open nmder opened this issue 7 years ago • 6 comments

The following error message is shown: Start Error************* Messages maintainer: Bram Moolenaar [email protected] "~/NLP/masters_thesis/main.tex" 525L, 24390C "main.tex" 525L, 24390C written Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update: line 26: E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update[46]..<SNR>23_AsyncRun_Job_AutoScroll: line 6: E523: Not allowed here: ^I^Icbottom Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update: line 26: E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update[46]..<SNR>23_AsyncRun_Job_AutoScroll: line 6: E523: Not allowed here: ^I^Icbottom Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update: line 26: E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update[46]..<SNR>23_AsyncRun_Job_AutoScroll: line 6: E523: Not allowed here: ^I^Icbottom Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update: line 26: E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update[46]..<SNR>23_AsyncRun_Job_AutoScroll: line 6: E523: Not allowed here: ^I^Icbottom Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update: line 26: E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update[46]..<SNR>23_AsyncRun_Job_AutoScroll: line 6: E523: Not allowed here: ^I^Icbottom Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update: line 26: E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text E523: Not allowed here: ^I^I^I^Icaddexpr l:text Error detected while processing function <SNR>41_aim[29]..AsyncRun_Job_OnTimer[11]..<SNR>23_AsyncRun_Job_Update[46]..<SNR>23_AsyncRun_Job_AutoScroll: line 6: E523: Not allowed here: ^I^Icbottom End Error**********************************

nmder avatar Jun 23 '17 18:06 nmder

Sorry for not commenting on this sooner, I wanted to get #40 merged before hunting down other bugs.

I was able to reproduce this (although by now, not using the current version of AsyncRun); however, upon close inspection I'm not really sure if this error is quick-scope's fault.

The errors get thrown when processing quick-scope actions but they reference lines from AsyncRun. Specifically this line in AsyncRun_Job_Update and this one in AsyncRun_Job_AutoScroll. Not being an expert on how AsyncRun works I cannot say for sure, but I think these errors have something to do with AsyncRun trying to populate and modify the quickfix list while quick-scope is in the middle of a command.

Also interesting, the error Vim throws in this case (E523) references the 'secure' option, which doesn't seem to relate to this error.

Perhaps @skywind3000 has some insight on this?

bradford-smith94 avatar Apr 15 '18 20:04 bradford-smith94

Many plugins will populate quickfix window in a timer or in a background job such as ale, neomake and asyncrun. Background jobs and timers are designed for this.

Is there something about sandbox in quick-scope ?? Code running in sandbox is not allowed to execute many commands which will change buffer or execute shell commands. See:

:h sandbox

But asyncrun can't work without such things.

skywind3000 avatar Apr 15 '18 21:04 skywind3000

Similar phenomenon happens with other async plugins, e.g. ALE

Error detected while processing function quick_scope#Aim[33]..<SNR>193_NeoVimCallback[29]..<SNR>188_HandleExit[49]..ale#engine#HandleLoclist[33]..ale#engine#SetResults[26]..ale#cu
rsor#EchoCursorWarning[20]..ale#cursor#TruncatedEcho:
line   15:
E523: Not allowed here

wookayin avatar Nov 07 '18 23:11 wookayin

To chime in, Also running into this issue with the following line in my vimrc:

autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif

itainoam avatar Feb 21 '21 10:02 itainoam

Auto-commands takes too much time or invokes some blocking function (I/O, sleep/wait).

skywind3000 avatar Feb 21 '21 11:02 skywind3000

The PR #81 that was just merged might also fix the E523 errors reported here. I don't know if that is the whole solution needed to make async plugins work with quick-scope but hopefully it is at least some progress.

I don't have a testing setup for this issue, but if someone interested in this could let me know whether or not the latest update helps I would be very appreciative.

bradford-smith94 avatar Dec 28 '21 19:12 bradford-smith94