[vlc-devel] vlc locks up intermittantly

Pierre d'Herbemont pdherbemont at free.fr
Sun Jun 24 16:09:16 CEST 2007


Hello Tony,

Could you backtrace the different thread using gcc [1]. There are  
some part of the libvlc's playlist code that are not really thread  
safe (for instance [2]). And some other that may be the source of  
your dead lock [3]. But a backtrace would certainly help more.

Pierre.

[1]
$ gcc attach <your process>
$ thread 1
$ bt
$ thread 2
$ bt
...

[2] control/playlist.c:70

         if (! playlist_was_locked( p_instance ) )
         {
             playlist_mark_locked( p_instance, 1 );
             vlc_mutex_lock( &PL->object_lock );
             did_lock = 1;
         }

Here we could mark_locked and already locked instance. Hence this is  
really not thread safe.

[3]
         p_item = playlist_ItemGetByInputId( PL, i_id,
                                             PL->status.p_node );
         if( !p_item )
         {
             if( did_lock == 1 )
             {
                 vlc_mutex_unlock( &PL->object_lock );
                 playlist_mark_locked( p_instance, 0 );
             }
             RAISEVOID( "Unable to find item" );
         }
Here we could simply forget to unlock the PL object. But you should  
get an exception though.


On 24 juin 07, at 12:02, Tony Anecito wrote:

> After some more testing I noticed that when using -vvv I get a  
> debug message about adding to the playlist after I tried to play  
> the video. This happens with either files from the disk or  
> streaming videos. I am wondering if it is possible that there is a  
> race condition in vlc when calling playlist.add() then playlist.play 
> () in code. It seemed the error was less of a problem after I added  
> some print statements between the add then play function calls.
>
> Regards,
> -Tony
>
> Tony Anecito <adanecito at yahoo.com> wrote:
> Hi All,
>
> I am testing running two child windows in jvlc bindings and I am  
> seeing interesting error  condition where if I continously switch  
> back and forth between child windows that are running videos (in  
> java I have to get a new vlc instance because the switching between  
> child windows causes the jre to destroy the window ie. peer to the  
> canvas) I eventually get a condition where after executing  
> playlist.play() several times the method does not seem to return  
> and blocks the redraws of the screen.
>
> I get this interesting warning when playlist.play() is executed and  
> never returns from the play method. I am using 0.9.0b from just  
> before the names were changing to media-center?
>
> Thanks for any help. -Tony
> [00001242] mp4 demuxer warning: elst old=0 new=1
>
>
> Pinpoint customers who are looking for what you sell.  
> _______________________________________________
> vlc-devel mailing list
> vlc-devel at videolan.org
> http://mailman.videolan.org/listinfo/vlc-devel
>
>
> Pinpoint customers who are looking for what you sell.
> _______________________________________________
> vlc-devel mailing list
> vlc-devel at videolan.org
> http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list