Loading ...
Sorry, an error occurred while loading the content.

crash when aborting an edit when existing swap file detected

Expand Messages
  • Ben Fritz
    I consistently can crash my gvim 7.3.346 on Windows XP 64-bit, with the following .vimrc: =====================================begin
    Message 1 of 4 , Sep 12, 2012
    • 0 Attachment
      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...

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Ben Fritz
      ... 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
      Message 2 of 4 , Sep 12, 2012
      • 0 Attachment
        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 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...

        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==================

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Ben Fritz
        ... Typo: that should be 7.3.646. This was the most recent Vim without cream build available the last time I checked. -- You received this message from the
        Message 3 of 4 , Sep 12, 2012
        • 0 Attachment
          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.

          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Ben Fritz
          ... 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
          Message 4 of 4 , Oct 2, 2012
          • 0 Attachment
            On Wednesday, September 12, 2012 3:32:39 PM UTC-5, Ben Fritz wrote:
            > 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.

            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.

            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          Your message has been successfully submitted and would be delivered to recipients shortly.