crash when aborting an edit when existing swap file detected

41 views
Skip to first unread message

Ben Fritz

unread,
Sep 12, 2012, 2:24:31 PM9/12/12
to vim...@googlegroups.com
I consistently can crash my gvim 7.3.346 on Windows XP 64-bit, with the following .vimrc:

=====================================begin vimrc=============================
set nowrap

set guioptions+=b " add bottom scrollbar

" standard last-position restore
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif

" Make slow network shares on Windows prefer not to use the file's directory
" for swap files
set noswapfile
autocmd BufReadPre * setlocal noswapfile
autocmd BufEnter {Z,U,W}:{/,\\}* set dir-=. dir+=.
" nested autocmd to enable swap files so SwapExists autocmds fire, too
autocmd BufEnter * nested setlocal swapfile
autocmd BufLeave {Z,U,W}:{/,\\}* set dir-=. dir^=.

=====================================end vimrc=============================

And the following _viminfo file saved as C:\temp\viminfo_test:

=====================================begin viminfo=============================
# This viminfo file was generated by Vim 7.3.
# You may edit it if you're careful!

# Value of 'encoding' when this file was written
*encoding=latin1


# Command Line History (newest to oldest):
:e U:/temp/test.bat

# History of marks within files (newest to oldest):

> U:\temp\test.bat
" 9 0
=====================================end viminfo=============================

and the following command to launch Vim:

gvim --noplugin -i C:\temp\viminfo_test

If I launch Vim as indicated, and a swap file exists for U:\temp\test.bat, and I edit U:\temp\test.bat, and choose "Abort" from the swap exists message, I get a crash every time. If I remove any component from the test .vimrc, I no longer get the crash. As a workaround for now in my actually .vimrc, I have removed the bottom scrollbar, so that I no longer crash. However, even though I don't crash anymore, I DO get:

Error detected while processing BufAdd Auto commands for "*":
E16: Invalid range: call <SID>BMAdd()

I'm completely stumped as to how any of these items in the .vimrc and viminfo file are related...

Ben Fritz

unread,
Sep 12, 2012, 2:27:59 PM9/12/12
to vim...@googlegroups.com
In case it matters, here are the contents of U:\temp\test.bat. I don't actually know what I was testing at the time, it was just a convenient file I had hanging around on the network drive while testing the autocmds to store swap files somewhere else for that network drive:

=========================begin test.bat==================
@echo off
setlocal

:: Header Comment
::
:: Usage: test {arguments}
::

if "%~1"=="" goto :END

call gvim --servername VIMDIFF --remote-send ":diffsplit <C-R>=fnameescape('%~1')<CR><CR>"

:END
endlocal
echo on
=========================end test.bat==================

Ben Fritz

unread,
Sep 12, 2012, 4:32:38 PM9/12/12
to vim...@googlegroups.com
On Wednesday, September 12, 2012 1:24:31 PM UTC-5, Ben Fritz wrote:
> I consistently can crash my gvim 7.3.346 on Windows XP 64-bit, with the

Typo: that should be 7.3.646. This was the most recent "Vim without cream" build available the last time I checked.

Ben Fritz

unread,
Oct 3, 2012, 12:12:34 AM10/3/12
to vim...@googlegroups.com
Well, I could not reproduce the problem on my home PC with the same version of Vim installed. My home PC is Windows Vista 32-bit, so I'll try again when I get around to setting up Vim on my 64-bit Windows 7 system. I'm not all that hopeful, though.
Reply all
Reply to author
Forward
0 new messages