Bug 329121 - KsCD crashes when skip is pressed before play
Summary: KsCD crashes when skip is pressed before play
Status: RESOLVED FIXED
Alias: None
Product: phonon-backend-vlc
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 0.7.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: 0.7
Assignee: Harald Sitter
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2013-12-22 13:12 UTC by Erica Jones
Modified: 2013-12-23 08:43 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.7.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erica Jones 2013-12-22 13:12:13 UTC
Application: kscd (1.5)
KDE Platform Version: 4.12.0
Qt Version: 4.8.5
Operating System: Linux 3.12.6-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:

I opened KsCD from the Available Devices menu (as an option for an inserted optical disk) in the notification bar and clicked the skip right button before interacting with any other part of the application.  The application crashes right as I click skip right.

The crash can be reproduced every time.

-- Backtrace:
Application: KsCD (kscd), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0c2b0a4800 (LWP 9396))]

Thread 2 (Thread 0x7f0c14d2d700 (LWP 9397)):
#0  0x00007fff59d5b933 in ?? ()
#1  0x00007f0c286f9a30 in ?? () from /usr/lib/libQtCore.so.4
#2  0x0000000027993f00 in ?? ()
#3  0x00007f0c10002860 in ?? ()
#4  0x00007f0c14d2cbe8 in ?? ()
#5  0x00007f0c14d2cb80 in ?? ()
#6  0x000000007fffffff in ?? ()
#7  0x00007f0c14d2cbf0 in ?? ()
#8  0x00007f0c27a7d02d in clock_gettime () from /usr/lib/libc.so.6
#9  0x00007f0c28621507 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f0c286fb1a5 in ?? () from /usr/lib/libQtCore.so.4
#11 0x00007f0c286f997c in ?? () from /usr/lib/libQtCore.so.4
#12 0x00007f0c286f9a25 in ?? () from /usr/lib/libQtCore.so.4
#13 0x00007f0c24bb1c2d in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#14 0x00007f0c24bb24a3 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00007f0c24bb268c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#16 0x00007f0c286f9b46 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#17 0x00007f0c286cbb1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#18 0x00007f0c286cbe15 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#19 0x00007f0c285ca6ef in QThread::exec() () from /usr/lib/libQtCore.so.4
#20 0x00007f0c286ad2c3 in ?? () from /usr/lib/libQtCore.so.4
#21 0x00007f0c285ccd8f in ?? () from /usr/lib/libQtCore.so.4
#22 0x00007f0c25d410a2 in start_thread () from /usr/lib/libpthread.so.0
#23 0x00007f0c27a703dd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f0c2b0a4800 (LWP 9396)):
[KCrash Handler]
#5  0x00007f0c1578a572 in libvlc_media_add_option_flag () from /usr/lib/libvlc.so.5
#6  0x00007f0c15cc557a in Phonon::VLC::Media::addOption (this=this@entry=0x347c95a, option=...) at /tmp/yaourt-tmp-erica/abs-phonon-vlc/src/phonon-backend-vlc-0.7.1/src/media.cpp:63
#7  0x00007f0c15cc5c8b in Phonon::VLC::Media::addOption (this=this@entry=0x347c95a, option=..., argument=...) at /tmp/yaourt-tmp-erica/abs-phonon-vlc/src/phonon-backend-vlc-0.7.1/src/media.h:46
#8  0x00007f0c15cc5a34 in Phonon::VLC::Media::setCdTrack (this=0x347c95a, track=track@entry=2) at /tmp/yaourt-tmp-erica/abs-phonon-vlc/src/phonon-backend-vlc-0.7.1/src/media.cpp:103
#9  0x00007f0c15ccf10f in Phonon::VLC::MediaPlayer::setCdTrack (this=0x347c940, track=2) at /tmp/yaourt-tmp-erica/abs-phonon-vlc/src/phonon-backend-vlc-0.7.1/src/mediaplayer.cpp:336
#10 0x00007f0c15cc7244 in Phonon::VLC::MediaController::setCurrentTitle (this=this@entry=0x3564b18, title=2) at /tmp/yaourt-tmp-erica/abs-phonon-vlc/src/phonon-backend-vlc-0.7.1/src/mediacontroller.cpp:397
#11 0x00007f0c15cc782f in Phonon::VLC::MediaController::interfaceCall (this=this@entry=0x3564b18, iface=iface@entry=Phonon::AddonInterface::TitleInterface, i_command=i_command@entry=2, arguments=...) at /tmp/yaourt-tmp-erica/abs-phonon-vlc/src/phonon-backend-vlc-0.7.1/src/mediacontroller.cpp:114
#12 0x00007f0c2a31efe5 in Phonon::MediaController::setCurrentTitle (this=<optimized out>, titleNumber=2) at /tmp/yaourt-tmp-erica/abs-phonon-qt4/src/phonon-4.7.1/phonon/mediacontroller.cpp:210
#13 0x00007f0c2a31f025 in Phonon::MediaController::nextTitle (this=<optimized out>) at /tmp/yaourt-tmp-erica/abs-phonon-qt4/src/phonon-4.7.1/phonon/mediacontroller.cpp:229
#14 0x0000000000417995 in HWControler::nextTrack (this=0x345b950) at /tmp/yaourt-tmp-erica/abs-kdemultimedia-kscd/src/kscd-4.12.0/hwcontroler.cpp:159
#15 0x000000000041451c in KSCD::actionButton (this=0x27c9be0, name=...) at /tmp/yaourt-tmp-erica/abs-kdemultimedia-kscd/src/kscd-4.12.0/kscd.cpp:565
#16 0x00007f0c286e0b48 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#17 0x0000000000410260 in KscdWindow::actionClicked (this=<optimized out>, _t1=...) at /tmp/yaourt-tmp-erica/abs-kdemultimedia-kscd/src/build/moc_kscdwindow.cpp:131
#18 0x00007f0c286e0b48 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#19 0x000000000040fb33 in KscdWidget::buttonClicked (this=this@entry=0x29e5370, _t1=...) at /tmp/yaourt-tmp-erica/abs-kdemultimedia-kscd/src/build/moc_kscdwidget.cpp:114
#20 0x000000000041d684 in KscdWidget::mouseReleaseEvent (this=0x29e5370, event=<optimized out>) at /tmp/yaourt-tmp-erica/abs-kdemultimedia-kscd/src/kscd-4.12.0/gui/kscdwidget.cpp:151
#21 0x00007f0c2939662e in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f0c293470dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007f0c2934d7dd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00007f0c2aaa992a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#25 0x00007f0c286ccebd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#26 0x00007f0c2934cf93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#27 0x00007f0c293bebab in ?? () from /usr/lib/libQtGui.so.4
#28 0x00007f0c293bd61c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#29 0x00007f0c293e4162 in ?? () from /usr/lib/libQtGui.so.4
#30 0x00007f0c24bb2296 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0x00007f0c24bb25e8 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0x00007f0c24bb268c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0x00007f0c286f9b25 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0x00007f0c293e4216 in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007f0c286cbb1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007f0c286cbe15 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#37 0x00007f0c286d0f4b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#38 0x000000000040e9e2 in main (argc=<optimized out>, argv=0x7fff59cb09e8) at /tmp/yaourt-tmp-erica/abs-kdemultimedia-kscd/src/kscd-4.12.0/kscd.cpp:905

