Bug 294616

Summary: crash during filtering [ KFileItemModel::expansionLevelsCompare ]
Product: [Applications] dolphin Reporter: Pascal d'Hermilly <pascal>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: bosyber, david001, eljefedelito, flareload, franciscoadriansanchez
Priority: NOR Keywords: investigated
Version: 2.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.0
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Pascal d'Hermilly 2012-02-22 14:35:52 UTC
Application: dolphin (2.0)
KDE Platform Version: 4.8.00 (4.8.0
Qt Version: 4.7.4
Operating System: Linux 3.0.0-16-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:
It crashed while I was slowly deleting a word (using backspace) that I had used to filter the files dolphin shows. (ctrl+i)
I was browsing a remote sftp directory with several subdirs open through "tree view".

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fddde3ef780 (LWP 2601))]

Thread 3 (Thread 0x7fddcbc0e700 (LWP 2602)):
#0  0x00007fddddce3a9b in pthread_mutex_lock (mutex=0x2178768) at forward.c:182
#1  0x00007fddd63b3361 in g_main_context_query () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fddd63b3e6a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fddd63b4429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fddda0ccf3e in QEventDispatcherGlib::processEvents (this=0x2178440, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007fddda0a0cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fddda0a0ef7 in QEventLoop::exec (this=0x7fddcbc0ddd0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007fddd9fb827f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#8  0x00007fddda083cbf in QInotifyFileSystemWatcherEngine::run (this=0x21760c0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fddd9fbad05 in QThreadPrivate::start (arg=0x21760c0) at thread/qthread_unix.cpp:331
#10 0x00007fddd6885efc in start_thread (arg=0x7fddcbc0e700) at pthread_create.c:304
#11 0x00007fddddcd589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fddc971e700 (LWP 2603)):
#0  0x00007fddddcc9773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fddd63b3f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fddd63b4429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fddda0ccf3e in QEventDispatcherGlib::processEvents (this=0x2124e40, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fddda0a0cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fddda0a0ef7 in QEventLoop::exec (this=0x7fddc971ddd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fddd9fb827f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007fddda083cbf in QInotifyFileSystemWatcherEngine::run (this=0x24d2380) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fddd9fbad05 in QThreadPrivate::start (arg=0x24d2380) at thread/qthread_unix.cpp:331
#9  0x00007fddd6885efc in start_thread (arg=0x7fddc971e700) at pthread_create.c:304
#10 0x00007fddddcd589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fddde3ef780 (LWP 2601)):
[KCrash Handler]
#6  QUrlPrivate::parse (this=0x2821bb0, parseOptions=QUrlPrivate::ParseAndSet) at io/qurl.cpp:3759
#7  0x00007fddda05d2fa in QUrl::path (this=0x7fff81a59f90) at io/qurl.cpp:4818
#8  0x00007fddda4fa2db in KUrl::path (this=<optimized out>, trailing=KUrl::LeaveTrailingSlash) at ../../kdecore/io/kurl.cpp:880
#9  0x00007fdddd01175c in KFileItemModel::expansionLevelsCompare (this=0x2920690, a=0x2788be0, b=0x2b49690) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1548
#10 0x00007fdddd0119c2 in KFileItemModel::lessThan (this=0x2920690, a=0x2788be0, b=0x2b49690) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1235
#11 0x00007fdddd019218 in insertItems (items=<optimized out>, this=0x2920690) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:910
#12 KFileItemModel::insertItems (this=0x2920690, items=<optimized out>) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:877
#13 0x00007fdddd01bbc5 in KFileItemModel::setNameFilter (this=0x2920690, nameFilter=<optimized out>) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:553
#14 0x00007fddddfd45bd in DolphinViewContainer::setNameFilter (this=0x26d8980, nameFilter=<optimized out>) at ../../../dolphin/src/dolphinviewcontainer.cpp:467
#15 0x00007fddddfd5fd0 in DolphinViewContainer::qt_metacall (this=0x26d8980, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff81a5a430) at ./dolphinviewcontainer.moc:145
#16 0x00007fddda0b4eba in QMetaObject::activate (sender=0x2925720, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff81a5a430) at kernel/qobject.cpp:3278
#17 0x00007fddddfda1e2 in FilterBar::filterChanged (this=<optimized out>, _t1=<optimized out>) at ./filterbar.moc:91
#18 0x00007fddddfda257 in FilterBar::qt_metacall (this=0x2925720, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff81a5a530) at ./filterbar.moc:77
#19 0x00007fddda0b4eba in QMetaObject::activate (sender=0x2936c90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff81a5a530) at kernel/qobject.cpp:3278
#20 0x00007fdddaeabe32 in QLineEdit::textChanged (this=<optimized out>, _t1=<optimized out>) at .moc/release-shared/moc_qlineedit.cpp:242
#21 0x00007fdddaeac2ec in QLineEdit::qt_metacall (this=0x2936c90, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff81a5a700) at .moc/release-shared/moc_qlineedit.cpp:158
#22 0x00007fdddb871fc5 in KLineEdit::qt_metacall (this=0x2936c90, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff81a5a700) at ./klineedit.moc:133
#23 0x00007fddda0b4eba in QMetaObject::activate (sender=0x2933050, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff81a5a700) at kernel/qobject.cpp:3278
#24 0x00007fdddb117485 in QLineControl::textChanged (this=<optimized out>, _t1=<optimized out>) at .moc/release-shared/moc_qlinecontrol_p.cpp:134
#25 0x00007fdddaeb0cfb in QLineControl::finishChange (this=0x2933050, validateFromState=8, update=<optimized out>, edited=true) at widgets/qlinecontrol.cpp:658
#26 0x00007fdddaeb37c3 in QLineControl::processKeyEvent (this=0x2933050, event=0x7fff81a5b300) at widgets/qlinecontrol.cpp:1834
#27 0x00007fdddaea7fa9 in QLineEdit::keyPressEvent (this=<optimized out>, event=0x7fff81a5b300) at widgets/qlineedit.cpp:1668
#28 0x00007fdddb873069 in KLineEdit::keyPressEvent (this=0x2936c90, e=0x7fff81a5b300) at ../../kdeui/widgets/klineedit.cpp:970
#29 0x00007fdddaaf3d6e in QWidget::event (this=0x2936c90, event=0x7fff81a5b300) at kernel/qwidget.cpp:8330
#30 0x00007fdddaeaa4b7 in QLineEdit::event (this=0x2936c90, e=0x7fff81a5b300) at widgets/qlineedit.cpp:1485
#31 0x00007fdddb8717db in KLineEdit::event (this=0x2936c90, ev=0x7fff81a5b300) at ../../kdeui/widgets/klineedit.cpp:1403
#32 0x00007fdddaaa3474 in notify_helper (e=0x7fff81a5b300, receiver=0x2936c90, this=0x1fbd010) at kernel/qapplication.cpp:4486
#33 QApplicationPrivate::notify_helper (this=0x1fbd010, receiver=0x2936c90, e=0x7fff81a5b300) at kernel/qapplication.cpp:4458
#34 0x00007fdddaaa89d5 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fff81a5b300) at kernel/qapplication.cpp:3945
#35 0x00007fdddb7b8ae6 in KApplication::notify (this=0x7fff81a5c180, receiver=0x2936c90, event=0x7fff81a5b300) at ../../kdeui/kernel/kapplication.cpp:311
#36 0x00007fddda0a1afc in QCoreApplication::notifyInternal (this=0x7fff81a5c180, receiver=0x2936c90, event=0x7fff81a5b300) at kernel/qcoreapplication.cpp:787
#37 0x00007fdddab47029 in QKeyMapper::sendKeyEvent (keyWidget=0x2936c90, grab=<optimized out>, type=QEvent::KeyPress, code=16777219, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=22, nativeVirtualKey=65288, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1866
#38 0x00007fdddab4749b in QKeyMapperPrivate::translateKeyEvent (this=0x2006710, keyWidget=0x2936c90, event=0x7fff81a5bd40, grab=false) at kernel/qkeymapper_x11.cpp:1836
#39 0x00007fdddab223d7 in QApplication::x11ProcessEvent (this=0x7fff81a5c180, event=0x7fff81a5bd40) at kernel/qapplication_x11.cpp:3586
#40 0x00007fdddab4b4a2 in x11EventSourceDispatch (s=0x1fbfdb0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#41 0x00007fddd63b3a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007fddd63b4258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fddd63b4429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007fddda0cced6 in QEventDispatcherGlib::processEvents (this=0x1f9ea00, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#45 0x00007fdddab4b10e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#46 0x00007fddda0a0cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#47 0x00007fddda0a0ef7 in QEventLoop::exec (this=0x7fff81a5c110, flags=...) at kernel/qeventloop.cpp:201
#48 0x00007fddda0a5789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#49 0x00007fddddfdb17d in kdemain (argc=5, argv=0x7fff81a5c6e8) at ../../../dolphin/src/main.cpp:91
#50 0x00007fddddc1530d in __libc_start_main (main=0x400640 <main(int, char**)>, argc=5, ubp_av=0x7fff81a5c6e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff81a5c6d8) at libc-start.c:226
#51 0x0000000000400671 in _start ()

