Summary: | Dolphin crashes when comparing files without any files selected | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | nn.dm55 |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | emmanuelpescosta099 |
Priority: | NOR | Keywords: | drkonqi |
Version: | 2.2 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/42c26b155427b164c65b97faf8029aefdcddfd8a | Version Fixed In: | 4.11.3 |
Sentry Crash Report: | |||
Attachments: | Patch |
Description
nn.dm55
2013-10-01 18:58:20 UTC
Thanks for the bug report! I didn't know at all that it's possible to trigger actions from outside the application using DBus. Inside Dolphin, the action is always disabled if no files are selected, but it seems that we have to add some extra checks after the action has been triggered, or find out if there is a way to disable the trigger-action-via-DBus "feature". Aaaaargh - this is one of the moments when I really envy developers who work on systems like Windows and MacOS, which give users less freedom to mess things up in ways that the developers never intended :-( Created attachment 82610 [details]
Patch
Maybe my condemnation of the "trigger action via D-Bus" feature was a bit exaggerated - it turns out that rewriting the function DolphinMainWindow::compareFiles() in a crash-safe way makes the code much simpler :-)
> Created attachment 82610 [details]
Works fine. Great code :)
A "ship it" from my side!
Git commit 42c26b155427b164c65b97faf8029aefdcddfd8a by Frank Reininghaus. Committed on 13/10/2013 at 08:55. Pushed by freininghaus into branch 'KDE/4.11'. Fix crash when triggereing the "Compare files" action via D-Bus If the number of selected items is not two, Dolphin disables this action. However, it is still possible to trigger it via D-Bus, and this could cause a crash in DolphinMainWindow::compareFiles() because this function did not test at all if there are really two items selected. This patch adds such a check and simplifies the code in that function. FIXED-IN: 4.11.3 M +12 -39 dolphin/src/dolphinmainwindow.cpp http://commits.kde.org/kde-baseapps/42c26b155427b164c65b97faf8029aefdcddfd8a |