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.
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
The latest patches are here:
https://bitbucket.org/k_takata/vim-ktakata-mq/src/tip/0001_support-largefiles-on-windows.patch
https://bitbucket.org/k_takata/vim-ktakata-mq/src/tip/0002_fix-off_T-display.patch
https://bitbucket.org/k_takata/vim-ktakata-mq/src/tip/0003_use-stat_T.patch
https://bitbucket.org/k_takata/vim-ktakata-mq/src/tip/0004_add-stat-test.patch
https://bitbucket.org/k_takata/vim-ktakata-mq/src/tip/0005_test_largefile.patch
can you reliably reproduce the issue?
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.
you could use the binaries from https://github.com/chrisbra/vim-win32-installer/releases/tag/v7.4.1967_test3
I just made them and applied ken patches. Build log here: https://ci.appveyor.com/project/chrisbra/vim-win32-installer-33v6e
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!