Forwarded by request...
Cliff
----- Forwarded message from David Jardine <[EMAIL PROTECTED]> -----

Date: Mon, 27 Aug 2001 21:49:08 +0200
To: Cliff Sarginson <[EMAIL PROTECTED]>
Subject: Re: segfault in vi
From: David Jardine <[EMAIL PROTECTED]>

A night's sleep and a day's work out of sight of any computer
gave me time to realise that I had no business giving vi this
file to deal with in the first place - it was a ninety-line
text formatted by a Microsoft word-processing program and thus
containing all sorts of raw numbers (the 'file' command told
me it was a 'data' file).

FWIW, I did find out that the segfault didn't occur while I
was trying to edit the file, ie removing the formatting stuff.
At this stage the console just froze; I killed the process
from another console (I was running vi under strace, as Karsten
suggested, and it didn't seem to matter which process I killed),
and returned to the original console to find it doing strange
things like not echoing commands to the screen, not putting
the prompt on a new line, and using a linefeed without a
carriage return for new lines in its output.

The segmentation fault occurred after I rebooted and accepted
vi's generous offer to recover the file with -r.  The strace
file associated with that was 26000 lines long and I found
nearly 2000 files in /tmp produced by vi at one stage.  Cliff's
point about long lines must be valid - some of them seemed to
be thousands of characters long.

So, does this count as a bug?  I don't think I should have tried
this with vi - dman's suggestion that I try antiword, which I
ungraciously ignored, seems to make sense, although I don't
know whether I'm going to want to do this again - but shouldn't
vi have realised that it was taking on something it wasn't
equipped to do?

I don't know anything about bug reporting, by the way, but I'm
sure some kind soul will give me a starting hint :)

Sorry to have taken up your time.

David

On Mon, Aug 27, 2001 at 07:41:20AM +0200, Cliff Sarginson wrote:
> Well, you have found a bug I would guess. That is "why"...
> Maybe a buffer over-run..too long a line ?
> Report it..
> Cliff
> 
> On Mon, Aug 27, 2001 at 02:01:58AM +0200, David Jardine wrote:
> > I only know that I type 'vi' on the command line and - I've
> > just checked - 'which vi' tells me '/usr/bin/vi' but, hang on,
> > 'ls -l /usr/bin/vi' tells me it's a symlink to
> > /etc/alternatives/vi and, hang on another sec, that is a symlink
> > to /usr/bin/nvi, which seems to be the final destination at
> > 315248 bytes.  So let me rephrase my question.  Does anyone
> > know why nvi baulks at removing formatting mumbo-jumbo from
> > WordPad files?
> > 
> > David
> > 
> > 
> > On Sun, Aug 26, 2001 at 07:30:57PM -0400, dman wrote:
> > > On Mon, Aug 27, 2001 at 01:40:50AM +0200, David Jardine wrote:
> > > | I was trying to remove the formatting mumbo-jumbo of a MS WordPad
> > > | document in vi, but it segfaulted - repeatedly.  Is there a
> > > | known reason for this?
> > > 
> > > Uhh, vi is and copyrighted by AT&T and I don't think it is maintained
> > > anymore.  You don't have it.  Now which vi *clone* do you have
> > > installed?  nvi? elvis? vim?  I like vim the best -- it has a lot of
> > > really useful features and is very stable, not to mention extremely
> > > cross-platform.  Try 'antiword' though -- it is really cool at
> > > rendering Word docs as plain text.
> > > 
> > > HTH,
> > > -D
> > > 
> > > 
> > > -- 
> > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> > > 
> > 
> > 
> > -- 
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> > 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 

----- End forwarded message -----

Reply via email to