Hi Richard! On Fr, 24 Aug 2012, Richard Brown wrote:
> On Fri, Aug 24, 2012 at 7:51 PM, Christian Brabandt <[email protected]>wrote: > > > No, wp is perfectly valid. > > > > The problem is, when closing the current window, the autocommand closes > > the only other active window and we end up with wp->w_buffer == NULL. So > > wp->w_closing doesn't really help here. > > > > I have seen this crash several times already, but have never really had > > any idea how to prevent this. But I think, the attached patch fixes it > > altogether. > > > > Hi, I applied the patch to 7.3.638 and tried the same steps: > > Error detected while processing BufWinLeave Auto commands for "*": > Program received signal SIGSEGV, Segmentation fault. > 0x00000001000c7d67 in ml_get_buf (buf=0x0, lnum=1, will_change=0) at > memline.c:2429 > 2429 if (lnum > buf->b_ml.ml_line_count) /* invalid line number */ > (gdb) bt > #0 0x00000001000c7d67 in ml_get_buf (buf=0x0, lnum=1, will_change=0) at > memline.c:2429 > #1 0x00000001000f166a in check_cursor_col_win (win=0x100825a00) at > misc2.c:563 > #2 0x00000001000f1616 in check_cursor_col () at misc2.c:547 > #3 0x00000001000f178e in check_cursor () at misc2.c:618 > #4 0x000000010005e2c6 in do_ecmd (fnum=0, ffname=0x0, sfname=0x0, eap=0x0, > newlnum=1, flags=1, oldwin=0x100825a00) at ex_cmds.c:3627 > #5 0x00000001001ccb51 in win_close (win=0x100825a00, free_buf=1) at > window.c:2323 > #6 0x000000010007b900 in ex_quit (eap=0x7fff5fbfeff8) at ex_docmd.c:6548 > #7 0x00000001000721d2 in do_one_cmd (cmdlinep=0x7fff5fbff798, sourcing=0, > cstack=0x7fff5fbff2e0, fgetline=0x10008c7b0 <getexline>, cookie=0x0) at > ex_docmd.c:2677 > #8 0x000000010006e8f0 in do_cmdline (cmdline=0x0, fgetline=0x10008c7b0 > <getexline>, cookie=0x0, flags=0) at ex_docmd.c:1122 > #9 0x00000001001095af in nv_colon (cap=0x7fff5fbff8d0) at normal.c:5412 > #10 0x000000010010182a in normal_cmd (oap=0x7fff5fbff970, toplevel=1) at > normal.c:1193 > #11 0x00000001001df0a7 in main_loop (cmdwin=0, noexmode=0) at main.c:1294 > #12 0x00000001001deb8e in main (argc=3, argv=0x7fff5fbffbe8) at main.c:998 Hmm, works for me using vim 7.3.638 and starting it using -u NONE -U NONE -N -i NONE /tmp/vim_segfault.vim (where /tmp/vim_segfault contains the lines mentioned earlier: autocmd BufWinLeave * if empty(&bt) | lclose |endif call setloclist(1, [{'bufnr': 1, 'lnum': 1, 'text': 'testing'}]) lopen wincmd k q and when started doing :so % regards, Christian -- 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
