Bug 118364

Summary: crash when seek movie
Product: [Applications] kaffeine Reporter: Kamil Pawłowski <kamilpe>
Component: generalAssignee: Christophe Thommeret <hftom>
Status: RESOLVED NOT A BUG    
Severity: crash CC: ana, bluedzins, fabo
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kamil Pawłowski 2005-12-15 05:45:11 UTC
Version:           0.7.1 (using KDE KDE 3.4.3)
Installed from:    Fedora RPMs
Compiler:          gcc version 4.0.2 20051125 (Red Hat 4.0.2-8) 
OS:                Linux

I used Kaffeine with Xine engine. When I seeking movie (3 - 10 clicks on seek bar) kaffeine gui crash but xine engine still working

i can only do "killall kaffeine" and re-run to continue watch movie (subtitles crash too)

this problem doesn't exist with music files only with video files.
Comment 1 Krzysztof Krawczyk 2005-12-15 09:55:44 UTC
I have the same effect on Mandriva 2006, even after upgrading Kaffeine from Cooker.
Comment 2 Fathi Boudra 2006-05-24 16:11:52 UTC
This is a forwarded bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=350224
Comment 3 Fathi Boudra 2006-05-24 16:13:25 UTC
Package: kaffeine
Version: 0.7.1-1.3+b1

While playing some movies (in example dvix) via kaffeine with xine
engine, the kaffeine sort of hangs after rewinding movie a bit around,
the movie continiue to play, user can move even the window around,
although kaffeine UI do not accept any commends (one can NOT stop movei,
rewind, pause, or even close the program normally - have to kill it)
Comment 4 Fathi Boudra 2006-05-24 16:16:42 UTC
i reproduced in 0.8.1, i found also 2 related bugs on sf bts:
http://sourceforge.net/tracker/index.php?func=detail&aid=1389188&group_id=86937&atid=581406
http://sourceforge.net/tracker/index.php?func=detail&aid=1210353&group_id=86937&atid=581406

ps: sorry for the 3 comments
Comment 5 Tomasz Chmielewski 2006-06-05 01:08:04 UTC
I can confirm it, the issue exists in Kaffeine since at least 0.4x releases.
Comment 6 Johannes E. Krause 2006-08-16 18:20:23 UTC
i have the same problem, sometimes, when moving around in the video, kaffeine does not accept input anymore, and subtitles do not appear, but the video still plays back, the problem solves itself when the video is finished
Comment 7 Johannes E. Krause 2006-08-16 18:20:48 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Noam Raphael 2006-11-24 12:34:42 UTC
Also happens in 0.8.2, ubuntu edgy.
Comment 9 Jakub Nawalaniec 2006-11-24 12:37:08 UTC
Somebody fix this please! It makes watching movies a real pain! :)
Comment 10 Stefan Monov 2006-11-28 23:03:20 UTC
The bug appears to be fixed in 0.8.3. Can somebody confirm?
Comment 11 Thomas McGuire 2006-11-29 18:08:01 UTC
I can still reproduce it with 0.83, it hangs only with subtitles turned on.
Since 2 reporters mentioned subtitles here, I will mark bug #130905 as a duplicate of this.
Comment 12 Thomas McGuire 2006-11-29 18:08:26 UTC
*** Bug 130905 has been marked as a duplicate of this bug. ***
Comment 13 Christoph Pfister 2007-05-25 16:13:16 UTC
which xine-lib version are you using? there was an important bug fix in 1.1.3 with regard to subtitles & seeking ...
Comment 14 Maciej Pilichowski 2007-05-25 19:16:18 UTC
I am somewhere among the duplicates -- I experienced the same bug before, but I didn't see it for a looong time. The only crash I see is with embedded Kaffeine, but it is already another report for it.
Comment 15 Thomas McGuire 2007-05-25 20:34:36 UTC
I still see this bug.
I am using Kubuntu 7.04, which has libxine1 1.1.4-2, kaffeine-xine 0.8.3-0 and Kaffeine 0.8.3-0.

