[vlc-devel] vlc locks up intermittantly (Verified)

Tony Anecito adanecito at yahoo.com
Mon Jun 25 16:19:19 CEST 2007


Hi Pierre,
   
  I verified on another system last night that there is a sync issue between adding a item to the playlist and the play function. Again I added some print statements between playlist.add() and playlist.play() and the vlc lockup went away. This has probably not seen before by the vlc team because of the unique situation of using java and the window peer being removed in an MDI type interface which requires the add/play programmatic need for when a window that is playing a video is selected.
  Tonight I will put a delay in the code other than using print statements.
   
  As far as I know the creation of mutiple videos playing in a single application seems to work for me despite the java jre/heavyweight issues. My hat's off to the vlc team for making the multiple instances available. I am hoping in the next week or less to have a new beta of MyUniPortal with vlc integrated available.
   
  Regards,
  Tony Anecito
  Founder,
  MyUniPortal
  http://www.myuniportal.com
  

Tony Anecito <adanecito at yahoo.com> wrote:
    Thanks Pierre,
   
  I am not a gcc/gdb expert just a simple java developer trying to integrate jvlc into a project of mine.
  I have been able to compile vlc and am willing to add/modify my local copy of vlc source (dated 6/10) to help pin down the root cause and will try to understand half of what you say.
  So go and suggest and I will try to work on it today after I finish my projects around the house and full time tonight when I can.
   
  Regards,
  -Tony Anecito

Pierre d'Herbemont <pdherbemont at free.fr> wrote:
  Err, I was of course speaking of gdb and not gcc.

Pierre.

On 24 juin 07, at 16:09, Pierre d'Herbemont wrote:

> 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 
> $ 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 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
>
> _______________________________________________
> vlc-devel mailing list
> vlc-devel at videolan.org
> http://mailman.videolan.org/listinfo/vlc-devel
>

_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel

    
---------------------------------
  Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. _______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


  
---------------------------------
Looking for earth-friendly autos? 
 Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/d4950f29/attachment.html>
-------------- next part --------------
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list