Reported using DrKonqi
Comment 1 Peter Penz 2012-02-22 14:58:19 UTC
Thanks for the report, this issue has been fixed in 4.8.1
Comment 2 Pascal d'Hermilly 2012-02-22 15:06:50 UTC
:-)
Comment 3 Pascal d'Hermilly 2012-04-16 11:43:48 UTC
This unfortunately happened to me again in KDE 4.8.2

Dr. Konqui suggested that Bug 275932 is a duplicate(?) but I dont see the resemblence.
New stack-trace:

Application: Dolphin (dolphin), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f819734c7a0 (LWP 3600))]

Thread 3 (Thread 0x7f81831e9700 (LWP 3601)):
#0  0x00007f8196c27473 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f818f2d2f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f818f2d3429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f819300e5a6 in QEventDispatcherGlib::processEvents (this=0x1300c60, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f8192fddd82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f8192fddfd7 in QEventLoop::exec (this=0x7f81831e8db0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f8192edd077 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f8192fbdaff in QInotifyFileSystemWatcherEngine::run (this=0x12fe7d0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f8192ee009b in QThreadPrivate::start (arg=0x12fe7d0) at thread/qthread_unix.cpp:298
#9  0x00007f818f7a4efc in start_thread (arg=0x7f81831e9700) at pthread_create.c:304
#10 0x00007f8196c3359d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f8182075700 (LWP 3602)):
#0  0x00007f8196c27473 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f818f2d2f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f818f2d3429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f819300e5a6 in QEventDispatcherGlib::processEvents (this=0x1567c00, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f8192fddd82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f8192fddfd7 in QEventLoop::exec (this=0x7f8182074db0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f8192edd077 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f8192fbdaff in QInotifyFileSystemWatcherEngine::run (this=0x120cf00) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f8192ee009b in QThreadPrivate::start (arg=0x120cf00) at thread/qthread_unix.cpp:298
#9  0x00007f818f7a4efc in start_thread (arg=0x7f8182075700) at pthread_create.c:304
#10 0x00007f8196c3359d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f819734c7a0 (LWP 3600)):
[KCrash Handler]
#6  ref (this=0x60) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:121
#7  QString (other=<optimized out>, this=0x7fff729a7dc0) at ../../include/QtCore/../../src/corelib/tools/qstring.h:726
#8  QUrl::path (this=0x7fff729a7e10) at io/qurl.cpp:4889
#9  0x00007f819345b3cb in KUrl::path (this=<optimized out>, trailing=KUrl::LeaveTrailingSlash) at ../../kdecore/io/kurl.cpp:880
#10 0x00007f8195f69444 in KFileItemModel::expandedParentsCountCompare (this=0x1563ad0, a=0x1ce8060, b=0x178daa0) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1578
#11 0x00007f8195f69782 in KFileItemModel::lessThan (this=0x1563ad0, a=0x1ce8060, b=0x178daa0) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1256
#12 0x00007f8195f69baf in KFileItemModel::merge (this=0x1563ad0, begin=..., pivot=..., end=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1413
#13 0x00007f8195f69c73 in KFileItemModel::sort (this=0x1563ad0, begin=..., end=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1395
#14 0x00007f8195f69c45 in KFileItemModel::sort (this=0x1563ad0, begin=..., end=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1394
#15 0x00007f8195f69c45 in KFileItemModel::sort (this=0x1563ad0, begin=..., end=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1394
#16 0x00007f8195f69c45 in KFileItemModel::sort (this=0x1563ad0, begin=..., end=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1394
#17 0x00007f8195f69c45 in KFileItemModel::sort (this=0x1563ad0, begin=..., end=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1394
#18 0x00007f8195f70f29 in KFileItemModel::removeItems (this=0x1563ad0, items=...) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:971
#19 0x00007f8195f735ba in KFileItemModel::setNameFilter (this=0x1563ad0, nameFilter=<optimized out>) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:538
#20 0x00007f8196f323ed in DolphinViewContainer::setNameFilter (this=0x1382980, nameFilter=<optimized out>) at ../../../dolphin/src/dolphinviewcontainer.cpp:463
#21 0x00007f8196f33e60 in DolphinViewContainer::qt_metacall (this=0x1382980, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff729a8860) at ./dolphinviewcontainer.moc:145
#22 0x00007f8192ff3589 in QMetaObject::activate (sender=0x1680900, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff729a8860) at kernel/qobject.cpp:3566
#23 0x00007f8196f38072 in FilterBar::filterChanged (this=<optimized out>, _t1=<optimized out>) at ./filterbar.moc:91
#24 0x00007f8196f380e7 in FilterBar::qt_metacall (this=0x1680900, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff729a89d0) at ./filterbar.moc:77
#25 0x00007f8192ff3589 in QMetaObject::activate (sender=0x1683d70, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff729a89d0) at kernel/qobject.cpp:3566
#26 0x00007f8193df0772 in QLineEdit::textChanged (this=<optimized out>, _t1=<optimized out>) at .moc/release-shared/moc_qlineedit.cpp:264
#27 0x00007f8193df0a19 in QLineEdit::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qlineedit.cpp:140
#28 0x00007f8192ff3381 in QMetaObject::activate (sender=0x1684540, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff729a8b40) at kernel/qobject.cpp:3547
#29 0x00007f81940638c5 in QLineControl::textChanged (this=<optimized out>, _t1=<optimized out>) at .moc/release-shared/moc_qlinecontrol_p.cpp:148
#30 0x00007f8193df543b in QLineControl::finishChange (this=0x1684540, validateFromState=10, update=<optimized out>, edited=true) at widgets/qlinecontrol.cpp:660
#31 0x00007f8193df7a0d in QLineControl::processKeyEvent (this=0x1684540, event=0x7fff729a9900) at widgets/qlinecontrol.cpp:1879
#32 0x00007f8193dec809 in QLineEdit::keyPressEvent (this=0x1683d70, event=0x7fff729a9900) at widgets/qlineedit.cpp:1707
#33 0x00007f81947c05f9 in KLineEdit::keyPressEvent (this=0x1683d70, e=0x7fff729a9900) at ../../kdeui/widgets/klineedit.cpp:970
#34 0x00007f8193a23b78 in QWidget::event (this=0x1683d70, event=0x7fff729a9900) at kernel/qwidget.cpp:8397
#35 0x00007f8193deeda7 in QLineEdit::event (this=0x1683d70, e=0x7fff729a9900) at widgets/qlineedit.cpp:1524
#36 0x00007f81947bed6b in KLineEdit::event (this=0x1683d70, ev=0x7fff729a9900) at ../../kdeui/widgets/klineedit.cpp:1403
#37 0x00007f81939d32e4 in notify_helper (e=0x7fff729a9900, receiver=0x1683d70, this=0x115c7c0) at kernel/qapplication.cpp:4559
#38 QApplicationPrivate::notify_helper (this=0x115c7c0, receiver=0x1683d70, e=0x7fff729a9900) at kernel/qapplication.cpp:4531
#39 0x00007f81939d8825 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fff729a9900) at kernel/qapplication.cpp:4000
#40 0x00007f8194705bf6 in KApplication::notify (this=0x7fff729aa820, receiver=0x1683d70, event=0x7fff729a9900) at ../../kdeui/kernel/kapplication.cpp:311
#41 0x00007f8192fdef9c in QCoreApplication::notifyInternal (this=0x7fff729aa820, receiver=0x1683d70, event=0x7fff729a9900) at kernel/qcoreapplication.cpp:876
#42 0x00007f8193a743d9 in QKeyMapper::sendKeyEvent (keyWidget=0x1683d70, grab=<optimized out>, type=QEvent::KeyPress, code=66, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=56, nativeVirtualKey=98, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1866
#43 0x00007f8193a7484b in QKeyMapperPrivate::translateKeyEvent (this=0x11a7e40, keyWidget=0x1683d70, event=0x7fff729aa3e0, grab=false) at kernel/qkeymapper_x11.cpp:1836
#44 0x00007f8193a4f344 in QApplication::x11ProcessEvent (this=0x7fff729aa820, event=0x7fff729aa3e0) at kernel/qapplication_x11.cpp:3625
#45 0x00007f8193a78862 in x11EventSourceDispatch (s=0x115ee30, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#46 0x00007f818f2d2a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f818f2d3258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f818f2d3429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007f819300e53f in QEventDispatcherGlib::processEvents (this=0x11374a0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#50 0x00007f8193a784ee in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#51 0x00007f8192fddd82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#52 0x00007f8192fddfd7 in QEventLoop::exec (this=0x7fff729aa7b0, flags=...) at kernel/qeventloop.cpp:204
#53 0x00007f8192fe3067 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#54 0x00007f8196f38fb7 in kdemain (argc=5, argv=0x7fff729aad78) at ../../../dolphin/src/main.cpp:89
#55 0x00007f8196b7130d in __libc_start_main (main=0x400640 <main(int, char**)>, argc=5, ubp_av=0x7fff729aad78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff729aad68) at libc-start.c:226
#56 0x0000000000400671 in _start ()
Comment 4 Peter Penz 2012-04-16 12:10:52 UTC
Would it be possible that you attach a (hopefully) small zipped directory to this report where the crash occurs reliable? (e.g. please explain exactly what you typed)
Comment 5 Pascal d'Hermilly 2012-04-16 12:34:49 UTC
Hi Peter
It does not happen reliably. also, the folder is full of source-code that I'm not allowed to disclose.
My best idea is (like stated in original report) it happens when filtering in remote sftp directory with several subdirs open through "tree view".

