E685: Internal error: func_unref()

5 views
Skip to first unread message

Dominique Pelle

unread,
May 12, 2008, 9:01:48 AM5/12/08
to vim_dev
I observe a 100% reproducible internal error message
"E685: Internal error: func_unref()" with vim-7.1.298 when:

- building vim with -DEXITFREE
- and using the NERD_tree.vim plugin

It's a low priority bug since it only happens when building
with -DEXITFREE (which is a debug feature normally
disabled).

Steps to reproduce:

1/ build vim with -DEXITFREE i.e. uncomment line
"PROFILE_CFLAGS = -DEXITFREE"
in vim7/src/Makefile

2/ install the NERD_tree.vim plugin available at:
http://www.vim.org/scripts/script.php?script_id=1658

3/ run...

$ vim -c NERDTree -c qa

... and observe that vim reports many internal errors when exiting:

Error detected while processing command line:
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
E685: Internal error: func_unref()
...
... etc, error message repeats 10877 times

I have not found a way fix yet.

I'm using vim-7.1.298 on Linux x86.

-- Dominique

Dominique Pelle

unread,
May 17, 2008, 11:52:21 AM5/17/08
to vim_dev


I tried to debug it. I found:

- one bug in delete_first_msg() [message.c]: when delete_first_msg()
is called and the list of message becomes empty, last_msg_hist
should be set to NULL. Bug should only happen when Vim is
compiled with -DEXITFREE since the list of message is never
cleared otherwise.

- in eval_clear() [eval.c], free_all_functions() should be called I think
(not 100% sure) after garbage_collect() because garbage_collect()
uses hash of functions. Again, this is only relevant if Vim is
compiled with -DEXITFREE.

After those 2 fixes, I no longer see the internal error message as
described in the initial post.

Attached
- fix_delete_first_msg.message.c.patch
- fix_internal_error.eval.c.patch

-- Dominique

fix_delete_first_msg.message.c.patch
fix_internal_error.eval.c.patch

Bram Moolenaar

unread,
May 19, 2008, 1:49:42 PM5/19/08
to Dominique Pelle, vim_dev

Dominique Pelle wrote:

Thanks. I'll look into it later.

--
If an elephant is left tied to a parking meter, the parking fee has to be paid
just as it would for a vehicle.
[real standing law in Florida, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages