FS#39676 - [vlc] vlc_cache_gen segfaults
Attached to Project:
Arch Linux
Opened by McLenin (McLenin) - Saturday, 29 March 2014, 14:14 GMT
Last edited by Jan de Groot (JGC) - Monday, 08 September 2014, 19:28 GMT
Opened by McLenin (McLenin) - Saturday, 29 March 2014, 14:14 GMT
Last edited by Jan de Groot (JGC) - Monday, 08 September 2014, 19:28 GMT
|
Details
Description:
The same buf was reported in https://bbs.archlinux.org/viewtopic.php?pid=1395040 When upgrading I got the error [ALPM-SCRIPTLET] /tmp/alpm_i6DWYp/.INSTALL: line 1: 8271 Segmentation fault (core dumped) usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugin VLC was installed but not working returning the error: [0x1ccf058] main libvlc warning: cannot read /usr/lib/vlc/plugins/plugins.dat (No such file or directory) As reported in the forum post, removing /usr/lib/vlc/plugin/codec/libkate_plugin.so and manually running usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugin fixed the error. Additional info: * 2.1.4-2 * config and/or log files etc. Steps to reproduce: For me just trying to install the file gave the error and a non working VLC |
This task depends upon
This seems to be a reoccurring pain in the arse with a complicated cause: http://forums.gentoo.org/viewtopic-t-966108.html https://bbs.archlinux.org/viewtopic.php?pid=1269782
There's even more information in here: https://bugs.gentoo.org/show_bug.cgi?id=405173 with a patch at the end that seems to resolve the issue: https://bugzilla.gnome.org/show_bug.cgi?id=707298
I suggest changing the severity to at least medium, as it renders vlc completely unusable.
Workaround to fix installation:
# export LD_PRELOAD=/usr/lib/libgobject-2.0.so.0
# pacman -S vlc
Similar workaround for running vlc:
$ export LD_PRELOAD=/usr/lib/libgobject-2.0.so.0
$ vlc
If you want a permanent solution, here's a patch against the current glib2 in ABS: http://pastebin.com/raw.php?i=V2PRySkY
export LD_PRELOAD=/usr/lib/libgobject-2.0.so.0
on /etc/environment
Logout, and done! VLC is ON.
The problem should be described in the links I have posted: VLC tries to unload GLib but GLib doesn't support it, eventually leading to a failure such as this one. Patching GLib so that it can't be unloaded resolves the issue.
To make vlc-cache-gen segfault, run it as root, as it is supposed to be run.
sudo LD_PRELOAD=/usr/lib/libgobject-2.0.so.0 pacman -S vlc
On my system this seems to install a perfectly working version of vlc, which doesn't segfaultson install and doesn't require preloads to run. If some other users would be willing to test it out and it is proven to work, such a solution could probably be patched into the package.
I use the workaround but now vlc has a problem about the resampler audio, it seems that vlc-cache-gen didn't do his job despite the workaround,
see the bug
FS#41414and this thread :https://bbs.archlinux.org/viewtopic.php?pid=1442284
my mistake was to split the workaround in 2 lines :
export LD_PRELOAD=/usr/lib/libgobject-2.0.so.0
pacman -S vlc
this method will trigger a bug in vlc-cache-gen, the plugin.dat file will be generated in a wrong way,
the solution is to type in one line without exporting LD_PRELOAD :
LD_PRELOAD=/usr/lib/libgobject-2.0.so.0 pacman -S vlc
another solution :
LD_PRELOAD=/usr/lib/libgobject-2.0.so.0 /usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins
now all is ok
and deleting manualy the file /usr/lib/vlc/plugins/plugins.dat and then regnerate it with vlc-cache-gen is more secure,
because the problem is that sometimes vlc-cache-gen generates a corrupt or incorrect plugins.dat file, even if we use the LD_PRELOAD workaround, vlc will work ( no segfault ) but some plugins will not be in the cache file ( plugins.dat ),
in my case I had to delete manualy the file /usr/lib/vlc/plugins/plugins.dat and then regenerate a new plugins.dat file,
if I don't delete the plugins.dat file then vlc-cache-gen still generates an incomplete plugins.dat file