GNOME Bugzilla – Bug 571409
vlc segfaults at startup
Last modified: 2009-02-21 09:16:56 UTC
This bug was originally reported here:
On Mandriva Cooker, vlc 0.9.8a crashes on startup with libxml2 2.7.3. This happens only if the xml file ~/.local/share/vlc/ml.xspf exists. It is loaded on startup.
The crash disappears after downgrading libxml2 to 2.7.2.
Created attachment 128533 [details]
vlc backtrace from gdb
Created attachment 128534 [details]
XML playlist file from vlc
Sorry, I can't find anything related to libxml2 in the stack trace,
none of the threads involved at crash time have any code in libxml2
or called from libxml2.
The XML itself is trivial libxml2 2.7.3 can parse it in all modes
without any trouble and nobody else reported anything similar though
2.7.3 has been pushed to the current Fedora versions. So I have really
no idea what is happening with vlc there, but I have no way to link this
to libxml2 myself. I will need more info to correlate the crash you're
seeing ans any libxml2 code change between the two versions.
What more info do you need? It simply does work fine with libxml2 2.7.2. Please test it yourself.
No, sorry that's not the way. Fred Crozat looked and it's vlc which is
at fault calling xmlParserCleanup while Qt is using it too apparently.
Problem is in vlc code !
after analysis of this bug with Daniel over irc, it appears vlc code is broken, calling xmlCleanupThreads while libxml2 might be used by another thread (ie Qt4) at the same time, and recent changes in libxml threads.c highlighed the issue.
closing this bug as NOTGNOME, I've opened a bug on vlc bug database : https://trac.videolan.org/vlc/ticket/2541
I added the following comment to the pair of functions raised in this
analysis to make the problem even more explicit than with current documentation
* WARNING: if your application is multithreaded or has plugin support
* calling this may crash the application if another thread or
* a plugin is still using libxml2. It's sometimes very hard to
* guess if libxml2 is in use in the application, some libraries
* or plugins may use it without notice. In case of doubt abstain
* from calling this function or do it just before calling exit()
* to avoid leak reports from valgrind !