[vim/vim] Very large files erased immediately on open (#890)

32 views
Skip to first unread message

Matt McMinn

unread,
Jun 29, 2016, 12:12:55 PM6/29/16
to vim/vim

I've run in to an issue on a few Windows 7 x64 machines where vim is erasing all the content from very large (~6GB) files immediately on opening the file. Using the release version 7.4 (which is 32 bit) opening a large file will try to load, but eventually crash when it runs out of memory (as expected). Looking for a 64 bit version, I installed v7.4.1967 from here. With that version - both 32 and 64 bit - immediately upon opening the file contents are erased, resulting in a 0 byte file. Just to be clear, it's not just that the buffer is coming up as 0 lines, the file contents on disk are also erased, destroying the file. The command line that I used is

gvim -N -u NONE "largeFile.owl"

I did try passing the -D flag to trace through what could be happening, but the file was erased before the first breakpoint. Any ideas what could be happening or how to debug this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

K.Takata

unread,
Jun 29, 2016, 12:25:03 PM6/29/16
to vim/vim

There is a known bug when opening very large files (over 2GB) on Windows.
I wrote a series of patches to fix the problem, but not merged yet.
https://groups.google.com/d/topic/vim_dev/4EkET3c3oVA/discussion

K.Takata

unread,
Jun 29, 2016, 12:32:27 PM6/29/16
to vim/vim

Christian Brabandt

unread,
Jun 29, 2016, 1:25:48 PM6/29/16
to vim/vim

can you reliably reproduce the issue?

Matt McMinn

unread,
Jun 29, 2016, 2:16:31 PM6/29/16
to vim/vim

Yes I can, I've tried several versions from the vim-win32-installer site linked above going back a few months and I have the same issue in all of those versions against several different files. I have not yet tried those patches (I'm not set up on this machine to build vim) to see if they fix the problem.

Christian Brabandt

unread,
Jun 29, 2016, 2:37:11 PM6/29/16
to vim/vim

Matt McMinn

unread,
Jun 29, 2016, 2:55:03 PM6/29/16
to vim/vim

I just grabbed those binaries, and both the 32 and 64 bit versions were able to open the files (64 bit was much quicker of course). I tried a few save load cycles as well and those all worked. So it looks like the patches are working for me. Thanks for getting those binaries built!

Reply all
Reply to author
Forward
0 new messages