Summary: | crash during filtering [ KFileItemModel::expansionLevelsCompare ] | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Pascal d'Hermilly <pascal> |
Component: | general | Assignee: | 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
Thanks for the report, this issue has been fixed in 4.8.1 :-) 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 () 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) 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.. Resetting assignee to default as per bug #305719 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
*** Bug 307484 has been marked as a duplicate of this bug. *** 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. 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. (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. (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. *** Bug 310256 has been marked as a duplicate of this bug. *** *** Bug 305283 has been marked as a duplicate of this bug. *** 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(). I missed one step in my previous comment between "Create a folder structure" and "Enter anything in the filter bar": Expand all folders. 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. Thank you Frank, for all you work and effort. Thanks Frank for your work on this. Dolphin's proving to be a very nice file manager. *** Bug 317104 has been marked as a duplicate of this bug. *** |