Reported using DrKonqi
Comment 1 Harald Sitter 2013-12-23 08:40:08 UTC
Git commit 20f27ab99b68cf25408488cd9578603a5a7805d1 by Harald Sitter.
Committed on 23/12/2013 at 08:31.
Pushed by sitter into branch '0.7'.

init and reset m_media variables to 0

this ensures obvious backtraces when running into unintended code paths.

M  +3    -1    src/media.cpp
M  +1    -0    src/mediaplayer.cpp

http://commits.kde.org/phonon-vlc/20f27ab99b68cf25408488cd9578603a5a7805d1
Comment 2 Harald Sitter 2013-12-23 08:40:08 UTC
Git commit 01d7ad7dce3f3c596642ab0b6b74dd8a2826f3fe by Harald Sitter.
Committed on 23/12/2013 at 08:38.
Pushed by sitter into branch '0.7'.

protect MediaPlayer::setCdTrack against bogus m_media accesses

this *probably* caused a crash when trying to set a track on a newly
created MO. m_media up until now was not initialized to 0 so it is
possible that setCdTrack was run on an invalid Media object.
outside this init case there is no point where either m_media or the
underlying vlc media would silently get a bogus value (see MP::setMedia,
Media::Media).
FIXED-IN: 0.7.2

M  +2    -0    src/mediaplayer.cpp

http://commits.kde.org/phonon-vlc/01d7ad7dce3f3c596642ab0b6b74dd8a2826f3fe