Monday, March 1, 2010

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

Bram Moolenaar wrote:
> 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.
>
>
That is the error message - E315 ml_get: cannot find line (N). I note
that if I type 'q', when it waits for me to hit enter, I don't have to
hit Enter after each line, it just spews this error message with
increasing line numbers until it gets to the end or dies with a segfault.

I am not at work so I can't run any tests today - sorry for the slow
response cycle. Since I don't write C, I haven't had to deal with
segfaults for a long time. To get a stack trace, do I need to run vim
under gdb?

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