How to fix VLC crash on startup in Gutsy

IN Ubuntu Gutsy, when I tried to run the VLC it would crash (segfault) complaining of  “double free or corruption” in g_slice_alloc().

The problem is actually in the underlying WxGTK library that VLC uses for the user interface. It was a bug that didn’t cause any problems until some non-standard memory allocation function was fixed in glib and exposed the mis-use of this function in some applications. It also affects WxGlade and even the Gimp apparently.

Anyway, it’s dead easy to fix. Put the following in your environment:



to /etc/environment or

export G_SLICE=always-malloc
to ~/.bash_profile and/or ~/.gnomerc.