Ron Aaron wrote:

> > Perhaps a stack trace will help.  Or setting a breakpoint at
> > 
> > write_viminfo_history() and stepping through it.  And check that
> > 
> > finish_viminfo_history() isn't called.  You did include the change in
> > 
> > ex_cmds.c, right?
> 
>  I verified manually that the patch contents of 7.3.903 were applied;
>  but there's not changes to ex_cmds.c  that I can find. 

It was in an earlier patch, 7.3.892.

> The 'write_viminfo_history()' happens twice and in the second
> iteration this happens:

Hmm, it's only be prepared to called once after
prepare_viminfo_history().  Can you find out where the two calls are
coming from?

> 6230                          && !(round == 2 && i >= viminfo_hisidx[type]))
> (gdb) 
> 6232                      p = round == 1 ? history[type][i].hisstr
> (gdb) 
> 6233                                                     : 
> viminfo_history[type][i];
> (gdb) 
> 6234                      if (p != NULL && (round == 2 || 
> !history[type][i].viminfo))
> (gdb) 
> 6251                          if (--i < 0)
> (gdb) 
> 6253                          if (i == hisidx[type])
> (gdb) c
> Continuing.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x080bdcfe in write_viminfo_history (fp=fp@entry=0x83ec2c0) at ex_getln.c:6233
> 6233                                                     : 
> viminfo_history[type][i];
> (gdb) l
> 6228              if (i >= 0)
> 6229                  while (num_saved > 0
> 6230                          && !(round == 2 && i >= viminfo_hisidx[type]))
> 6231                  {
> 6232                      p = round == 1 ? history[type][i].hisstr
> 6233                                                     : 
> viminfo_history[type][i];
> 6234                      if (p != NULL && (round == 2 || 
> !history[type][i].viminfo))
> 6235                      {
> 6236                          --num_saved;
> 6237                          fputc(hist_type2char(type, TRUE), fp);
> (gdb) p num_saved
> $11 = 199
> (gdb) p i
> $12 = 0
> (gdb) p viminfo_history
> $13 = {0x0, 0x0, 0x0, 0x0, 0x0}
> (gdb) p viminfo_hisidx
> $14 = {199, 200, 4, 55, 0}

I can clear viminfo_hisidx to avoid this.  I would still like to find
out why this is needed.

-- 
hundred-and-one symptoms of being an internet addict:
179. You wonder why your household garbage can doesn't have an
     "empty recycle bin" button.

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

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui