Bug 340054 - Crash when moving folders in folder tree list
Summary: Crash when moving folders in folder tree list
Status: RESOLVED FIXED
Alias: None
Product: kdepimlibs
Classification: Applications
Component: akonadi (show other bugs)
Version: 4.14.1
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-17 11:54 UTC by Andreas Cord-Landwehr
Modified: 2015-01-13 10:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Cord-Landwehr 2014-10-17 11:54:13 UTC
When trying to move a folder in the folders-list I (reproducible) get a crash. This happens both with
* drag and drop,
* as well as with using the "Move folder" in the right-click context menu 

Here the backtrace:

Application: Kontact (kontact), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[Current thread is 1 (Thread 0xb0860780 (LWP 20241))]

Thread 4 (Thread 0xadbceb40 (LWP 20252)):
#0  0xb76fbd4c in __kernel_vsyscall ()
#1  0xb2af5c4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb5e4c8dc in __pthread_cond_wait (cond=0xb547feb0, mutex=0xb547fe98) at forward.c:149
#3  0xb4af08b7 in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#4  0xb4af08fc in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#5  0xb2af1efb in start_thread (arg=0xadbceb40) at pthread_create.c:309
#6  0xb5e3fd4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 3 (Thread 0xad2adb40 (LWP 20253)):
#0  0xb76fbd4c in __kernel_vsyscall ()
#1  0xb2af5c4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb5e4c8dc in __pthread_cond_wait (cond=0xad31b7dc, mutex=0xad31b7c4) at forward.c:149
#3  0xb4b21fdc in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#4  0xb47e24f4 in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#5  0xb4b07272 in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#6  0xb4b218f4 in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#7  0xb2af1efb in start_thread (arg=0xad2adb40) at pthread_create.c:309
#8  0xb5e3fd4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 2 (Thread 0xaa1ffb40 (LWP 20261)):
#0  0xb76fbd4c in __kernel_vsyscall ()
#1  0xb5e4d372 in __GI___clock_gettime (clock_id=1, tp=0xaa1feff4) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb60b83d5 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb61a8701 in QTimerInfoList::updateCurrentTime (this=0xa980289c) at kernel/qeventdispatcher_unix.cpp:354
#5  0xb61a739e in timerSourceCheckHelper (src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:150
#6  0xb29ef9d6 in g_main_context_check () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb29effea in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb29f0196 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb61a7ad4 in QEventDispatcherGlib::processEvents (this=0xa9800468, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#10 0xb61741cf in QEventLoop::processEvents (this=0xaa1ff244, flags=...) at kernel/qeventloop.cpp:149
#11 0xb617455e in QEventLoop::exec (this=0xaa1ff244, flags=...) at kernel/qeventloop.cpp:204
#12 0xb60597db in QThread::exec (this=0x9a87678) at thread/qthread.cpp:538
#13 0xb60599b8 in QThread::run (this=0x9a87678) at thread/qthread.cpp:605
#14 0xb605c3be in QThreadPrivate::start (arg=0x9a87678) at thread/qthread_unix.cpp:349
#15 0xb2af1efb in start_thread (arg=0xaa1ffb40) at pthread_create.c:309
#16 0xb5e3fd4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 1 (Thread 0xb0860780 (LWP 20241)):
[KCrash Handler]
#7  Akonadi::Entity::parentCollection (this=0x0) at ../../akonadi/entity.cpp:189
#8  0xb577b4d7 in PasteHelperJob::PasteHelperJob (this=0xae4e810, action=Qt::MoveAction, items=..., collections=..., destination=..., parent=0x9d79278) at ../../akonadi/pastehelper.cpp:100
#9  0xb577be69 in Akonadi::PasteHelper::pasteUriList (mimeData=0xa7ed638, destination=..., action=Qt::MoveAction, session=0x9d79278) at ../../akonadi/pastehelper.cpp:338
#10 0xb570df0e in Akonadi::EntityTreeModel::dropMimeData (this=0x9d784d0, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at ../../akonadi/entitytreemodel.cpp:578
#11 0xb6da40fb in QSortFilterProxyModel::dropMimeData (this=0x9db1560, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at itemviews/qsortfilterproxymodel.cpp:1833
#12 0xb7301f79 in KIdentityProxyModel::dropMimeData (this=0x9d13918, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at ../../kdeui/itemviews/kidentityproxymodel.cpp:186
#13 0xb7301f79 in KIdentityProxyModel::dropMimeData (this=0x9cf1488, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at ../../kdeui/itemviews/kidentityproxymodel.cpp:186
#14 0xb6da40fb in QSortFilterProxyModel::dropMimeData (this=0x9f928f0, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at itemviews/qsortfilterproxymodel.cpp:1833
#15 0xb6da40fb in QSortFilterProxyModel::dropMimeData (this=0x9dc7ef0, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at itemviews/qsortfilterproxymodel.cpp:1833
#16 0xb5706db3 in Akonadi::EntityOrderProxyModel::dropMimeData (this=0x9dc7ef0, data=0xa7ed638, action=Qt::MoveAction, row=-1, column=-1, parent=...) at ../../akonadi/entityorderproxymodel.cpp:124
#17 0xb6d1132a in QAbstractItemView::dropEvent (this=0xa01b0a8, event=0xbfa75588) at itemviews/qabstractitemview.cpp:2006
#18 0xb572511c in Akonadi::EntityTreeView::dropEvent (this=0xa01b0a8, event=0xbfa75588) at ../../akonadi/entitytreeview.cpp:260
#19 0xb67dd8f9 in QWidget::event (this=0xa01b0a8, event=0xbfa75588) at kernel/qwidget.cpp:8775
#20 0xb6be699a in QFrame::event (this=0xa01b0a8, e=0xbfa75588) at widgets/qframe.cpp:557
#21 0xb6c7809d in QAbstractScrollArea::viewportEvent (this=0xa01b0a8, e=0xbfa75588) at widgets/qabstractscrollarea.cpp:1043
#22 0xb6d1d537 in QAbstractItemView::viewportEvent (this=0xa01b0a8, event=0xbfa75588) at itemviews/qabstractitemview.cpp:1644
#23 0xb6d65510 in QTreeView::viewportEvent (this=0xa01b0a8, event=0xbfa75588) at itemviews/qtreeview.cpp:1252
#24 0xb6c78323 in viewportEvent (event=0xbfa75588, this=<optimized out>) at widgets/qabstractscrollarea_p.h:100
#25 QAbstractScrollAreaFilter::eventFilter (this=0x9d1c1e0, o=0x9e90918, e=0xbfa75588) at widgets/qabstractscrollarea_p.h:116
#26 0xb61759c3 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x98c0378, receiver=0x9e90918, event=0xbfa75588) at kernel/qcoreapplication.cpp:1065
#27 0xb6782498 in QApplicationPrivate::notify_helper (this=0x98c0378, receiver=0x9e90918, e=0xbfa75588) at kernel/qapplication.cpp:4566
#28 0xb678a90a in QApplication::notify (this=0xbfa76db4, receiver=0x9e90918, e=0xbfa75588) at kernel/qapplication.cpp:4356
#29 0xb7346d8c in KApplication::notify (this=0xbfa76db4, receiver=0x9e90918, event=0xbfa75588) at ../../kdeui/kernel/kapplication.cpp:311
#30 0xb617584a in QCoreApplication::notifyInternal (this=0xbfa76db4, receiver=0x9e90918, event=0xbfa75588) at kernel/qcoreapplication.cpp:955
#31 0xb681ab6d in sendEvent (event=0xbfa75588, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#32 QX11Data::xdndHandleDrop (this=0x98cc4e0, xe=0xbfa7560c, passive=false) at kernel/qdnd_x11.cpp:1181
#33 0xb681aed8 in QDragManager::drop (this=0xae570a8) at kernel/qdnd_x11.cpp:1761
#34 0xb681c0e3 in QDragManager::eventFilter (this=0xae570a8, o=0xbfa74884, e=0x0) at kernel/qdnd_x11.cpp:1310
#35 0xb6175918 in QCoreApplicationPrivate::sendThroughApplicationEventFilters (this=0x98c0378, receiver=0xafa0a98, event=0xbfa75a44) at kernel/qcoreapplication.cpp:1046
#36 0xb6782446 in QApplicationPrivate::notify_helper (this=0x98c0378, receiver=0xafa0a98, e=0xbfa75a44) at kernel/qapplication.cpp:4545
#37 0xb678b0f6 in QApplication::notify (this=0xbfa76db4, receiver=0xafa0a98, e=0xbfa75a44) at kernel/qapplication.cpp:4113
#38 0xb7346d8c in KApplication::notify (this=0xbfa76db4, receiver=0xafa0a98, event=0xbfa75a44) at ../../kdeui/kernel/kapplication.cpp:311
#39 0xb617584a in QCoreApplication::notifyInternal (this=0xbfa76db4, receiver=0xafa0a98, event=0xbfa75a44) at kernel/qcoreapplication.cpp:955
#40 0xb6788ab5 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#41 QApplicationPrivate::sendMouseEvent (receiver=0xafa0a98, event=0xbfa75a44, alienWidget=0x0, nativeWidget=0xafa0a98, buttonDown=0xb7158f44 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3178
#42 0xb680c0f9 in QETWidget::translateMouseEvent (this=0xafa0a98, event=0xbfa75c4c) at kernel/qapplication_x11.cpp:4540
#43 0xb680adf5 in QApplication::x11ProcessEvent (this=0xbfa76db4, event=0xbfa75c4c) at kernel/qapplication_x11.cpp:3663
#44 0xb6835f21 in x11EventSourceDispatch (s=0x98cb9a8, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#45 0xb29efda4 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#46 0xb29f00c9 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#47 0xb29f0196 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#48 0xb61a7ab9 in QEventDispatcherGlib::processEvents (this=0x9894c60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#49 0xb6835ff6 in QGuiEventDispatcherGlib::processEvents (this=0x9894c60, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#50 0xb61741cf in QEventLoop::processEvents (this=0xa86cfc0, flags=...) at kernel/qeventloop.cpp:149
#51 0xb617455e in QEventLoop::exec (this=0xa86cfc0, flags=...) at kernel/qeventloop.cpp:204
#52 0xb681c477 in QDragManager::drag (this=0xae570a8, o=0xaf412f8) at kernel/qdnd_x11.cpp:2028
#53 0xb6795982 in QDrag::exec (this=0xaf412f8, supportedActions=..., defaultDropAction=Qt::IgnoreAction) at kernel/qdrag.cpp:284
#54 0xb5826b6d in Akonadi::DragDropManager::startDrag (this=0x9dc6a00, supportedActions=...) at ../../akonadi/dragdropmanager.cpp:312
#55 0xb5723259 in Akonadi::EntityTreeView::startDrag (this=0xa01b0a8, supportedActions=...) at ../../akonadi/entitytreeview.cpp:302
#56 0xb6d1c8dc in QAbstractItemView::mouseMoveEvent (this=0xa01b0a8, event=0xbfa76854) at itemviews/qabstractitemview.cpp:1725
#57 0xb6d65a82 in QTreeView::mouseMoveEvent (this=0xa01b0a8, event=0xbfa76854) at itemviews/qtreeview.cpp:1908
#58 0xb67dd8f9 in QWidget::event (this=0xa01b0a8, event=0xbfa76854) at kernel/qwidget.cpp:8775
#59 0xb6be699a in QFrame::event (this=0xa01b0a8, e=0xbfa76854) at widgets/qframe.cpp:557
#60 0xb6c7809d in QAbstractScrollArea::viewportEvent (this=0xa01b0a8, e=0xbfa76854) at widgets/qabstractscrollarea.cpp:1043
#61 0xb6d1d537 in QAbstractItemView::viewportEvent (this=0xa01b0a8, event=0xbfa76854) at itemviews/qabstractitemview.cpp:1644
#62 0xb6d65510 in QTreeView::viewportEvent (this=0xa01b0a8, event=0xbfa76854) at itemviews/qtreeview.cpp:1252
#63 0xb6c78323 in viewportEvent (event=0xbfa76854, this=<optimized out>) at widgets/qabstractscrollarea_p.h:100
#64 QAbstractScrollAreaFilter::eventFilter (this=0x9d1c1e0, o=0x9e90918, e=0xbfa76854) at widgets/qabstractscrollarea_p.h:116
#65 0xb61759c3 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x98c0378, receiver=0x9e90918, event=0xbfa76854) at kernel/qcoreapplication.cpp:1065
#66 0xb6782498 in QApplicationPrivate::notify_helper (this=0x98c0378, receiver=0x9e90918, e=0xbfa76854) at kernel/qapplication.cpp:4566
#67 0xb678b0f6 in QApplication::notify (this=0xbfa76db4, receiver=0x9e90918, e=0xbfa76854) at kernel/qapplication.cpp:4113
#68 0xb7346d8c in KApplication::notify (this=0xbfa76db4, receiver=0x9e90918, event=0xbfa76854) at ../../kdeui/kernel/kapplication.cpp:311
#69 0xb617584a in QCoreApplication::notifyInternal (this=0xbfa76db4, receiver=0x9e90918, event=0xbfa76854) at kernel/qcoreapplication.cpp:955
#70 0xb6788ab5 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#71 QApplicationPrivate::sendMouseEvent (receiver=0x9e90918, event=0xbfa76854, alienWidget=0x0, nativeWidget=0x9e90918, buttonDown=0xb7158f44 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3178
#72 0xb680c0f9 in QETWidget::translateMouseEvent (this=0x9e90918, event=0xbfa76a5c) at kernel/qapplication_x11.cpp:4540
#73 0xb680adf5 in QApplication::x11ProcessEvent (this=0xbfa76db4, event=0xbfa76a5c) at kernel/qapplication_x11.cpp:3663
#74 0xb6835f21 in x11EventSourceDispatch (s=0x98cb9a8, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#75 0xb29efda4 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#76 0xb29f00c9 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#77 0xb29f0196 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#78 0xb61a7ab9 in QEventDispatcherGlib::processEvents (this=0x9894c60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#79 0xb6835ff6 in QGuiEventDispatcherGlib::processEvents (this=0x9894c60, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#80 0xb61741cf in QEventLoop::processEvents (this=0xbfa76d34, flags=...) at kernel/qeventloop.cpp:149
#81 0xb617455e in QEventLoop::exec (this=0xbfa76d34, flags=...) at kernel/qeventloop.cpp:204
#82 0xb617a6d6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#83 0xb67805b4 in QApplication::exec () at kernel/qapplication.cpp:3828
#84 0x0804a9e3 in main (argc=1, argv=0xbfa76e94) at ../../../kontact/src/main.cpp:219


Reproducible: Always
Comment 1 Jonathan Marten 2015-01-13 09:26:32 UTC
Confirmed with current trunk (KDE/4.14 branch)
Comment 2 Jonathan Marten 2015-01-13 09:31:06 UTC
This happens as a result of this debug statement in PasteHelperJob::PasteHelperJob()
in kdepimlibs/akonadi/pastehelper.cpp:

    kDebug() << items.first().parentCollection().id() << dragSourceCollection.id();

If a collection (folder) is being moved or copied, then 'items' will be empty and Qt asserts on accessing its first().

This may have been introduced with commit ca7107bdfaadda72b31f310b5431fd252176f9d1
Comment 3 Jonathan Marten 2015-01-13 10:23:24 UTC
Git commit 29e260bd8931d1198dfd5ab4345005de5a3853e9 by Jonathan Marten.
Committed on 13/01/2015 at 10:21.
Pushed by marten into branch 'KDE/4.14'.

Fix assert in PasteHelperJob::PasteHelperJob() when moving collections

M  +2    -2    akonadi/pastehelper.cpp

http://commits.kde.org/kdepimlibs/29e260bd8931d1198dfd5ab4345005de5a3853e9