Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

E924: Current window was closed #1929

Open
XadillaX opened this issue Dec 20, 2016 · 14 comments
Open

E924: Current window was closed #1929

XadillaX opened this issue Dec 20, 2016 · 14 comments

Comments

@XadillaX
Copy link

When I use

let g:syntastic_auto_loc_list = 1

If I'm on a .cpp file that has error(s), after going to the error position which on another .h header file, it will cause E924: Current window was closed.

But If I use

let g:syntastic_auto_loc_list = 3

This error will disappear.

But another problem appeared: the error window won't close automatically even if I switch to a file that has no error.

@lcd047
Copy link
Collaborator

lcd047 commented Dec 20, 2016

What version of syntastic are you using, what version of Vim, and what OS? Can you reproduce the problem with all other plugins disables?

@XadillaX
Copy link
Author

XadillaX commented Dec 21, 2016

Syntastic version: 3.8.0-10 (Vim 704, Neovim, Darwin)
Info for filetype: cpp
Global mode: active
Passive filetypes: scss slim
Filetype cpp is active
The current file will be checked automatically
Available checker: gcc
Currently enabled checker: gcc

And after I disabling all other plugins, this problem still produced.

@lcd047
Copy link
Collaborator

lcd047 commented Dec 21, 2016

Can you reproduce the problem with Vim instead of Neovim?

@XadillaX
Copy link
Author

Yes, still reproduced in VIM.

@lcd047
Copy link
Collaborator

lcd047 commented Dec 21, 2016

I'm afraid I can't reproduce it with Vim. Do you have a minimal working example that illustrates the problem? What other syntastic settings are you using?

@XadillaX
Copy link
Author

https://github.com/XadillaX/_vimrc

Here's my VIM configuration files, you can delete all other plugins.

https://github.com/XadillaX/aliyun-ons

This is the code repo. Just open an src/*.h file and delete some code to make it wrong and then open the source code (*.cpp). When you're in quickfix window and go to the error place, this problem will reproduce.

@XadillaX
Copy link
Author

How's the result?

@lcd047
Copy link
Collaborator

lcd047 commented Jan 2, 2017

How's the result?

Well, I asked for a minimal working example, and you gave me a config consisting of 45 files. Let's put it like this: I might be able to go over all that and isolate the problem one of these years, eventually.

On the other hand, I have a sketch of an idea of how what you describe could happen, essentially relating it to the Vim 7.4.1640 trainwreck (cf. #1127). If that turns out to be the real problem, your best hope would be to get it fixed in Vim. But my conjecture is still hard to check without an actual working example. Oh well.

@icaroperseo
Copy link

Same issue here:

If I'm on a .cpp file that has error(s), after going to the error position which on another .h header file, it will cause:

E924: Current window was closed.

OS: GNU/Linux (Arch Linux derivative) x64.
Neovim: v0.2.0.
Syntastic: up-to-date (master branch).
Syntastic config:

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

Well, I'm using Neovim & Syntastic on C project. The first time this error is shown the paths in the location-list are relative, for example:

Documents/foo/bar.c

Then, I reopen the document (C file with errors), save the changes without making any changes and the paths in the location-list become absolute, allowing me to access the header file without problems.

/home/user/Documents/foo/bar.c

Here a poor screencast, I hope to be helpful:

syntastic

Best regards.

@lcd047
Copy link
Collaborator

lcd047 commented Jul 4, 2017

@icaroperseo What you're showing here is an error in another plugin (perhaps clickable.vim, from a quick search on the names of the functions involved). Please report back only if you can reproduce the problem with plain Vim, with all plugins disabled except syntastic.

@icaroperseo
Copy link

OS: GNU/Linux (Arch Linux derivative) x64.
Syntastic: up-to-date (master branch).
Tmux version: 2.5
Shell: zsh 5.3.1
Vim: 8.0

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  8 2017 20:53:45)
Parches incluidos: 1-628
Compilado por Arch Linux
Versión "enorme" sin interfaz gráfica (GUI).
  Aspectos incluidos (+) o no (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     +tcl/dyn
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     +gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
-clientserver    +insert_expand   +packages        -toolbar
-clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl/dyn        +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      +python3/dyn     +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      +lua/dyn         +rightleft       +writebackup
+diff            +menu            +ruby/dyn        -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      -mouseshape      +startuptime     -xsmp
+eval            +mouse_dec       +statusline      -xterm_clipboard
+ex_extra        +mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax
+farsi           +mouse_netterm   +tag_binary
     archivo "vimrc" del sistema: "/etc/vimrc"
     archivo "vimrc" del usuario: "$HOME/.vimrc"
  2º archivo "vimrc" del usuario: "~/.vim/vimrc"
      archivo "exrc" del usuario: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
            predefinido para $VIM: "/usr/share/vim"
Compilación: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Enlazado: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim        -lm -lncurses -lelf -lnsl    -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lieee -lm

vimrc:

" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif

if &compatible
  set nocompatible               " Be iMproved
endif

call plug#begin('~/.vim/plugged')

Plug 'vim-syntastic/syntastic'

call plug#end()

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

The issue continues, with a caveat, if I re-open the c file, save without modifying and access the location-list now the following error appears:

E926: Current location list was changed.

screenshot_20170704_084919

Regards.

@lcd047
Copy link
Collaborator

lcd047 commented Jul 4, 2017

@icaroperseo The status line in your screenshot looks suspiciously like one produced by powerline, I wonder how can that be since you used a vimrc that doesn't enable powerline. 😉

Never mind though, you're now illustrating a bug introduced in Vim 7.4.1640 (please see #1127 for details and relevance to syntastic). There were changes affecting that code since Vim 8.0.628 (the current version at the time of this writing is 8.0.692). I don't think the problem is fixed though.

@icaroperseo
Copy link

You're right, It's powerline for bash/zsh & tmux, no by vim. Anyway, I hope you can solve the issue, syntastic it's a must have, thank you and good luck!

If I can help with anything else do not hesitate to ask.

Best regards.

@lcd047
Copy link
Collaborator

lcd047 commented Jul 5, 2017

@icaroperseo Like I said, it's a bug in Vim, not in syntastic. E924 might have been solved in recent versions, but E926 is unlikely to go away any time soon. My solution to it (mentioned in the other thread) has been rejected by Vim developers, and I don't have any workarounds. Sorry about that. shrug

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants