Bug 323248 - Dolphin crashes sometimes when disabling grouping
Summary: Dolphin crashes sometimes when disabling grouping
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 4.10.97
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-06 21:17 UTC by Frank Reininghaus
Modified: 2013-08-14 21:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Reininghaus 2013-08-06 21:17:39 UTC
Application: dolphin (4.10.97)
KDE Platform Version: 4.10.97 (Compiled from sources)
Qt Version: 4.8.6
Operating System: Linux 3.7.10-1.16-desktop x86_64
Distribution: "openSUSE 12.3 (x86_64)"

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

I enabled and then disabled grouping. If it crashes or not seems to depend on the number of groups that are visible. Making the window larger or going to a directory with more files may help to reproduce this crash.

I already have an idea what the problem is and will post a patch soon.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Dolphin (dolphin), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f464f9d3780 (LWP 5513))]

Thread 5 (Thread 0x7f4638988700 (LWP 5515)):
#0  0x00007f4648e6d623 in select () from /lib64/libc.so.6
#1  0x00007f4649ffcd2e in QProcessManager::run (this=0x7f464a3f28e0 <processManager()::processManager>) at io/qprocess_unix.cpp:247
#2  0x00007f4649eef132 in QThreadPrivate::start (arg=0x7f464a3f28e0 <processManager()::processManager>) at thread/qthread_unix.cpp:349
#3  0x00007f4649c01e0f in start_thread () from /lib64/libpthread.so.0
#4  0x00007f4648e747dd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f4633fff700 (LWP 5518)):
#0  0x00007f4648e6b87d in poll () from /lib64/libc.so.6
#1  0x00007f4645506aa4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f4645506bc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f464a067fb4 in QEventDispatcherGlib::processEvents (this=0x7f462c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#4  0x00007f464a0280b4 in QEventLoop::processEvents (this=0x7f4633ffed40, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f464a028248 in QEventLoop::exec (this=0x7f4633ffed40, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f4649eec69d in QThread::exec (this=0x246fc90) at thread/qthread.cpp:537
#7  0x00007f464a002a65 in QInotifyFileSystemWatcherEngine::run (this=0x246fc90) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007f4649eef132 in QThreadPrivate::start (arg=0x246fc90) at thread/qthread_unix.cpp:349
#9  0x00007f4649c01e0f in start_thread () from /lib64/libpthread.so.0
#10 0x00007f4648e747dd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f4633545700 (LWP 5526)):
#0  0x00007f4648e6b87d in poll () from /lib64/libc.so.6
#1  0x00007f4645506aa4 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f4645506bc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f464a067fb4 in QEventDispatcherGlib::processEvents (this=0x7f46240008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#4  0x00007f464a0280b4 in QEventLoop::processEvents (this=0x7f4633544d40, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f464a028248 in QEventLoop::exec (this=0x7f4633544d40, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f4649eec69d in QThread::exec (this=0x2953000) at thread/qthread.cpp:537
#7  0x00007f464a002a65 in QInotifyFileSystemWatcherEngine::run (this=0x2953000) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007f4649eef132 in QThreadPrivate::start (arg=0x2953000) at thread/qthread_unix.cpp:349
#9  0x00007f4649c01e0f in start_thread () from /lib64/libpthread.so.0
#10 0x00007f4648e747dd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f4632d44700 (LWP 5527)):
#0  0x00007f4649c05d11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f4649ef076b in QWaitConditionPrivate::wait (this=0x29ffd80, time=30000) at thread/qwaitcondition_unix.cpp:84
#2  0x00007f4649ef0531 in QWaitCondition::wait (this=0x29ffd30, mutex=0x29ffd28, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f4649eddead in QThreadPoolThread::run (this=0x2951f80) at concurrent/qthreadpool.cpp:141
#4  0x00007f4649eef132 in QThreadPrivate::start (arg=0x2951f80) at thread/qthread_unix.cpp:349
#5  0x00007f4649c01e0f in start_thread () from /lib64/libpthread.so.0
#6  0x00007f4648e747dd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f464f9d3780 (LWP 5513)):
[KCrash Handler]
#6  0x00007f4648dc13d5 in raise () from /lib64/libc.so.6
#7  0x00007f4648dc2858 in abort () from /lib64/libc.so.6
#8  0x00007f4649ee18ab in qt_message_output (msgType=QtFatalMsg, buf=0x2b5a4e8 "ASSERT: \"m_visibleGroups.isEmpty()\" in file /home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp, line 1246") at global/qglobal.cpp:2323
#9  0x00007f4649ee1a27 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f464a0b03e8 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fff981d0c38) at global/qglobal.cpp:2369
#10 0x00007f4649ee21f1 in qFatal (msg=0x7f464a0b03e8 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2552
#11 0x00007f4649ee1464 in qt_assert (assertion=0x7f464f2a89d8 "m_visibleGroups.isEmpty()", file=0x7f464f2a7eb0 "/home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp", line=1246) at global/qglobal.cpp:2018
#12 0x00007f464f245d19 in KItemListView::slotGroupedSortingChanged (this=0x2627720, current=false) at /home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp:1246
#13 0x00007f464f24ca14 in KItemListView::qt_static_metacall (_o=0x2627720, _c=QMetaObject::InvokeMetaMethod, _id=15, _a=0x7fff981d0ed0) at /home/kde-4.11/kde/build/KDE/kde-baseapps/dolphin/src/kitemlistview.moc:137
#14 0x00007f464a0497f7 in QMetaObject::activate (sender=0x2575700, m=0x7f464f4ec520 <KItemModelBase::staticMetaObject>, local_signal_index=4, argv=0x7fff981d0ed0) at kernel/qobject.cpp:3547
#15 0x00007f464f2586e0 in KItemModelBase::groupedSortingChanged (this=0x2575700, _t1=false) at /home/kde-4.11/kde/build/KDE/kde-baseapps/dolphin/src/kitemmodelbase.moc:147
#16 0x00007f464f25806a in KItemModelBase::setGroupedSorting (this=0x2575700, grouped=false) at /home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemmodelbase.cpp:68
#17 0x00007f464f27f652 in DolphinView::setGroupedSorting (this=0x261ace0, grouped=false) at /home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/views/dolphinview.cpp:321
#18 0x00007f464f289d7f in DolphinViewActionHandler::toggleGroupedSorting (this=0x24280b0, grouped=false) at /home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/views/dolphinviewactionhandler.cpp:464
#19 0x00007f464f20bf6e in DolphinViewActionHandler::qt_static_metacall (_o=0x24280b0, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0x7fff981d10f0) at /home/kde-4.11/kde/build/KDE/kde-baseapps/dolphin/src/moc_dolphinviewactionhandler.cpp:116
#20 0x00007f464a0497f7 in QMetaObject::activate (sender=0x24557c0, m=0x7f464c173a20 <QAction::staticMetaObject>, local_signal_index=1, argv=0x7fff981d10f0) at kernel/qobject.cpp:3547
#21 0x00007f464b38e270 in QAction::triggered (this=0x24557c0, _t1=false) at .moc/debug-shared/moc_qaction.cpp:276
#22 0x00007f464b38d522 in QAction::activate (this=0x24557c0, event=QAction::Trigger) at kernel/qaction.cpp:1257
#23 0x00007f464b954062 in QMenuPrivate::activateCausedStack (this=0x252e2d0, causedStack=..., action=0x24557c0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1038
#24 0x00007f464b954534 in QMenuPrivate::activateAction (this=0x252e2d0, action=0x24557c0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1130
#25 0x00007f464b958e64 in QMenu::mouseReleaseEvent (this=0x25460d0, e=0x7fff981d2020) at widgets/qmenu.cpp:2372
#26 0x00007f464c54fee1 in KMenu::mouseReleaseEvent (this=0x25460d0, e=0x7fff981d2020) at /home/kde-4.11/kde/src/KDE/kdelibs/kdeui/widgets/kmenu.cpp:464
#27 0x00007f464b404ad6 in QWidget::event (this=0x25460d0, event=0x7fff981d2020) at kernel/qwidget.cpp:8376
#28 0x00007f464b959528 in QMenu::event (this=0x25460d0, e=0x7fff981d2020) at widgets/qmenu.cpp:2481
#29 0x00007f464b39dede in QApplicationPrivate::notify_helper (this=0x22773b0, receiver=0x25460d0, e=0x7fff981d2020) at kernel/qapplication.cpp:4562
#30 0x00007f464b39bd52 in QApplication::notify (this=0x7fff981d4bf0, receiver=0x25460d0, e=0x7fff981d2020) at kernel/qapplication.cpp:4105
#31 0x00007f464c459f7e in KApplication::notify (this=0x7fff981d4bf0, receiver=0x25460d0, event=0x7fff981d2020) at /home/kde-4.11/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#32 0x00007f464a02ad5c in QCoreApplication::notifyInternal (this=0x7fff981d4bf0, receiver=0x25460d0, event=0x7fff981d2020) at kernel/qcoreapplication.cpp:949
#33 0x00007f464b3a0ae1 in QCoreApplication::sendSpontaneousEvent (receiver=0x25460d0, event=0x7fff981d2020) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#34 0x00007f464b39a328 in QApplicationPrivate::sendMouseEvent (receiver=0x25460d0, event=0x7fff981d2020, alienWidget=0x0, nativeWidget=0x25460d0, buttonDown=0x7f464c1c13b8 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3171
#35 0x00007f464b4421fa in QETWidget::translateMouseEvent (this=0x25460d0, event=0x7fff981d29a0) at kernel/qapplication_x11.cpp:4451
#36 0x00007f464b43edc9 in QApplication::x11ProcessEvent (this=0x7fff981d4bf0, event=0x7fff981d29a0) at kernel/qapplication_x11.cpp:3518
#37 0x00007f464b47a694 in x11EventSourceDispatch (s=0x2274670, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#38 0x00007f46455067d5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#39 0x00007f4645506b08 in ?? () from /usr/lib64/libglib-2.0.so.0
#40 0x00007f4645506bc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#41 0x00007f464a067fb4 in QEventDispatcherGlib::processEvents (this=0x224c6c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#42 0x00007f464b47aa42 in QGuiEventDispatcherGlib::processEvents (this=0x224c6c0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#43 0x00007f464a0280b4 in QEventLoop::processEvents (this=0x7fff981d2d40, flags=...) at kernel/qeventloop.cpp:149
#44 0x00007f464a028248 in QEventLoop::exec (this=0x7fff981d2d40, flags=...) at kernel/qeventloop.cpp:204
#45 0x00007f464b9579cb in QMenu::exec (this=0x25460d0, p=..., action=0x0) at widgets/qmenu.cpp:2125
#46 0x00007f464b9a95d5 in QToolButtonPrivate::popupTimerDone (this=0x25cb680) at widgets/qtoolbutton.cpp:955
#47 0x00007f464b9a8a6f in QToolButton::showMenu (this=0x233aee0) at widgets/qtoolbutton.cpp:866
#48 0x00007f464b9a8b4d in QToolButtonPrivate::_q_buttonPressed (this=0x25cb680) at widgets/qtoolbutton.cpp:879
#49 0x00007f464b9aa066 in QToolButton::qt_static_metacall (_o=0x233aee0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff981d30e0) at .moc/debug-shared/moc_qtoolbutton.cpp:90
#50 0x00007f464a0497f7 in QMetaObject::activate (sender=0x233aee0, m=0x7f464c19cb40 <QAbstractButton::staticMetaObject>, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3547
#51 0x00007f464bc354f9 in QAbstractButton::pressed (this=0x233aee0) at .moc/debug-shared/moc_qabstractbutton.cpp:206
#52 0x00007f464b8a1a3c in QAbstractButtonPrivate::emitPressed (this=0x25cb680) at widgets/qabstractbutton.cpp:562
#53 0x00007f464b8a2ca3 in QAbstractButton::mousePressEvent (this=0x233aee0, e=0x7fff981d3ed0) at widgets/qabstractbutton.cpp:1098
#54 0x00007f464b9a86ca in QToolButton::mousePressEvent (this=0x233aee0, e=0x7fff981d3ed0) at widgets/qtoolbutton.cpp:709
#55 0x00007f464b404aa8 in QWidget::event (this=0x233aee0, event=0x7fff981d3ed0) at kernel/qwidget.cpp:8372
#56 0x00007f464b8a2be3 in QAbstractButton::event (this=0x233aee0, e=0x7fff981d3ed0) at widgets/qabstractbutton.cpp:1082
#57 0x00007f464b9a9eb1 in QToolButton::event (this=0x233aee0, event=0x7fff981d3ed0) at widgets/qtoolbutton.cpp:1163
#58 0x00007f464b39dede in QApplicationPrivate::notify_helper (this=0x22773b0, receiver=0x233aee0, e=0x7fff981d3ed0) at kernel/qapplication.cpp:4562
#59 0x00007f464b39bd52 in QApplication::notify (this=0x7fff981d4bf0, receiver=0x233aee0, e=0x7fff981d3ed0) at kernel/qapplication.cpp:4105
#60 0x00007f464c459f7e in KApplication::notify (this=0x7fff981d4bf0, receiver=0x233aee0, event=0x7fff981d3ed0) at /home/kde-4.11/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#61 0x00007f464a02ad5c in QCoreApplication::notifyInternal (this=0x7fff981d4bf0, receiver=0x233aee0, event=0x7fff981d3ed0) at kernel/qcoreapplication.cpp:949
#62 0x00007f464b3a0ae1 in QCoreApplication::sendSpontaneousEvent (receiver=0x233aee0, event=0x7fff981d3ed0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#63 0x00007f464b39a328 in QApplicationPrivate::sendMouseEvent (receiver=0x233aee0, event=0x7fff981d3ed0, alienWidget=0x0, nativeWidget=0x233aee0, buttonDown=0x7f464c1c13b8 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3171
#64 0x00007f464b4424bb in QETWidget::translateMouseEvent (this=0x233aee0, event=0x7fff981d47f0) at kernel/qapplication_x11.cpp:4517
#65 0x00007f464b43edc9 in QApplication::x11ProcessEvent (this=0x7fff981d4bf0, event=0x7fff981d47f0) at kernel/qapplication_x11.cpp:3518
#66 0x00007f464b47a694 in x11EventSourceDispatch (s=0x2274670, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#67 0x00007f46455067d5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#68 0x00007f4645506b08 in ?? () from /usr/lib64/libglib-2.0.so.0
#69 0x00007f4645506bc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#70 0x00007f464a067f91 in QEventDispatcherGlib::processEvents (this=0x224c6c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#71 0x00007f464b47aa42 in QGuiEventDispatcherGlib::processEvents (this=0x224c6c0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#72 0x00007f464a0280b4 in QEventLoop::processEvents (this=0x7fff981d4b60, flags=...) at kernel/qeventloop.cpp:149
#73 0x00007f464a028248 in QEventLoop::exec (this=0x7fff981d4b60, flags=...) at kernel/qeventloop.cpp:204
#74 0x00007f464a02b3f2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#75 0x00007f464b39afc4 in QApplication::exec () at kernel/qapplication.cpp:3823
#76 0x00007f464f555dcd in kdemain (argc=1, argv=0x7fff981d5198) at /home/kde-4.11/kde/src/KDE/kde-baseapps/dolphin/src/main.cpp:93
#77 0x0000000000400a6e in main (argc=1, argv=0x7fff981d5198) at /home/kde-4.11/kde/build/KDE/kde-baseapps/dolphin/src/dolphin_dummy.cpp:3


Reproducible: Sometimes
Comment 1 Frank Reininghaus 2013-08-14 21:42:29 UTC
Git commit 292e11fcf46bb74df59dc516ea4db6f021b626bd by Frank Reininghaus.
Committed on 14/08/2013 at 21:40.
Pushed by freininghaus into branch 'KDE/4.11'.

Fix crash when disabling "Show in groups"

The problem was that items are removed from m_visibleGroups while
a QMutableHashIterator iterates over this hash, such that the iterator
can become invalid. The solution is to use a QHashIterator instead,
which takes a copy of the hash. Therefore, it is not affected if
m_visibleGroups is modified in any way.
FIXED-IN: 4.11.1
REVIEW: 111919

M  +4    -2    dolphin/src/kitemviews/kitemlistview.cpp

http://commits.kde.org/kde-baseapps/292e11fcf46bb74df59dc516ea4db6f021b626bd