Summary: | Dolphin crashed when creating a new tab when current tab's URL is man:/ | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | V字龍(Vdragon) <Vdragon.Taiwan> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | walch.martin |
Priority: | NOR | Keywords: | drkonqi |
Version: | 4.13.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/4b4cbf5d9ac1e3b9eed9c258edbfbb4fe12df4fe | Version Fixed In: | 4.13.2 |
Sentry Crash Report: | |||
Attachments: | Possible fix (a unit test should also be added though) |
Description
V字龍(Vdragon)
2014-06-01 23:47:39 UTC
*** This bug has been marked as a duplicate of bug 329494 *** (In reply to comment #1) > > > *** This bug has been marked as a duplicate of bug 329494 *** Can you please double check this? Bug #329494 says "FIXED-IN: 4.13.0" while this bug report is against 4.13.0. Accordingly something is inconsistent. I see four possibilities that would explain this: * the version number in this bug report is wrong * the "FIXED-IN" version of #329494 is wrong * this is not really a duplicate of bug #329494 * bug #329494 has not been completely fixed (well, …or I have a wrong understanding of the "FIXED-IN" field) @Jekyll Wu @walch.martin Hi, > *** This bug has been marked as a duplicate of bug 329494 *** Currently I don't see much similarity on these two bug reports, I'm not running any activities over the CWD of Dolphin. > * the version number in this bug report is wrong The version number is reported by Dr.Konqi and is indeed 4.13.0 There's another people in the community(https://plus.google.com/118409732640227044376/posts/WvfijVNrpZK) using 4.13.1 can reproduce this issue, so I revert the status back to original. Thanks for the bug report! I can confirm the problem. (In reply to comment #0) > #17 0x00007f7d3de17895 in KDirLister::itemsDeleted (this=<optimized out>, > _t1=...) at ./kdirlister.moc:308 It's a bit weird that the man kioslave reports that items are deleted when we open a new tab, but this seems unrelated to the actual cause of the crash. I see the same crash when opening man:, then opening the filter bar with Ctrl+I, and pressing 'a'. Created attachment 86966 [details]
Possible fix (a unit test should also be added though)
For some reason, the man: kioslave adds multiple items with the same URL (for example, I have two items with the name '_exit' here when I view man:).
When opening a new tab, the kioslave reports some items as deleted (I do not know why). The problem is that some of the duplicate items are also reported as deleted, and then KFileItemModel tries to remove them twice. This corrupts the internal data structures and finally causes a crash.
I don't know why man: behaves as it does, but we should definitely not let Dolphin crash if a kioslave misbehaves. The solution is to remove duplicates from the list of deleted items.
We should definitely add a unit test for this problem though. Should be quite straightforward, I'll look into it.
*** This bug has been marked as a duplicate of bug 329494 *** @Jekyll Wu Hi, I wondered why you kept marking this bug as a duplicate of an already-fixed-in-previous-versions-of-Dolphin bug? My patch from comment 5 still had a bug. An updated patch, including new tests, it at https://git.reviewboard.kde.org/r/118507/ Git commit 4b4cbf5d9ac1e3b9eed9c258edbfbb4fe12df4fe by Frank Reininghaus. Committed on 04/06/2014 at 19:48. Pushed by freininghaus into branch 'KDE/4.13'. Fix possible crash if a kioslave adds multiple items with the same URL When opening the URL "man:", there are multiple items with the same name (for example, _exit is shown twice here). When opening a new tab, the kioslave reports some items as deleted (I have not quite understood why). The problem is that it reports some of the duplicate items twice in the list of deleted items. This confused KFileItemModel and corrupted the internal data structures, and finally, caused a crash. The fix is to remove all duplicates from KItemRangeList::fromSortedContainer(const Container& container). New unit tests included. REVIEW: 118507 FIXED-IN: 4.13.2 M +35 -1 dolphin/src/kitemviews/kfileitemmodel.cpp M +9 -1 dolphin/src/kitemviews/kitemrange.h M +7 -0 dolphin/src/tests/CMakeLists.txt M +22 -0 dolphin/src/tests/kfileitemmodeltest.cpp A +75 -0 dolphin/src/tests/kitemrangetest.cpp [License: GPL (v2+)] http://commits.kde.org/kde-baseapps/4b4cbf5d9ac1e3b9eed9c258edbfbb4fe12df4fe I confirmed that this bug is fixed in 4.13.2, thanks! |