I can reproduce this every time I watch a movie with subtitles and use the seek function.

Actually, now the UI only freezes for a few secondes (~15), then continues to work normally.
Comment 16 Maciej Pilichowski 2007-05-25 20:54:06 UTC
> I still see this bug. 
> I am using Kubuntu 7.04, which has libxine1 1.1.4-2, kaffeine-xine 0.8.3-0
> and Kaffeine 0.8.3-0. 

a) please update your system -- libxine1 1.1.6, kaffeine 0.8.4 here, maybe that makes a difference (but I doubt it)
b) just for be sure -- by "seek" you mean for example clicking on slider, or pressing left/right?
Comment 17 Christoph Pfister 2007-05-25 21:14:18 UTC
please run kaffeine in gdb:
type "gdb --args kaffeine --nofork", then "run"
do the necessary steps to reproduce the hang
press ctrl+c
type "thread apply all bt" and attach the output here :-)
Comment 18 Christoph Pfister 2007-05-25 21:15:31 UTC
and oh - you could try if you get the same behaviour with other xine-lib frontends like xine-ui or gxine ...
Comment 19 Thomas McGuire 2007-05-27 23:34:36 UTC
I can still reproduce it with xine 1.1.6
It does not matter if I seek using the slider or by using the arrow keys.
gxine has the same problem.
xine-ui does not have the problem.

Backtrace:

Thread 12 (Thread -1391789168 (LWP 28441)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb65285c6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5b9e22c in buffer_pool_alloc (this=0x8b66128) at buffer.c:93
#3  0xaee3e6e1 in demux_sputext_send_chunk (this_gen=0x8ba0328) at demux_sputext.c:1264
#4  0xb5bb1f91 in demux_loop (stream_gen=0x8b65360) at demux.c:285
#5  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#6  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 11 (Thread -1376781424 (LWP 28440)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb65285c6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5b9e22c in buffer_pool_alloc (this=0x8b11840) at buffer.c:93
#3  0xaeee5941 in demux_avi_next (this=0x8bafd80, decoder_flags=0) at demux_avi.c:1556
#4  0xaeee9164 in demux_avi_send_chunk (this_gen=0x8bafd80) at demux_avi.c:1832
#5  0xb5bb1f91 in demux_loop (stream_gen=0x8afec48) at demux.c:285
#6  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 10 (Thread -1351644272 (LWP 28439)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb652b986 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0xb5bc261a in xine_usec_sleep (usec=495000) at utils.c:443
#3  0xb5ba3cf7 in _x_spu_decoder_sleep (stream=0x8b65360, next_spu_vpts=8356848) at video_decoder.c:84
#4  0xb574eb03 in spudec_decode_data (this_gen=0xadf1c280, buf=0x8b757b8) at xine_sputext_decoder.c:784
#5  0xb5ba43c8 in video_decoder_loop (stream_gen=0x8b65360) at video_decoder.c:448
#6  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 9 (Thread -1339110512 (LWP 28438)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb65285c6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5bad970 in xine_event_wait (queue=0x8b2fac0) at events.c:59
#3  0xb5bad9fc in listener_loop (queue_gen=0x8b2fac0) at events.c:217
#4  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 8 (Thread -1330517104 (LWP 28437)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb652884c in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5ba9360 in fifo_remove_int (fifo=0x89bdb80, blocking=0) at audio_out.c:355
#3  0xb5ba93de in ao_get_buffer (this_gen=0x899f4a8) at audio_out.c:397
#4  0xae91ce39 in mad_decode_data (this_gen=0x8bda540, buf=0x8b17c18) at xine_mad_decoder.c:254
#5  0xb5ba5408 in audio_decoder_loop (stream_gen=0x8afec48) at audio_decoder.c:361
#6  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 7 (Thread -1320236144 (LWP 28436)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb652884c in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5ba5b81 in vo_remove_from_img_buf_queue_int (queue=0x8579188, blocking=0, width=576, height=320, ratio=0, format=842094169,
    flags=3) at video_out.c:245
