Bug 381282 - Dragon crashes when opening a corrupt video file
Summary: Dragon crashes when opening a corrupt video file
Status: RESOLVED FIXED
Alias: None
Product: dragonplayer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-06-16 14:37 UTC by Fabian Köster
Modified: 2017-06-26 14:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The file causing the crash (1.00 MB, video/quicktime)
2017-06-16 14:39 UTC, Fabian Köster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Köster 2017-06-16 14:37:48 UTC
Application: dragon (16.12.3)
 (Compiled from sources)
Qt Version: 5.7.1
Frameworks Version: 5.34.0
Operating System: Linux 4.11.5-gentoo x86_64
Distribution: "Gentoo Base System release 2.3"

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

Tried to open a corrupt video file, see the following attachments.

The crash can be reproduced every time.

-- Backtrace:
Application: Dragon Player (dragon), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f4dfcabe840 (LWP 12236))]

Thread 4 (Thread 0x7f4dd7fff700 (LWP 12240)):
#0  0x00007f4df88db80d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f4df20f41b1 in read (__nbytes=10, __buf=0x7f4dd7ffebb0, __fd=13) at /usr/include/bits/unistd.h:44
#2  pa_read (fd=13, buf=buf@entry=0x7f4dd7ffebb0, count=count@entry=10, type=type@entry=0x8791f8) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulsecore/core-util.c:434
#3  0x00007f4df611272e in clear_wakeup (m=<optimized out>) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulse/mainloop.c:781
#4  pa_mainloop_prepare (m=m@entry=0x879120, timeout=-1) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulse/mainloop.c:789
#5  0x00007f4df61131a0 in pa_mainloop_iterate (m=0x879120, block=<optimized out>, retval=0x0) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulse/mainloop.c:923
#6  0x00007f4df6113260 in pa_mainloop_run (m=0x879120, retval=retval@entry=0x0) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulse/mainloop.c:944
#7  0x00007f4df6121499 in thread (userdata=0x87f830) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulse/thread-mainloop.c:100
#8  0x00007f4df2123bb8 in internal_thread_func (userdata=0x77c7f0) at /var/tmp/portage/media-sound/pulseaudio-10.0/work/pulseaudio-10.0/src/pulsecore/thread-posix.c:81
#9  0x00007f4df6989494 in start_thread (arg=0x7f4dd7fff700) at pthread_create.c:333
#10 0x00007f4df88e894d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f4de2f75700 (LWP 12238)):
#0  0x00007f4df88df84d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f4df41e180c in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f4ddc003020, timeout=-1, context=0x7f4ddc000990) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:4228
#2  g_main_context_iterate (context=context@entry=0x7f4ddc000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:3924
#3  0x00007f4df41e191c in g_main_context_iteration (context=0x7f4ddc000990, may_block=may_block@entry=1) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:3990
#4  0x00007f4df951ba5b in QEventDispatcherGlib::processEvents (this=0x7f4ddc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007f4df94cd5ca in QEventLoop::exec (this=this@entry=0x7f4de2f74d50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#6  0x00007f4df93320f4 in QThread::exec (this=this@entry=0x7f4dfcc75740 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507
#7  0x00007f4dfcc01695 in QDBusConnectionManager::run (this=0x7f4dfcc75740 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#8  0x00007f4df933635c in QThreadPrivate::start (arg=0x7f4dfcc75740 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#9  0x00007f4df6989494 in start_thread (arg=0x7f4de2f75700) at pthread_create.c:333
#10 0x00007f4df88e894d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f4de9a2d700 (LWP 12237)):
#0  0x00007f4df88df84d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f4df654e8f2 in poll (__timeout=-1, __nfds=1, __fds=0x7f4de9a2cc80) at /usr/include/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x67b990, cond=cond@entry=0x67b9d0, vector=vector@entry=0x0, count=count@entry=0x0) at /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_conn.c:479
#3  0x00007f4df65506df in xcb_wait_for_event (c=0x67b990) at /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_in.c:693
#4  0x00007f4deb963c79 in QXcbEventReader::run (this=0x686050) at qxcbconnection.cpp:1343
#5  0x00007f4df933635c in QThreadPrivate::start (arg=0x686050) at thread/qthread_unix.cpp:368
#6  0x00007f4df6989494 in start_thread (arg=0x7f4de9a2d700) at pthread_create.c:333
#7  0x00007f4df88e894d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f4dfcabe840 (LWP 12236)):
[KCrash Handler]
#6  QObject::parent (this=0x0) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:394
#7  QWidget::parentWidget (this=0x0) at ../../include/QtWidgets/../../src/widgets/kernel/qwidget.h:857
#8  QLayout::addChildWidget (this=this@entry=0x7b43a0, w=w@entry=0x0) at kernel/qlayout.cpp:902
#9  0x00007f4df9d2677c in QStackedLayout::insertWidget (this=0x7b43a0, index=3, widget=0x0) at kernel/qstackedlayout.cpp:223
#10 0x00007f4df9d26859 in QStackedLayout::addWidget (this=<optimized out>, widget=<optimized out>) at kernel/qstackedlayout.cpp:203
#11 0x00007f4df9e8c410 in QStackedWidget::addWidget (this=<optimized out>, widget=<optimized out>) at widgets/qstackedwidget.cpp:163
#12 0x000000000042e7f6 in Dragon::MainWindow::toggleLoadView (this=0x6de330) at /var/tmp/portage/kde-apps/dragon-16.12.3/work/dragon-16.12.3/src/app/mainWindow.cpp:439
#13 0x00007f4df94f4d92 in QtPrivate::QSlotObjectBase::call (a=0x7ffca4ec6f80, r=0x6de330, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#14 QMetaObject::activate (sender=sender@entry=0x7b9fc0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=11, argv=argv@entry=0x0) at kernel/qobject.cpp:3723
#15 0x00007f4df94f53d7 in QMetaObject::activate (sender=sender@entry=0x7b9fc0, m=m@entry=0x653880 <Dragon::VideoWindow::staticMetaObject>, local_signal_index=local_signal_index@entry=11, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#16 0x0000000000442353 in Dragon::VideoWindow::finished (this=0x7b9fc0) at /var/tmp/portage/kde-apps/dragon-16.12.3/work/dragon-16.12.3_build/src/app/dragon_automoc.dir/moc_videoWindow_KNGIJKFHZ4TKA4.cpp:461
#17 Dragon::VideoWindow::qt_static_metacall (_o=0x7b9fc0, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-apps/dragon-16.12.3/work/dragon-16.12.3_build/src/app/dragon_automoc.dir/moc_videoWindow_KNGIJKFHZ4TKA4.cpp:207
#18 0x00007f4df94f4a57 in QMetaObject::activate (sender=0x776fd0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=6, argv=argv@entry=0x0) at kernel/qobject.cpp:3740
#19 0x00007f4df94f53d7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f4dfa47d700 <Phonon::MediaObject::staticMetaObject>, local_signal_index=local_signal_index@entry=6, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#20 0x00007f4dfa23fa43 in Phonon::MediaObject::finished (this=<optimized out>) at /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/phonon/moc_mediaobject.cpp:437
#21 0x00007f4dfa242d95 in Phonon::MediaObject::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/media-libs/phonon-4.9.1-r1/work/phonon-4.9.1-qt5/phonon/moc_mediaobject.cpp:183
#22 0x00007f4df94f5bd1 in QObject::event (this=0x776fd0, e=<optimized out>) at kernel/qobject.cpp:1263
#23 0x00007f4df9cfddbc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x776fd0, e=0x73f740) at kernel/qapplication.cpp:3799
#24 0x00007f4df9d0575e in QApplication::notify (this=0x7ffca4ec7810, receiver=0x776fd0, e=0x73f740) at kernel/qapplication.cpp:3556
#25 0x00007f4df94ce61a in QCoreApplication::notifyInternal2 (receiver=0x776fd0, event=event@entry=0x73f740) at kernel/qcoreapplication.cpp:988
#26 0x00007f4df94d0c9b in QCoreApplication::sendEvent (event=0x73f740, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#27 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x66de10) at kernel/qcoreapplication.cpp:1649
#28 0x00007f4df94d1108 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1503
#29 0x00007f4df951b9c3 in postEventSourceDispatch (s=0x6a86b0) at kernel/qeventdispatcher_glib.cpp:276
#30 0x00007f4df41e158d in g_main_dispatch (context=0x7f4de40016f0) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:3203
#31 g_main_context_dispatch (context=context@entry=0x7f4de40016f0) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:3856
#32 0x00007f4df41e1870 in g_main_context_iterate (context=context@entry=0x7f4de40016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:3929
#33 0x00007f4df41e191c in g_main_context_iteration (context=0x7f4de40016f0, may_block=may_block@entry=1) at /var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3/glib/gmain.c:3990
#34 0x00007f4df951ba3f in QEventDispatcherGlib::processEvents (this=0x6b4960, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#35 0x00007f4df94cd5ca in QEventLoop::exec (this=this@entry=0x7ffca4ec76c0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#36 0x00007f4df94d4fdc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#37 0x00007f4df97f464c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1633
#38 0x00007f4df9cfdd15 in QApplication::exec () at kernel/qapplication.cpp:2975
#39 0x000000000041aa81 in main (argc=2, argv=<optimized out>) at /var/tmp/portage/kde-apps/dragon-16.12.3/work/dragon-16.12.3/src/app/main.cpp:91

Reported using DrKonqi
Comment 1 Fabian Köster 2017-06-16 14:39:03 UTC
Created attachment 106125 [details]
The file causing the crash
Comment 2 Nate Graham 2017-06-16 23:06:09 UTC
FWIW, I can't reproduce the crash with that file and dragon 16.12.3, QT 5.7.1, and Frameworks 5.31.0 on Kubuntu 17.04. The file doesn't play, but it doesn't crash dragon, either. The major differences between my setup and yours are:
- Kubuntu vs Gentoo
- KF 5.31.0 vs KF 5.34.0
- Binary package vs self-compiled
Comment 3 Christoph Feck 2017-06-26 14:18:12 UTC
Regression caused by https://phabricator.kde.org/D3802
Comment 4 Harald Sitter 2017-06-26 14:37:16 UTC
Git commit f585bac34072ad935ce99f21769989069ebe9440 by Harald Sitter.
Committed on 26/06/2017 at 14:34.
Pushed by sitter into branch 'Applications/16.12'.

do not attempt to add/remove nullptr widgets to/from the pagestack

CHANGELOG: Prevent crash with broken video files

M  +2    -2    src/app/mainWindow.cpp

https://commits.kde.org/dragon/f585bac34072ad935ce99f21769989069ebe9440