public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Vim: segmentation fault
@ 2007-11-20 19:16 Aldi Kraja
  2007-11-20 19:23 ` Matt Wozniski
  0 siblings, 1 reply; 4+ messages in thread
From: Aldi Kraja @ 2007-11-20 19:16 UTC (permalink / raw)
  To: cygwin

Hi,
Opening a file 1.5 GB cygwin Vim reports segmentation fault.
Vim: Caught deadly signal SEGV.

Is there any way that one can expand the setting of Vim?

I need to change the header of the file to some extent, but I do not 
think that emacs will do it. Less is a pager. Any other idea how to edit 
a file this large?

Thank you in advance,

Aldi

-- 




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Vim: segmentation fault
  2007-11-20 19:16 Vim: segmentation fault Aldi Kraja
@ 2007-11-20 19:23 ` Matt Wozniski
  2007-11-20 19:24   ` Brian Mathis
  2007-11-20 21:17   ` Dave Korn
  0 siblings, 2 replies; 4+ messages in thread
From: Matt Wozniski @ 2007-11-20 19:23 UTC (permalink / raw)
  To: cygwin

On Nov 20, 2007 2:02 PM, Aldi Kraja wrote:
> Hi,
> Opening a file 1.5 GB cygwin Vim reports segmentation fault.
> Vim: Caught deadly signal SEGV.
>
> Is there any way that one can expand the setting of Vim?
>
> I need to change the header of the file to some extent, but I do not
> think that emacs will do it. Less is a pager. Any other idea how to edit
> a file this large?

If it's only a header you need to edit, you do it the usual unix way...
for a 15000 line file, where the header is in the first 100 lines:

$ head -100 BIGFILE > filehead
$ tail -14900 BIGFILE > filetail
$ vim filehead
# modify...
$ cat filehead filetail > BIGFILE
$ rm filehead filetail

And, there's no reason that should crash vim.  Do you have the
1.5 GB of memory that you'd need to open that file?

~Matt

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Vim: segmentation fault
  2007-11-20 19:23 ` Matt Wozniski
@ 2007-11-20 19:24   ` Brian Mathis
  2007-11-20 21:17   ` Dave Korn
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Mathis @ 2007-11-20 19:24 UTC (permalink / raw)
  To: cygwin

On Nov 20, 2007 2:16 PM, Matt Wozniski <godlygeek@gmail.com> wrote:
> On Nov 20, 2007 2:02 PM, Aldi Kraja wrote:
> > Hi,
> > Opening a file 1.5 GB cygwin Vim reports segmentation fault.
> > Vim: Caught deadly signal SEGV.
> >
> > Is there any way that one can expand the setting of Vim?
> >
> > I need to change the header of the file to some extent, but I do not
> > think that emacs will do it. Less is a pager. Any other idea how to edit
> > a file this large?
>
> If it's only a header you need to edit, you do it the usual unix way...
> for a 15000 line file, where the header is in the first 100 lines:
>
> $ head -100 BIGFILE > filehead
> $ tail -14900 BIGFILE > filetail
> $ vim filehead
> # modify...
> $ cat filehead filetail > BIGFILE
> $ rm filehead filetail
>
> And, there's no reason that should crash vim.  Do you have the
> 1.5 GB of memory that you'd need to open that file?
>
> ~Matt

You could also 'split' the file into more manageable chunks if it's
not at the head, then 'cat' it back together when done.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Vim: segmentation fault
  2007-11-20 19:23 ` Matt Wozniski
  2007-11-20 19:24   ` Brian Mathis
@ 2007-11-20 21:17   ` Dave Korn
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Korn @ 2007-11-20 21:17 UTC (permalink / raw)
  To: cygwin

On 20 November 2007 19:17, Matt Wozniski wrote:


> And, there's no reason that should crash vim.  Do you have the
> 1.5 GB of memory that you'd need to open that file?

  Umm, you don't need that much memory to open a file, thanks to the wonders of file-backed virtual memory.  But what you probably do need is a 1.5GB empty hole in your process address space (unless vim is intelligent enough to only mmap() part of the file at a time), and finding a hole that size is almost certainly impossible on 32-bit targets without enabling the boot.ini '/3GB' switch.

  However I don't know anything about the internals of vim, so can't be sure that's the cause.  And it's certainly a bug that it doesn't fail gracefully.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-20 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-20 19:16 Vim: segmentation fault Aldi Kraja
2007-11-20 19:23 ` Matt Wozniski
2007-11-20 19:24   ` Brian Mathis
2007-11-20 21:17   ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).