It should probably be marked reopened..
Comment 6 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:20:00 UTC
Resetting assignee to default as per bug #305719
Comment 7 David Murray 2012-09-05 13:39:32 UTC
Created attachment 73673 [details]
New crash information added by DrKonqi

dolphin (2.1) on KDE Platform 4.9.00 using Qt 4.8.2

I've seen this crash happen shortly after the folder view tree becomes garbled, with directories pictured as hanging in mid air rather than under their parents.  In this particular example, the filesystem had just changed underneath Dolphin such that the directory it was viewing no longer existed.  It crashed when I refreshed the view in an attemt to get the folder view to re-sync with the filesystem.

-- Backtrace (Reduced):
#6  QUrlPrivate::parse (this=0x27c0640, parseOptions=QUrlPrivate::ParseAndSet) at io/qurl.cpp:3822
#7  0x00007f6efd1038aa in QUrl::path (this=0x7fffdd1d3140) at io/qurl.cpp:4882
#8  0x00007f6efd5cca1b in KUrl::path (this=<optimized out>, trailing=KUrl::LeaveTrailingSlash) at ../../kdecore/io/kurl.cpp:880
#9  0x00007f6eff72adbc in KFileItemModel::expandedParentsCountCompare (this=0x24b5940, a=0x3b2ed10, b=0x3bf2bb0) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1495
#10 0x00007f6eff72b0f2 in KFileItemModel::lessThan (this=0x24b5940, a=0x3b2ed10, b=0x3bf2bb0) at ../../../dolphin/src/kitemviews/kfileitemmodel.cpp:1295
Comment 8 Frank Reininghaus 2012-09-27 15:56:04 UTC
*** Bug 307484 has been marked as a duplicate of this bug. ***
Comment 9 Frank Reininghaus 2012-09-27 15:58:45 UTC
From bug 307484:

