Christian Brabandt wrote:

> On Mo, 17 Dez 2012, Sean Reifschneider wrote:
> 
> > Since vim 7.3 patch 429 (on Ubuntu Precise/12.04), it looks like there's a 
> > segfault issue when doing "cclose" on BufUnload in a python function.  In 
> > particular, it happens on 7.3 patch 547 (Ubuntu Quantal/12.10), and is also 
> > happening on 7.3 patch 762 (latest tag in Mercurial checkout).
> > 
> > Here's how I'm able to reproduce it:
> > 
> > Create a file /tmp/blowup.vim:
> > 
> >    pyfile /tmp/blowup.py
> >    botright 3copen
> >    autocmd BufUnload * python leaving_buffer()
> > 
> > Then create a file /tmp/blowup.py:
> > 
> >    import vim
> >    def leaving_buffer():
> >            vim.command('cclose')
> >            vim.command('quit')
> > 
> > Now run "vim -u tmp/blowup.vim /tmp/foo" (in my case, /tmp/foo does not 
> > exist).   Do ":q" in vim, and it will segfault:
> > 
> > Vim: Caught deadly signal SEGV
> > zsh: segmentation fault (core dumped)  vim -u /tmp/blowup.vim /tmp/foo
> > 
> 
> This is an issue, that seems to come up in one or another form every 
> couple of months here. The root cause is always autocommands closing all 
> windows and buffers, which Vim does not expect and so it crashes sooner 
> or later. Here is a patch, trying to prevent this another time:

Thanks Christian, added to the todo list.
Note that I am travelling, expect some delay.


> This does quit Vim, in case an autocommand closes all other 
> windows/buffers while Vim is processing the win_close() function. 

What if there are unsaved changes?


-- 
hundred-and-one symptoms of being an internet addict:
175. You send yourself e-mail before you go to bed to remind you
     what to do when you wake up.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui