Okular crashed in presentation mode when loading a embedded video (beamer-latex) using multimedia package with the option autostart. It seems something, that the environment does not have time to load before the video is launched or something like that Reproducible: Always Steps to Reproduce: 1.Open Okular in presentation mode 2.Go to the slide with the embedded video 3. Actual Results: Crashing with the following output in the terminal: [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. okular: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed. okular: Fatal IO error 9 (Bad file descriptor) on X server :0.0. Expected Results: Play the embedded video
Please attach the needed files to reproduce this issue
Created attachment 85928 [details] Link to a tar.gz file containing the PDF and the video
It occurs that the same error can happen in non-autostart mode. However, this is not repeatable. I can sometimes open the presentation and play the video in normal mode. However, in presentation mode, when I start the video, the crash occurs. I also notice a strange behaviour in non-autostart. When go in presentation mode, it is possible to ear the sound of the video starting. Could it be a problem of the multimedia latex package more than okular?
Can you please run valgrind okular myfile.pdf in a terminal and attach the output?
Hi, Sorry for the delay. I have the prompt when loading the pdf file: ==16488== at 0x62DBD8A: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x62DBED8: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x62DEB07: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x62C2D60: QGtkStyle::QGtkStyle() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x624D570: QStyleFactory::create(QString const&) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5F60560: QApplication::style() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5F60954: QApplicationPrivate::initialize() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5F60A7F: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5F60E18: QApplication::QApplication(int&, char**, bool, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x596F547: KApplication::KApplication(bool) (in /usr/lib/libkdeui.so.5.13.0) Then once trying to lunch the video: (okular:16488): GStreamer-CRITICAL **: gst_sample_get_buffer: assertion 'GST_IS_SAMPLE (sample)' failed (okular:16488): GStreamer-CRITICAL **: gst_buffer_map_range: assertion 'GST_IS_BUFFER (buffer)' failed ** (okular:16488): CRITICAL **: gst_video_info_from_caps: assertion 'caps != NULL' failed ==16488== Thread 13 queue1:src: ==16488== Invalid read of size 8 ==16488== at 0x8A564E2: _XReply (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==16488== by 0x8A520CC: XSync (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==16488== by 0x294B862D: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/phonon_backend/phonon_gstreamer.so) ==16488== by 0x294B86F8: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/phonon_backend/phonon_gstreamer.so) ==16488== by 0x7098879: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6) ==16488== by 0x294AD69D: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/phonon_backend/phonon_gstreamer.so) ==16488== by 0xB79820F: g_cclosure_marshal_VOID__BOXEDv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0xB7955E6: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0xB7AE087: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0xB7AECE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0x297072B9: gst_bus_sync_signal_handler (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.203.0) ==16488== by 0x2970751A: gst_bus_post (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.203.0) ==16488== Address 0x2805eaf8 is 8 bytes inside a block of size 24 free'd ==16488== at 0x4C2B68C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16488== by 0x8A565C2: _XReply (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==16488== by 0x8A538E2: XTranslateCoordinates (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==16488== by 0x5FEC821: QWidgetPrivate::mapFromGlobal(QPoint const&) const (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5FEC87C: QWidget::mapFromGlobal(QPoint const&) const (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5F63667: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x596DBA9: KApplication::notify(QObject*, QEvent*) (in /usr/lib/libkdeui.so.5.13.0) ==16488== by 0x70844DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6) ==16488== by 0x5F62D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5FD79CA: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5FD6536: QApplication::x11ProcessEvent(_XEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== by 0x5FFEB01: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6) ==16488== [xcb] Unknown request in queue while dequeuing [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. okular: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed. okular: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0. KCrash: Application 'okular' crashing... KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit sock_file=/home/lemaitre/.kde/socket-lemaitre/kdeinit4__0 pa_write() failed while trying to wake up the mainloop: Bad file descriptor ==16488== Thread 17 queue0:src: ==16488== Invalid read of size 8 ==16488== at 0x7094D14: QObject::metaObject() const (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6) ==16488== by 0x7099993: QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6) ==16488== by 0x702A372: QTextStream::QTextStream(QIODevice*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6) ==16488== by 0x2949383B: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/phonon_backend/phonon_gstreamer.so) ==16488== by 0x294ADB1B: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/phonon_backend/phonon_gstreamer.so) ==16488== by 0xB79820F: g_cclosure_marshal_VOID__BOXEDv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0xB7955E6: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0xB7AE087: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0xB7AECE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0) ==16488== by 0x297072B9: gst_bus_sync_signal_handler (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.203.0) ==16488== by 0x2970751A: gst_bus_post (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.203.0) ==16488== by 0x29716927: ??? (in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.203.0) ==16488== Address 0x28 is not stack'd, malloc'd or (recently) free'd ==16488== Unable to start Dr. Konqi okular: Fatal IO error 9 (Bad file descriptor) on X server :0.0. QtDBus: cannot relay signals from parent QObject(0x1dc24990 "") unless they are emitted in the object's thread QThread(0xf0b2ab0 ""). Current thread is QThread(0x119f70f0 ""). Re-raising signal for Apport handling. Re-raising signal for Apport handling. ==16488== ==16488== HEAP SUMMARY: ==16488== in use at exit: 56,460,496 bytes in 166,000 blocks ==16488== total heap usage: 3,909,830 allocs, 3,743,830 frees, 756,746,059 bytes allocated ==16488== ==16488== LEAK SUMMARY: ==16488== definitely lost: 64,608 bytes in 122 blocks ==16488== indirectly lost: 1,060,895 bytes in 2,087 blocks ==16488== possibly lost: 29,746,555 bytes in 17,315 blocks ==16488== still reachable: 24,927,518 bytes in 144,593 blocks ==16488== suppressed: 0 bytes in 0 blocks ==16488== Rerun with --leak-check=full to see details of leaked memory ==16488== ==16488== For counts of detected and suppressed errors, rerun with: -v ==16488== Use --track-origins=yes to see where uninitialised values come from ==16488== ERROR SUMMARY: 59 errors from 39 contexts (suppressed: 6 from 6) Cheers,
Dan, any idea why this may be happening?
This is a phonon-gstreamer problem, reassigning. I can reproduce this very reliably with phonon-gst 4.7
Git commit 2cafb9db34ed1079eca22c913a48011b67ff9c70 by Dan Vrátil. Committed on 08/04/2014 at 17:46. Pushed by dvratil into branch '4.7'. Only call QApplication::syncX() from the main thread This fixes a regression introduced in 2db4c4. In order to pass WID to gstreamer synchronously, a Qt::DirectConnection between Pipeline signal and a VideoWidget slot must be created. However the signal from Pipeline can be emitted from an arbitrary thread, so we can't call QApplication::syncX() directly from the slot callchain. This patch moves the call to VideoWidget::syncX() slot that is called from X11Renderer via queued invocation to make sure it's always executed from the main thread. FIXED-IN: 4.7.3 Related: bug 327367, bug 305333 M +13 -0 gstreamer/videowidget.cpp M +1 -0 gstreamer/videowidget.h M +5 -14 gstreamer/x11renderer.cpp http://commits.kde.org/phonon-gstreamer/2cafb9db34ed1079eca22c913a48011b67ff9c70