Bram Moolenaar wrote:
> Dominique Pelle wrote:
...
>> 1279 void
>> 1280 free_typebuf()
>> 1281 {
>> 1282 if (typebuf.tb_buf == typebuf_init)
>> 1283 EMSG2(_(e_intern2), "Free typebuf 1");
>> 1284 else
>> 1285 vim_free(typebuf.tb_buf);
>> 1286 if (typebuf.tb_buf == noremapbuf_init)
>> 1287 EMSG2(_(e_intern2), "Free typebuf 2");
>> 1288 else
>> 1289 vim_free(typebuf.tb_noremap);
>> 1290 }
>>
>> Test at line 1286 is meant to test typebuf.tb_noremap
>> and not typebuf.tb_buf. Attached patch fixes it.
>>
>> But the fix should just cause to have an error message
>> rather than trying to free something in .bss section.
>> So something else is wrong. Unfortunately, I have not
>> been to reproduce this error so it may be hard to track
>> down. Perhaps someone can figure it out from the
>> above stack.
>
> Thanks for the fix. But it indeed doesn't solve the problem you
> encountered.
>
> The stack shows:
> a user defined Ex command: do_ucmd()
> calling a user defined function: call_user_func()
> invoking ":normal": ex_normal()
>
> Now there restoring typeahead fails. Something in the ":normal" must
> have caused a problem, but we can't see what it was in the stack trace.
>
> I hope you find a way to reproduce the problem.
I'll add temporarily in my source tree (but not in CVS), at the
beginning of free_typebuf():
assert(typebuf.tb_buf != typebuf_init);
assert(typebuf.tb_noremap != noremapbuf_init);
... so that if it happens again, I'll have a core file to analyze with
gdb. Without asserts, it's too easy to not notice the errors.
Hopefully I'll then find a way to reproduce it. Perhaps other
Vim developers can also put the asserts in case they manage
to reproduce it.
-- Dominique
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---