Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error detected while processing function nerdtree#ui_glue#invokeKeyMap[1]..76[18]..75[3]..<SNR>33_customOpenFile[1]..105[1]..1 21[3]..177[6]..178[17]..13: #1347

Open
ebrahimbd opened this issue Jan 31, 2023 · 11 comments
Labels
bug Needs More Info Not enough information was provided in the initial creation of the issue.

Comments

@ebrahimbd
Copy link

Face problem

Error detected while processing function nerdtree#ui_glue#invokeKeyMap[1]..76[18]..75[3]..33_customOpenFile[1]..105[1]..1
21[3]..177[6]..178[17]..13:

@ebrahimbd ebrahimbd added the bug label Jan 31, 2023
@fattredd
Copy link

I'm getting a similar issue. Opening NERDTree spits out errors, and the tree is mostly empty. It shows a snippet of my cwd, but only seems to get part of the way through loading the list. In the following example I have over a dozen files, including other directories that aren't listed.

" Press ? for help             |  1 # Example file
                               |~                                                                                                                                                                                  
.. (up a dir)                  |~                                                                                                                                                                                  
</deployment-manager/          |~                                                                                                                                                                                  
     README.md                |~                                                                                                                                                                                  
~                              |~                                                                                                                                                                                  
~                              |~                                                                                                                                                                                  
~                              |~                                                                                                                                                                                  
~                              |~    
......trunc.......
Vim version
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 15 2020 16:44:08)
Included patches: 1-207, 209-629
Modified by <[email protected]>
Compiled by <[email protected]>
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D__linux__ -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE  -Wl,-z,relro  -L/usr/local/lib -Wl,--as-needed -o vim        -lm -lnsl  -lselinux  -lncurses -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector  -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc       

And here are some examples of errors I'm seeing:

:NERDTreeToggle
Error detected while processing function 204..205..188..191..155..153..264:
line    3:
E706: Variable type mismatch for: Listener
Error detected while processing function 204..205..188..191..155:
line   25:
E171: Missing :endif
Error detected while processing function 204..205:
line   14:
E171: Missing :endif
:NERDTreeFind
Error detected while processing function <SNR>31_findAndRevealPath..<SNR>31_chRoot..214..155..153..264:
line    3:
E706: Variable type mismatch for: Listener
Error detected while processing function <SNR>31_findAndRevealPath..<SNR>31_chRoot..214..155:
line   25:
E171: Missing :endif
Error detected while processing function <SNR>31_findAndRevealPath:
line   39:
E171: Missing :endif
Attempting to browse around anyway
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..76..75..<SNR>30_customOpenDir..<SNR>30_activateDirNode..133..167..156..155..153..264:
line    3:
E706: Variable type mismatch for: Listener
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..76..75..<SNR>30_customOpenDir..<SNR>30_activateDirNode..133..167..156..155:
line   25:
E171: Missing :endif
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..76..75..<SNR>30_customOpenDir..<SNR>30_activateDirNode..133..167..156:
line    6:
E170: Missing :endwhile
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..76..75..<SNR>30_customOpenDir..<SNR>30_activateDirNode..133..167:
line    8:
E171: Missing :endif
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..76..75:
line    3:
E171: Missing :endif
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..76:
line   26:
E171: Missing :endif

@rzvxa
Copy link
Member

rzvxa commented Oct 14, 2023

@fattredd
@ebrahimbd
I would like you to provide some more information about your setup so I can actually reproduce it. So I go ahead and name the things that you can provide to help with tracking this bug.

  • your operating system
  • a minimal file structure that can reproduce this problem
  • content of your .vimrc / init.vim file(it would be much better if you can provide the minimal setup to produce this)

@ebrahimbd
Copy link
Author

Issue:
@rzvxa

Details:

  • Operating System: Linux
  • Vim version: 7

locate the file .vimrc in GitHub repository link: https://github.com/ebrahimbd/vim-for-codeforce.

@rzvxa
Copy link
Member

rzvxa commented Oct 18, 2023

@ebrahimbd Thanks.
Right now I don't have much data to trace this issue.
Can you tell me about the steps you take to reproduce this issue?
What should I do to reproduce it?
Have you tried it on newer versions of Vim to see if this exact scenario leads to the same error or not?
Is there anything special about your environment or the types of files that you are working on? If you suspect that any information can help me reproduce this don't hesitate to share.
What is your exact version of Vim and NERDTree?

@ebrahimbd
Copy link
Author

@rzvxa thanks for your response.

ebrahim@ebrahim:/mnt/c/Users/saleh$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 06 2023 07:49:43)

I don't know. when i run this command it automatic latest NERDTree install

sudo apt install git && git clone https://github.com/ebrahimbd/vim-for-codeforce && cd "vim-for-codeforce" && sh install.sh

in .vimrc file

  Plug 'preservim/NERDTree'

@rzvxa
Copy link
Member

rzvxa commented Oct 18, 2023

Ok now that I have you configuration, I would like to know what steps should I take to reproduce this? Right now I open the vim and can use the NERDTree with your configuration

@rzvxa rzvxa added the Needs More Info Not enough information was provided in the initial creation of the issue. label Oct 18, 2023
@rzvxa
Copy link
Member

rzvxa commented Oct 18, 2023

It would be nice if you could record yourself reproducing this(a small GIF can go a long way), But even if you explain the steps in order to get this error can help me to trace and fix this issue.

@ebrahimbd
Copy link
Author

@rzvxa When I open a .cpp file and navigate by pressing F5.

Screenshot 2023-10-23 005234

@rzvxa
Copy link
Member

rzvxa commented Oct 24, 2023

Is your setup a WSL Linux? if that's the case by any chance are you using the Windows terminal?

@sjshuck
Copy link

sjshuck commented Feb 11, 2024

I don't know when it started happening (it was a few weeks ago I feel), or whether it's the same issue, but I am getting a similar error. When I launch directly into NERDTree with nvim . and then open a file with s, it produces this error:

Error detected while processing function nerdtree#ui_glue#invokeKeyMap[1]..76[18]..75[3]..<SNR>29_openVSplit[1]..105[1]..121[3]..177[6]..178[9]..172[3]..176[16]..218[1]..228[2]..function nerdtre
e#ui_glue#invokeKeyMap[1]..76[18]..75[3]..<SNR>29_openVSplit[1]..105[1]..121[3]..177[6]..178[9]..172[3]..176[16]..218[1]..228:
line    2:
E605: Exception not caught: NERDTree.TreeNotOpen

Note that this only errors with s, not with i, and only when launching directly into nvim ., not when explicitly firing up NERDTree after Neovim via nvim -c ':NERDTree'.

I have also observed this on a Mac

@rzvxa
Copy link
Member

rzvxa commented Feb 11, 2024

Hi @sjshuck, I'm happy to say that with your config and instructions, I could successfully reproduce your issue. However, I don't think that the original issue here is the same as yours, A patch for your problem may or may not resolve both, But since most errors when interacting with NERDTree start from the invokeKeyMap function they look similar when they have no extra error message with them(for example unexpected errors). While these may be similar in the starting section of the stack trace, One is dispatched to the customOpenFile and the other one to the openVSplit.

Since I still don't have enough information for the original issue, I can't confidently confirm them being the same.

I suggest you create a new issue for yours, Then we can ask the original author of this issue to confirm the fix and see whether it also solves their problem otherwise we can close on and keep this one open.

I'll start investigating the issue and let you know when a PR is ready to test and approve for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs More Info Not enough information was provided in the initial creation of the issue.
Projects
None yet
Development

No branches or pull requests

4 participants