#3  0xb5ba5dc6 in vo_get_frame (this_gen=0x8578ee0, width=576, height=320, ratio=0, format=842094169, flags=3) at video_out.c:290
#4  0xb5bb6256 in post_video_get_frame (port_gen=0x8b3ede8, width=576, height=320, ratio=0, format=842094169, flags=3) at post.c:74
#5  0xb5765387 in ff_decode_data (this_gen=0x8bb9798, buf=0x8b023a8) at ff_video_decoder.c:1245
#6  0xb5ba4072 in video_decoder_loop (stream_gen=0x8afec48) at video_decoder.c:375
#7  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 6 (Thread -1307743344 (LWP 28435)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb6350893 in poll () from /lib/tls/i686/cmov/libc.so.6
#2  0xb5af1594 in snd_pcm_wait_nocheck () from /usr/lib/libasound.so.2
#3  0xb5af177f in snd_pcm_wait () from /usr/lib/libasound.so.2
#4  0xb28dd971 in ao_alsa_write (this_gen=0x8986d00, data=0x8abe940, count=1254) at audio_alsa_out.c:787
#5  0xb5bac60f in ao_loop (this_gen=0x899f4a8) at audio_out.c:1207
#6  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 5 (Thread -1299350640 (LWP 28434)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb6350893 in poll () from /lib/tls/i686/cmov/libc.so.6
#2  0xb28dd2af in ao_alsa_handle_event_thread (data=0x8986d00) at audio_alsa_out.c:151
#3  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 4 (Thread -1290921072 (LWP 28433)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb652b986 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5bc261a in xine_usec_sleep (usec=20000) at utils.c:443
#3  0xb5ba8015 in video_out_loop (this_gen=0x8578ee0) at video_out.c:1221
#4  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread -1270051952 (LWP 28432)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb65285c6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb4ee399a in render_run (this=0x84ef8a0) at video_out_opengl.c:1031
#3  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1250993264 (LWP 28431)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb652884c in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5b9aa6f in metronom_sync_loop (this=0x84ec950) at metronom.c:873
#3  0xb652431b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb635a57e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1239045488 (LWP 28427)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb652adae in __lll_mutex_lock_wait () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb6526aac in _L_mutex_lock_51 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xb652649d in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb5b96908 in xine_play (stream=0x8b65360, start_pos=21391, start_time=0) at xine.c:1201
#5  0xb5b96b19 in xine_play (stream=0x8afec48, start_pos=21391, start_time=0) at xine.c:1282
#6  0xb5c23d1b in KXineWidget::slotSeekToPosition () from /usr/lib/kde3/libxinepart.so
#7  0xb5c293eb in KXineWidget::qt_invoke () from /usr/lib/kde3/libxinepart.so
#8  0xb6aef9b8 in QObject::activate_signal (this=0x840fb98, clist=0x8410248, o=0xbff26ab8) at kernel/qobject.cpp:2380
#9  0xb6af01a2 in QObject::activate_signal (this=0x840fb98, signal=4, param=21391) at kernel/qobject.cpp:2449
#10 0xb6e9ab70 in QSlider::sliderMoved (this=0x840fb98, t0=21391) at .moc/debug-shared-mt/moc_qslider.cpp:152
#11 0xb6c2bac9 in QSlider::moveSlider (this=0x840fb98, pos=220) at widgets/qslider.cpp:571
#12 0xb6c2c1ef in QSlider::mouseMoveEvent (this=0x840fb98, e=0xbff26ff0) at widgets/qslider.cpp:502
#13 0xb6b265e3 in QWidget::event (this=0x840fb98, e=0xbff26ff0) at kernel/qwidget.cpp:4683
#14 0xb6a86a60 in QApplication::internalNotify (this=0xbff27570, receiver=0x840fb98, e=0xbff26ff0) at kernel/qapplication.cpp:2635
#15 0xb6a88c1e in QApplication::notify (this=0xbff27570, receiver=0x840fb98, e=0xbff26ff0) at kernel/qapplication.cpp:2421
#16 0xb724ac32 in KApplication::notify () from /usr/lib/libkdecore.so.4
#17 0xb6a1925d in QApplication::sendSpontaneousEvent (receiver=0x840fb98, event=0xbff26ff0) at kernel/qapplication.h:523
#18 0xb6a17ec2 in QETWidget::translateMouseEvent (this=0x840fb98, event=0xbff27448) at kernel/qapplication_x11.cpp:4303
#19 0xb6a15fac in QApplication::x11ProcessEvent (this=0xbff27570, event=0xbff27448) at kernel/qapplication_x11.cpp:3480
#20 0xb6a2d180 in QEventLoop::processEvents (this=0x81d0e50, flags=4) at kernel/qeventloop_x11.cpp:192
#21 0xb6aa1136 in QEventLoop::enterLoop (this=0x81d0e50) at kernel/qeventloop.cpp:198
#22 0xb6aa0f46 in QEventLoop::exec (this=0x81d0e50) at kernel/qeventloop.cpp:145
#23 0xb6a88609 in QApplication::exec (this=0xbff27570) at kernel/qapplication.cpp:2758
#24 0x08073faa in ?? ()
#25 0xb62a0ebc in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#26 0x08073b71 in ?? ()

