Hi all,

When developing a test case for closing a tab page with the temporary
autocmd window when executing an autocmd, I ran into a Vim crash.
The test function that I used is below:

func Test_close_tabpage_with_aucmdwin()
  edit one.txt
  tabnew two.txt
  augroup aucmd_win_test
    au!
    au BufEnter * if expand('<afile>') == 'one.txt' | tabfirst | tabonly |
endif
  augroup END

  doautoall BufEnter

  augroup aucmd_win_test
    au!
  augroup END
  augroup! aucmd_win_test
endfunc
call Test_close_tabpage_with_aucmdwin()


The crash backtrace is below:

frame #0: 0x000000010028c21a vim`goto_tabpage_tp(tp=0x0000000000000000,
trigger_enter_autocmds=0, trigger_leave_autocmds=0) at window.c:4268:43
frame #1: 0x0000000100294aae vim`close_tabpage(tab=0x000000010060a920) at
window.c:4020:5
frame #2: 0x0000000100007a19 vim`aucmd_restbuf(aco=0x00007ffeefbfd7d0) at
autocmd.c:1529:6
frame #3: 0x000000010000754f vim`ex_doautoall(eap=0x00007ffeefbfd9e0) at
autocmd.c:1370:6
frame #4: 0x0000000100094fb7 vim`do_one_cmd(cmdlinep=0x00007ffeefbfdca0,
sourcing=1, cstack=0x00007ffeefbfdcd8, fgetline=(vim`get_func_line at
userfunc.c:4036), cookie=0x0000000102809e00) at ex_docmd.c:2519:2
frame #5: 0x0000000100091df2 vim`do_cmdline(cmdline=0x0000000000000000,
fgetline=(vim`get_func_line at userfunc.c:4036), cookie=0x0000000102809e00,
flags=7) at ex_docmd.c:979:17
frame #6: 0x0000000100260610 vim`call_user_func(fp=0x00000001006289e0,
argcount=0, argvars=0x00007ffeefbfeb30, rettv=0x00007ffeefbfed40,
funcexe=0x00007ffeefbfecd0, selfdict=0x0000000000000000) at
userfunc.c:1405:2
frame #7: 0x000000010025f584
vim`call_user_func_check(fp=0x00000001006289e0, argcount=0,
argvars=0x00007ffeefbfeb30, rettv=0x00007ffeefbfed40,
funcexe=0x00007ffeefbfecd0, selfdict=0x0000000000000000) at
userfunc.c:1546:2
frame #8: 0x000000010025ec2b
vim`call_func(funcname="Test_close_tabpage_with_aucmdwin", len=-1,
rettv=0x00007ffeefbfed40, argcount_in=0, argvars_in=0x00007ffeefbfeb30,
funcexe=0x00007ffeefbfecd0) at userfunc.c:1993:11
frame #9: 0x000000010025e4ab
vim`get_func_tv(name="Test_close_tabpage_with_aucmdwin", len=-1,
rettv=0x00007ffeefbfed40, arg=0x00007ffeefbfed70,
funcexe=0x00007ffeefbfecd0) at userfunc.c:609:8
frame #10: 0x0000000100266274 vim`ex_call(eap=0x00007ffeefbfef40) at
userfunc.c:3855:6
frame #11: 0x0000000100094fb7 vim`do_one_cmd(cmdlinep=0x00007ffeefbff200,
sourcing=0, cstack=0x00007ffeefbff238, fgetline=(vim`getexline at
ex_getln.c:2709), cookie=0x0000000000000000) at ex_docmd.c:2519:2
frame #12: 0x0000000100091df2 vim`do_cmdline(cmdline=0x0000000000000000,
fgetline=(vim`getexline at ex_getln.c:2709), cookie=0x0000000000000000,
flags=0) at ex_docmd.c:979:17
frame #13: 0x0000000100137cde vim`nv_colon(cap=0x00007ffeefbff7d8) at
normal.c:3319:15
frame #14: 0x0000000100131d7b vim`normal_cmd(oap=0x00007ffeefbff868,
toplevel=1) at normal.c:1071:5
frame #15: 0x00000001002d894c vim`main_loop(cmdwin=0, noexmode=0) at
main.c:1508:3
frame #16: 0x00000001002d7195 vim`vim_main2 at main.c:898:5
frame #17: 0x00000001002d48d3 vim`main(argc=1, argv=0x00007ffeefbff988) at
main.c:442:12

- Yegappan

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7nSU9cFKyw5igfWt-oKwUhV5FjM3ReiPZ-MzGjF89Wwjw%40mail.gmail.com.

Reply via email to