Patch for warning with glib 2.10+

Bram Moolenaar Bram at moolenaar.net
Sun Jul 8 14:21:11 UTC 2007


James -

> When using Vim (built with Gnome support) on a system with glib 2.10 or
> newer, Vim will issue the following warning:
> 
> ***MEMORY-WARNING***: gvim[11234]: GSlice: g_thread_init() must be
> called before all other GLib functions; memory corruption due to late
> invocation of g_thread_init() has been detected; this program is
> likely to crash, leak or unexpectedly abort soon...
> 
> This occurs when starting gvim or invoking "vim --help" (since that
> causes Vim to print out the Gnome help as well).  The attached patch
> addresses the problem as described at
> <http://lists.debian.org/debian-devel/2007/06/msg01008.html>.

Well, Vim doesn't use this threading stuff directly, the Gnome library
does, right?  So this initialization should be done in the Gnome
library.  It should be transparent to Vim.

I really dislike adding things to the main() function for some optional
library.  Each library should take care of its own initializations.
Otherwise we get a long list of things that have nothing to do with Vim.

But if the Gnome library refuses to do this, then we'll probably have to
do it in Vim anyway...

- Bram

-- 
ROBIN:  The what?
ARTHUR: The Holy Hand Grenade of Antioch.  'Tis one of the sacred relics
        Brother Maynard always carries with him.
ALL:    Yes. Of course.
ARTHUR: (shouting) Bring up the Holy Hand Grenade!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram at 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    ///



More information about the pkg-vim-maintainers mailing list