Reorganising files in a directory tree, moving from one folder to the more appropriate folders.
Just before the crash, the files that I had moved before were visible in as a tree above and disconnected from the real filesystem tree, like what comment 7 in bug #294616 describes.
Comment 10 Frank Reininghaus 2012-09-29 16:52:19 UTC
I've just spent some time looking at the code, and I can't really see how this crash can happen. I'm not even sure if comment 7 and bug 307484 really are duplicates.
Comment 11 David Murray 2012-09-29 17:09:06 UTC
(In reply to comment #10)
> I've just spent some time looking at the code...

Thanks for looking, though.  I haven't had it crash since, and neither can I provoke it by deleting the directory currently selected in the folder view from a different process.  I reported mainly in case the back trace helped.
Comment 12 bosyber 2012-09-30 10:32:43 UTC
(in reply to comment #10) (In reply to comment #10)
> I've just spent some time looking at the code, and I can't really see how
> this crash can happen. I'm not even sure if comment 7 and bug 307484 really
> are duplicates.

the description from comment 7 matched what I saw, but I didn't have much time to check the back trace of https://bugs.kde.org/show_bug.cgi?id=307484 - it didn't obviously look the same to me.

Haven't been able to reproduce either. It could be that memory pressure played a role, I had firefox with a lot of tabs open, skype, and then my wife asked me to scan something for her too.
Comment 13 Frank Reininghaus 2012-11-17 19:56:13 UTC
*** Bug 310256 has been marked as a duplicate of this bug. ***
Comment 14 Frank Reininghaus 2013-02-10 17:36:57 UTC
*** Bug 305283 has been marked as a duplicate of this bug. ***
Comment 15 Frank Reininghaus 2013-02-10 17:44:54 UTC
I have found a way to reproduce the problem now.

Create a folder structure with files:

mkdir a a/b a/b/c && touch a/1 a/b/1 a/b/c/1

Enter anything (except 1) in the filter bar -> only the folders remain in the view.

Then do the following in the Terminal Panel:

rm -rf a/b

Disable filter -> note the "free floating items" named "1" which should not be in the view any more. Note that this does not cause the crash yet - the crash happens in the comparison function which is used when sorting, and if the code path that triggers the crash is taken depends sensitively on the rest of the folder structure that is being viewed. However, it's a clear indication that the model is in an inconsistent state.

The problem is that the filtered child items are not removed from the model when their parent folder is removed -> should be fixed in KFileItemModel::slotItemsDeleted().
Comment 16 Frank Reininghaus 2013-02-10 17:56:53 UTC
I missed one step in my previous comment between "Create a folder structure" and "Enter anything in the filter bar":

Expand all folders.
Comment 17 Frank Reininghaus 2013-02-18 23:17:09 UTC
It turns out that I was wrong - the items which are "detached" from the tree structure after their parent has been removed and the crash are different issues. The former issue has been fixed for KDE 4.10.1 (see bug 315210).

However, this commit does not fix the crash that has been reported here. I still can't reproduce the crash, but it looks very much like it is caused by a flaw in the function KFileItemModel::expansionLevelsCompare(), where this crash occurs.

This function is responsible for determining the correct order in which expanded items and their parents are shown in the view. Unfortunately, it does that in a rather complicated way, which has already caused some other crashes. The main problem is that the function does temporarily move children before their parents in some corner cases, which causes problems later on because other parts of the class assume that children always come immediately after their parents in the model.

Therefore, I've written a new, much simpler function that handles this for KDE 4.11:

https://git.reviewboard.kde.org/r/108766/

This fixes another crash (bug 311947), and as far as I can tell, also a crash like the one in this report is impossible after the change. Even if I'm wrong, the backtrace would be completely different because the crashing function does not exist any more, and any crashes which happen when working heavily with expanded folders in KDE 4.11 should be reported in a new report (it might make sense to add a link to the new report here then).

Unfortunately, I don't see a good way to fix it during the KDE 4.10 cycle. The patch I've linked to above changes quite a lot of code, and I think that it should better get thorough testing before it is put into a stable release. We've seen much smaller patches for little bugs cause evil regressions in bug fix releases and new crashes which happened more often that the original crashes, and I really want to avoid that.

Thanks again for anyone who reported this crash and provided backtraces and other valuable information. In particular the hint about the items that are detached from the tree structure was good, because it helped to find and fix bug 315210.
Comment 18 fsanchez 2013-02-18 23:24:53 UTC
Thank you Frank, for all you work and effort.
Comment 19 David Murray 2013-03-17 16:49:57 UTC
Thanks Frank for your work on this.  Dolphin's proving to be a very nice file manager.
Comment 20 Frank Reininghaus 2013-03-21 10:22:52 UTC
*** Bug 317104 has been marked as a duplicate of this bug. ***