Friday, February 26, 2010

Re: Possible problem with sudden shortening of very large files by an external process

Gary Bickford wrote:

> I often misuse vim to view log files while debugging batch jobs. It is
> very handy for moving around in the file, viewing the colorized content
> and searching for relevant text. These log files can be from several
> thousand to millions of lines. Vim does a remarkably good job of
> handling these files. However, sometimes it has a problem when the
> batch job is re-run while I am viewing the file in vim, and the log file
> is replaced by a much shorter one.
>
> When vim tries to reload the file, sometimes I get a very long series of
> red warning messages - I can't repeat the event just now, so can't
> provide the content of the warning, but I think it has to do with
> missing lines.
>
> This succession of warnings can be inconvenient when there are several
> million to report, or even a few thousand! And very occasionally vim
> hangs (apparently), or just gives up the ghost and dies. I think
> problems are more likely when the 'present location' is far down the
> file.
>
> Considering the abuse I am giving vim this is within the range of
> acceptable behavior, but I thought it was worth mentioning as an issue
> anyway. From the behavior, I speculate that vim has found the present
> line to be after the end of file, is trying to move the line pointer
> upwards one line at a time, and is finding no data there each time.

It would help a lot to know what the text of that error message is.

If it is " ml_get: cannot find line {N}" then the cause might be hard to
find. A stack trace would be helpful then.

--
ZOOT: I'm afraid our life must seem very dull and quiet compared to yours.
We are but eightscore young blondes, all between sixteen and
nineteen-and-a-half, cut off in this castle, with no one to protect us.
Oooh. It is a lonely life ... bathing ... dressing ... undressing ...
making exciting underwear....
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
You received this message from the "vim_use" 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

No comments: