David Fishburn wrote:

> ...
> Rebuild Vim. Then you can run Vim with gdb with a breakpoint
> 
> > when Vim gives E341:
> >
> > $ cd vim/src
> >
> > $ grep -n E341 *c
> > misc2.c:902:    EMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
> >
> > $ gdb --args ./vim -f -g
> >
> > (gdb) br misc2.c:902
> > Breakpoint 1 at 0x4eb006: file misc2.c, line 902.
> > (gdb) run
> >
> > Then when Vim hits the breakpoint, you can type gdb command "bt"
> > to get a backtrace.
> >
> >
> 
> For some background.
> This crash only happens on Ubuntu in my case.
> 
> Clipboard must have unnamedplus in it.
> I am copying Unicode characters (Chinese in this case) and flipping between
> GUI Vim and Chrome.
> set clipboard=unnamedplus,autoselect,exclude:cons|linux
> 
> The YankRing plugin has a Focus autocmd which checks it and if it is
> different adds it to the ring.
> 
> Here is :set

[...]

> Here is the back trace.
> 
> #0  lalloc (size=0, message=1) at misc2.c:902
> #1  0x0000000000508b64 in lalloc_clear (size=0, message=1) at misc2.c:875
> #2  0x0000000000535a00 in str_to_reg (y_ptr=0x899170, yank_type=228,
>     str=0xc8db09 "", len=-1, blocklen=0) at ops.c:6372
> #3  0x000000000053510a in clip_yank_selection (type=228, str=0xc8db09
> "",  len=-1, cbd=0x89fbe0) at ops.c:5960
> #4  0x00000000005eb467 in selection_received_cb (widget=0xa46550,
>     data=0x7fffffffa2a0, time_=0, user_data=0x0) at gui_gtk_x11.c:1264

The problem appears to be that str_to_reg() is called with a negative
length.  The length comes from somehwere in selection_received_cb().
You could try setting a breakpoint there to see what path is taken.  Or
add some printf statements and look at what happened after the lalloc
error.

[...]


-- 
>From "know your smileys":
 C=}>;*{)) Drunk, devilish chef with a toupee in an updraft,
           a mustache, and a double chin

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