[vlc-devel] [PATCH] -- solve skins2 crash at termination (libxml2 and libqt4 issues)

brezhoneg1 brezhoneg1 at yahoo.fr
Tue Feb 23 19:44:46 CET 2010


Hi,

   one more patch for comment, objection or trying to find a better
solution:


   skins2 is prone to crash at termination (though not always, and very
rarely when using gdb)

   Actually, the problems come from two libraries : libxml2 and libqt4.

   These two libraries spawn a thread that wakes up when their initiator
thread terminates.
   These threads are intended to do some final cleaning then terminate.

   The problem is that we may be trying to free the plugin dll
associated to them, while this 'cleanup'
   thread is still running, and that causes a crash. (pointed out by gdb
for both of them)

   Using 'linked_with_a_crap_library_which_uses_atexit()' is a solution
to the problem. Actually, it just
   defers freeing dlls at vlc termination. This does solve all skins2
problems (no more crashes).

   Any objection to apply this patch ?

   As a side note, concerning libxml2, another problem exists that makes
vlc bound to crash on Win32 
   if several threads are using xml concurrently. (xmlInitParser()
should be started in main thread
   at init of vlc, because of this 'cleanup' thread that wakes up when
its initiator thread terminates.
   if initiator is a child thread, global ressouces get freed while
another thread is using them ....)

Regards
Erwan10

   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Win32-use-linked_with_a_crap_library_which_uses_ate.patch
Type: application/octet-stream
Size: 1720 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100223/158507ac/attachment.obj>


More information about the vlc-devel mailing list