Ticket #1344 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

ShoutcastTV services discovery is broken

Reported by: funman Assigned to: pdherbemont
Priority: normal Milestone: 0.9.0-test1
Component: Services discovery Version: master
Severity: major Keywords:
Cc: Platform(s): all
Difficulty: hard Work status: Not started

Description

When using the ShoutcastTV, vlc sometimes crashes when opening an item

Could be a race condition.

The cause is an invalid pointer being given to input_ItemAddSubItem() OR the pointer can be valid, but the memory it points to have been freed in the meantime.

Anyway, this is not nice

Core was generated by `/home/fun/vlc/bin/vlc --no-media-library --album-art 0 --services-discovery=ShoutcastTV'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7d1b550 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
(gdb) bt
#0  0xb7d1b550 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#1  0xb7e0d546 in pthread_mutex_lock () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7f38488 in __vlc_object_lock (obj=0x20)
    at ../../trunk/include/vlc_threads_funcs.h:124
#3  0xb7eb7add in input_item_subitem_added (p_event=0xae54624c, 
    user_data=0x828ac30) at ../../trunk/src/playlist/item.c:53
#4  0xb7f33374 in vlc_event_send (p_em=0x828a960, p_event=0xae54624c)
    at ../../trunk/src/misc/events.c:197
#5  0xadc55378 in Demux (p_demux=0x85e56dc)
    at ../../../../trunk/include/vlc_input.h:164
#6  0xb7ed8570 in MainLoop (p_input=0x85bf434)
    at ../../trunk/src/input/input.c:595
#7  0xb7ed942c in Run (p_input=0x85bf434) at ../../trunk/src/input/input.c:499
#8  0xb7d1946b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb7e0073e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) 

#4 0xb7f33374 in vlc_event_send (p_em=0x828a960, p_event=0xae54624c)

at ../../trunk/src/misc/events.c:197

0xae54624c not being a valid pointer => crash

Change History

24/10/07 22:49:21 changed by trax

Shoutcast crash example presumably caused by the same problem (stray pointer). Tested on win32 against svn 22822 (24 oct). Reproducable in WX and QT4. Started with opening DVD with argument dvd://D:\ and as it plays do a shoutcast TV discovery. Start one of the discovered items and it crashes:

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 3896.0xd0c]
__vlc_object_lock (obj=0xabababab) at ../include/vlc_threads_funcs.h:96
96          if( p_mutex->mutex )
(gdb)
(gdb) bt
#0  __vlc_object_lock (obj=0xabababab) at ../include/vlc_threads_funcs.h:96
#1  0x6a31ba46 in input_item_subitem_added (p_event=0x6eefe48,
    user_data=0x4c42098) at playlist/item.c:53
#2  0x6a37ee7a in vlc_event_send (p_em=0x4c8bca4, p_event=0x6eefe48)
    at misc/events.c:197
#3  0x70243b14 in Demux (p_demux=0x4bef6d4)
    at ../../../include/vlc_input.h:164
#4  0x6a333568 in MainLoop (p_input=<incomplete type>) at input/input.c:596
#5  0x6a336f87 in Run (p_input=<incomplete type>) at input/input.c:500
#6  0x77c3a3b0 in msvcrt!_endthreadex ()
   from /cygdrive/c/WINDOWS/system32/msvcrt.dll
#7  0x04becdc4 in ?? ()
#8  0xffffffff in ?? ()
#9  0x7c926abe in ntdll!iswdigit ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
#10 0x04bf76f8 in ?? ()
#11 0x00000000 in ?? ()
(gdb) list
91      #elif defined( UNDER_CE )
92          EnterCriticalSection( &p_mutex->csection );
93          i_result = 0;
94
95      #elif defined( WIN32 )
96          if( p_mutex->mutex )
97          {
98              WaitForSingleObject( p_mutex->mutex, INFINITE );
99          }
100         else

12/11/07 14:36:10 changed by funman

  • status changed from new to closed.
  • resolution set to fixed.

(In [23035]) services_discovery_SetLocalizedName() is now mandatory. Fix #1344 upnp_intel module still has to be rewritten (it will crash at runtime)