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

bug report: feedkeys() leaks memory when invoked from a CursorHoldI autocommand #33

Closed
GoogleCodeExporter opened this issue Aug 18, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I believe this can be trivially demonstrated by doing:

    :autocmd CursorHoldI * silent execute 'call feedkeys("\<C-r>\<Esc>", "n")'

hitting "i", and watching memory usage instantly skyrocket.  Various other 
permutations also trigger the leak though.  The speed of the leak will 
obviously vary with 'updatetime'; for the most immediate effect, set it to a 
very low value.  Oddly, feedkeys() in a CursorHold autocommand (i.e. in normal 
mode, not insert mode) does not leak.

Among other plugins, Conque <https://code.google.com/p/conque/> does this.  
It's a hack, obviously, but until Vim gets real support for some kind of async 
events, it's one of the more portable techniques; notably, it works without 
+clientserver so it can be used in vim in a PTY rather than a GUI.

I am not including a bugreport.txt because this seems to affect all versions of 
Vim 7.3 that I tried it with, so it does not seem runtime or plugin dependent.

Thanks for your consideration, and thanks for Vim,

-glyph

Original issue reported on code.google.com by Glyph.Lefkowitz on 29 Nov 2011 at 7:44

@GoogleCodeExporter
Copy link
Author

I cannot reproduce the problem.

I tried with the current version 7.3.389 and using valgrind I could not see any 
memory leak.

What version of Vim are you using?  If it's older, please update first.

Original comment by brammool...@gmail.com on 30 Dec 2011 at 1:34

@GoogleCodeExporter
Copy link
Author

I also tried to reproduce it but I could not.
I used a low value (2) for 'updatetime'.  
Memory usage of Vim remained constant (no leak).
I'm using Vim-7.3.470 on Linux x86.

Can you reproduce this using 'vim -u NONE' with minimal settings?

Original comment by dominiqu...@gmail.com on 7 Mar 2012 at 11:07

@GoogleCodeExporter
Copy link
Author

Clausing as invalid, because it is unreproducable and no response for 2 years. 
If you can reproduce the issue starting from vim -u NONE -N, feel free to open 
a new bug report.

Original comment by chrisbr...@googlemail.com on 4 Oct 2014 at 11:47

  • Changed state: Invalid

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

No branches or pull requests

1 participant