Summary: | Dolphin crashes on startup on invalid XML config file. | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kxmlgui | Reporter: | Abscissa <bus_kdezilla> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | CC: | elvis.angelaccio, kde, nate |
Priority: | NOR | ||
Version First Reported In: | 5.51.0 | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=400020 https://bugs.kde.org/show_bug.cgi?id=400228 |
||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Abscissa
2018-10-21 03:33:22 UTC
Please try to delete ~/.local/share/kxmlgui5/dolphin/dolphinui.rc Renaming that file does prevent the crash. I'll update the issue title accordingly. Note also, there's still the question of what messed up the file in the first place. I've never touched it. The contents of the file is included below. I looks to me like something (I would assume most likely Dolphin itself) must've done the following: 1. Loaded the file into a buffer. 2. Wrote a shorter version of the data into the same buffer. 3. Failed to correctly set the new shorter length of the buffer. 4. Wrote the newly-garbled buffer back out to disk. In any case, crashing on bad input is obviously a bug, too. ---------------------------- <!DOCTYPE kpartgui SYSTEM 'kpartgui.dtd'> <kpartgui name="dolphin" version="21"> <MenuBar> <Menu name="file"> <Action name="new_menu"/> <Action name="file_new"/> <Action name="new_tab"/> <Action name="file_close"/> <Action name="undo_close_tab"/> <Separator/> <Action name="renamefile"/> <Action name="movetotrash"/> <Action name="deletefile"/> <Separator/> <Action name="show_target"/> <Separator/> <Action name="properties"/> </Menu> <Menu name="edit"> <Action name="edit_select_all"/> <Action name="invert_selection"/> </Menu> <Menu name="view"> <Action name="sort"/> <Action name="view_mode"/> <Action name="additional_info"/> <Action name="show_preview"/> <Action name="show_in_groups"/> <Action name="show_hidden_files"/> <Separator/> <Action name="split_view"/> <Action name="split_stash"/> <Action name="redisplay"/> <Action name="stop"/> <Separator/> <Action name="panels"/> <Menu name="location_bar"> <text context="@title:menu">Location Bar</text> <Action name="editable_location"/> <Action name="replace_location"/> </Menu> <Separator/> <Action name="view_properties"/> </Menu> <Menu name="go"> <Action name="closed_tabs"/> </Menu> <Menu name="tools"> <Action name="show_filter_bar"/> <Action name="open_terminal"/> <Action name="compare_files"/> <Action name="change_remote_encoding"/> </Menu> </MenuBar> <ToolBar name="mainToolBar" alreadyVisited="1" noMerge="1"> <text context="@title:menu" translationDomain="dolphin">Main Toolbar</text> <Action name="go_back"/> <Action name="go_forward"/> <Action name="go_up"/> <Action name="reload"/> <Separator name="separator_0"/> <Action name="icons"/> <Action name="compact"/> </ToolBar> <State name="new_file"> <disable> <Action name="edit_undo"/> <Action name="edit_redo"/> <Action name="edit_cut"/> <Action name="edit_copy"/> <Action name="renamefile"/> <Action name="movetotrash"/> <Action name="deletefile"/> <Action name="invert_selection"/> <Separator/> <Action name="go_back"/> <Action name="go_forward"/> </disable> </State> <State name="has_selection"> <enable> <Action name="edit_cut"/> <Action name="edit_copy"/> <Action name="renamefile"/> <Action name="movetotrash"/> <Action name="deletefile"/> <Action name="invert_selection"/> </enable> </State> <State name="has_no_selection"> <disable> <Action name="edit_cut"/> <Action name="edit_copy"/> <Action name="renamefile"/> <Action name="movetotrash"/> <Action name="deletefile"/> <Action name="delete_shortcut"/> <Action name="invert_selection"/> </disable> </State> <ActionProperties scheme="Default"> <Action name="go_back" priority="0"/> <Action name="go_forward" priority="0"/> <Action name="go_up" priority="0"/> <Action name="go_home" priority="0"/> <Action name="stop" priority="0"/> <Action name="icons" priority="0"/> <Action name="compact" priority="0"/> <Action name="details" priority="0"/> <Action name="view_zoom_in" priority="0"/> <Action name="view_zoom_out" priority="0"/> <Action name="edit_cut" priority="0"/> <Action name="edit_copy" priority="0"/> <Action name="edit_paste" priority="0"/> </ActionProperties> </kpartgui> zoom_in"/> <Action priority="0" name="view_zoom_out"/> <Action priority="0" name="edit_cut"/> <Action priority="0" name="edit_copy"/> <Action priority="0" name="edit_paste"/> </ActionProperties> </kpartgui> ---------------------------- Splitting the corruption itself into a separate issue... The matter of "Dolphin suspected of corrupting its config file" is now reported as Bug 400228. Leaving this issue open as Dolphin crashing on bad XML input. Aren't both these issues in kxmlgui instead of Dolphin? Also related: Bug 400020. It's possible they all have the same root cause in KXMLGui... There is an abort() in kxmlgui if the xml file has a wrong syntax. There is nothing we can do to prevent the crash, as that file is used to build the whole GUI and must be correct. "There is an abort() in kxmlgui if the xml file has a wrong syntax." If that's true, then that's clearly a major shortcoming of kxmlgui. In this case, the correct course of action is not to mark this a non-bug, but rather to open an issue for kxmlgui to support optionally dealing with bad XML in a way other than crashing the entire application (see below) and to mark that issue as blocking this one. "There is nothing we can do to prevent the crash, as that file is used to build the whole GUI and must be correct." That is clearly not true. For example, kxmlgui can first be fixed to add optional support for handling bad XML in a way other than crashing, after which, Dolphin can be fixed to do any one or more of the following (and these are just off the top of my head): A. Present a dialog informing the user that ~/.local/share/kxmlgui5/dolphin/dolphinui.rc is malformed. Maybe even show some basic information about the error, such as line number. So the user actually knows what went wrong and why, and at least has some hope of doing something about it, rather than being left with what appears to be (and may as well be, from their perspective) a fatally broken piece of software. B. Start Dolphin anyway, using the default configuration Dolphin already uses when no dolphinui.rc is found. So the user can at least still use the application if they need to. C. (Maybe) Rename the corrupted dolphinui.rc to a backup name, so it doesn't continue to cause problems. *** Bug 400272 has been marked as a duplicate of this bug. *** Definitely a bug. We should handle this much better in KXMLGui. *** This bug has been marked as a duplicate of bug 400271 *** |