Vim/Windows - Delayed Write Failure

This is a discussion on Vim/Windows - Delayed Write Failure within the Editors forums in Theory and Concepts category; Lately, every time I edit a file for a while with Vim, anywhere from 15 to 30 minutes or so, I will start getting popup error messages from Windows that say: ------------------------------------------------------------- Windows - Delayed Write Failed Windows was unable to save all the data for the file \\computer\d$\..\..\filename.swp. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file ------------------------------------------------------------- In addition, I will sometimes get messages from Vim telling me that the file I'm editing has been lost - though in every case ...

Go Back   Application Development Forum > Theory and Concepts > Editors

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-21-2008, 05:43 PM
Alan Meyer
Guest
 
Default Vim/Windows - Delayed Write Failure

Lately, every time I edit a file for a while with Vim, anywhere
from 15 to 30 minutes or so, I will start getting popup error
messages from Windows that say:

-------------------------------------------------------------
Windows - Delayed Write Failed
Windows was unable to save all the data for the file
\\computer\d$\..\..\filename.swp.
The data has been lost. This error may be caused by a failure of
your computer hardware or network connection. Please try to save
this file
-------------------------------------------------------------

In addition, I will sometimes get messages from Vim telling me
that the file I'm editing has been lost - though in every case I
check and find the file is there and fine.

Oddly, I don't get the error immediately. I have to edit for a
while before it starts happening. I thought maybe it happened
when the swap file grew beyond its initial allocated size, but
that doesn't seem to be the problem.

My editing environment consists of a Windows XP workstation
talking to a Windows 2003 server over a Windows local area
network.

This looks clearly like a Windows problem, right? But there's
more to it than that. I do not see the error when using any
software other than Vim. For example Emacs, which also saves
data periodically. Also, the programmer in the office next door
to me uses Vim to edit files on the same server using the same
network, and he has no problems. Another programmer nearby uses
Emacs to edit files on the same server and same network, and
never sees a problem, though he did tell me he abandoned Vim a
few years ago when he started seeing this particular error and
couldn't figure out what caused it.

I know it's unlikely that anyone can diagnose this problem from
afar but I'm hoping a light will go on in someone's head and
she'll say, "Oh yes, I've seen this problem. It's caused by an
interaction between the Windows umptifraatz and the Vim
thingamadoodle. You can fix it by setting an environment
variable like so, or by adding this line to the vimrc file", or
whatever.

Thanks.

Alan


Reply With Quote
  #2  
Old 08-21-2008, 08:05 PM
Matthew Loar
Guest
 
Default Re: Vim/Windows - Delayed Write Failure

Alan Meyer <ameyer2@yahoo.com> wrote:
> Lately, every time I edit a file for a while with Vim, anywhere
> from 15 to 30 minutes or so, I will start getting popup error
> messages from Windows that say:
>
> -------------------------------------------------------------
> Windows - Delayed Write Failed
> Windows was unable to save all the data for the file
> \\computer\d$\..\..\filename.swp.
> The data has been lost. This error may be caused by a failure of
> your computer hardware or network connection. Please try to save
> this file
> -------------------------------------------------------------
>


This article seems to suggest that the problem may be caused by
antivirus or other software on the server:
http://support.microsoft.com/kb/822219/en-us

Don't know why Vim would be the only thing to hit this, though.

Matt Loar
Reply With Quote
  #3  
Old 08-21-2008, 09:28 PM
canoe
Guest
 
Default Re: Vim/Windows - Delayed Write Failure

Alan Meyer wrote:
> Lately, every time I edit a file for a while with Vim, anywhere
> from 15 to 30 minutes or so, I will start getting popup error
> messages from Windows that say:
>
> -------------------------------------------------------------
> Windows - Delayed Write Failed
> Windows was unable to save all the data for the file
> \\computer\d$\..\..\filename.swp.
> The data has been lost. This error may be caused by a failure of
> your computer hardware or network connection. Please try to save
> this file
> -------------------------------------------------------------
>
> In addition, I will sometimes get messages from Vim telling me
> that the file I'm editing has been lost - though in every case I
> check and find the file is there and fine.
>
> Oddly, I don't get the error immediately. I have to edit for a
> while before it starts happening. I thought maybe it happened
> when the swap file grew beyond its initial allocated size, but
> that doesn't seem to be the problem.
>
> My editing environment consists of a Windows XP workstation
> talking to a Windows 2003 server over a Windows local area
> network.

[snip]

I confess that I don't really know what your problem is, but given the
filename.swp clue -- perhaps you could set the bdir option. By default, your
current directory is where *.swp files go -- and maybe you can throw a wrench
into the bug by specifying something like
set bdir=c:/tmp
in your _vimrc file (in this case, assuming that you have a tmp/ directory under
c.

HTH!

Reply With Quote
  #4  
Old 08-22-2008, 12:02 AM
John Beckett
Guest
 
Default Re: Vim/Windows - Delayed Write Failure

Alan Meyer wrote:
>Windows - Delayed Write Failed


Perhaps what Mathew said applies and you have some weird software
issue.

However, what the message means is YOUR DISK IS ABOUT TO FAIL.

Do your last backup, starting with the most critical files (don't try
to back up everything as your first step because once you hit bad
sectors the whole backup can be screwed).

You confirm this by running eventvwr to examine the System log in
Event Viewer. It's just luck that the error seems to happen according
to some pattern. It's most likely, however, that it simply happens
when the system tries to access certain disk sectors.

Do not try to delete any files or do anything unnecessary until you've
got your stuff backed up.

John

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 06:27 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.