Comment 20 Christoph Pfister 2007-05-28 17:58:56 UTC
>I can still reproduce it with xine 1.1.6
>It does not matter if I seek using the slider or by using the arrow keys.
>gxine has the same problem.
>xine-ui does not have the problem.

Okay - so the issue is in xine-lib :)

>Thread 1 (Thread -1239045488 (LWP 28427)):
<snip>
>#3  0xb652649d in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
>#4  0xb5b96908 in xine_play (stream=0x8b65360, start_pos=21391, start_time=0) at xine.c:1201
<snip>

xine.c:1201 is "pthread_mutex_lock( &stream->demux_lock );" (although I don't know which version you're using I'm pretty sure)

>Thread 12 (Thread -1391789168 (LWP 28441)):
<snip>
>#4  0xb5bb1f91 in demux_loop (stream_gen=0x8b65360) at demux.c:285
<snip>

demux.c:285 is "status = stream->demux_plugin->send_chunk(stream->demux_plugin);" - the problem occurs when this call blocks (because demux_lock is held) ...

I don't know the cause why it hangs for you - but kaffeine can't do anything against it ...
Comment 21 Thomas McGuire 2007-05-28 18:41:18 UTC
> >gxine has the same problem.
> >xine-ui does not have the problem.
>
> Okay - so the issue is in xine-lib :)

But xine-ui works. Isn't that just a normal client to xine-lib?

> >#3  0xb652649d in pthread_mutex_lock () from
> > /lib/tls/i686/cmov/libpthread.so.0 #4  0xb5b96908 in xine_play
> > (stream=0x8b65360, start_pos=21391, start_time=0) at xine.c:1201
> xine.c:1201 is "pthread_mutex_lock( &stream->demux_lock );" (although I
> don't know which version you're using I'm pretty sure)

That is correct.

> I don't know the cause why it hangs for you - but kaffeine can't do
> anything against it ...

Probably not :(
Comment 22 Christophe Thommeret 2007-05-28 19:52:28 UTC
> But xine-ui works. Isn't that just a normal client to xine-lib? 
xine-ui seeks in a different thread so it may be harder to reproduce the bug, but sooner or later you'll face it.
 
Comment 23 Christoph Pfister 2007-06-15 23:00:23 UTC
closing this because the bug is in xine-lib (same behaviour with gxine)
Comment 24 Thomas McGuire 2007-06-24 14:23:42 UTC
FYI: I found an old bug report for xine about the very same problem, see https://sourceforge.net/tracker/?func=detail&atid=109655&aid=1164531&group_id=9655