SUMMARY Dolphin automatically crashes every time I try to start it. STEPS TO REPRODUCE 1. Start dolphin. 2. It crashes. (Before a dolphin window is displayed) 3. OBSERVED RESULT It crashes. Before a dolphin window is displayed. EXPECTED RESULT Not crashing. SOFTWARE VERSIONS (available in About System) KDE Plasma Version: 5.14.1-1 KDE Frameworks Version: 5.51.0-1 Qt Version: 5.11.2-1 ADDITIONAL INFORMATION Problem also occurred on Dolphin 18.08.1. The last version I had installed before that did work correctly, however, it had been awhile since I'd updated so I have no idea what version that was. Crash report: ------------------------------------------ Application: Dolphin (dolphin), signal: Aborted Using host libthread_db library "/usr/lib/libthread_db.so.1". [Current thread is 1 (Thread 0x7f1505f56800 (LWP 1876))] Thread 3 (Thread 0x7f1503541700 (LWP 1878)): #0 0x00007f150fb12c21 in poll () from /usr/lib/libc.so.6 #1 0x00007f150af7dee0 in ?? () from /usr/lib/libglib-2.0.so.0 #2 0x00007f150af7dfce in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #3 0x00007f150dc73fe4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #4 0x00007f150dc1f8cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #5 0x00007f150da68eb9 in QThread::exec() () from /usr/lib/libQt5Core.so.5 #6 0x00007f150dec5ba6 in ?? () from /usr/lib/libQt5DBus.so.5 #7 0x00007f150da72f65 in ?? () from /usr/lib/libQt5Core.so.5 #8 0x00007f150be55a9d in start_thread () from /usr/lib/libpthread.so.0 #9 0x00007f150fb1db23 in clone () from /usr/lib/libc.so.6 Thread 2 (Thread 0x7f150476a700 (LWP 1877)): #0 0x00007f150fb12c21 in poll () from /usr/lib/libc.so.6 #1 0x00007f150ab93630 in ?? () from /usr/lib/libxcb.so.1 #2 0x00007f150ab952db in xcb_wait_for_event () from /usr/lib/libxcb.so.1 #3 0x00007f1505ae4c5a in ?? () from /usr/lib/libQt5XcbQpa.so.5 #4 0x00007f150da72f65 in ?? () from /usr/lib/libQt5Core.so.5 #5 0x00007f150be55a9d in start_thread () from /usr/lib/libpthread.so.0 #6 0x00007f150fb1db23 in clone () from /usr/lib/libc.so.6 Thread 1 (Thread 0x7f1505f56800 (LWP 1876)): [KCrash Handler] #6 0x00007f150fa59d7f in raise () from /usr/lib/libc.so.6 #7 0x00007f150fa44672 in abort () from /usr/lib/libc.so.6 #8 0x00007f150f19679a in KXMLGUIClient::setXML(QString const&, bool) () from /usr/lib/libKF5XmlGui.so.5 #9 0x00007f150f197222 in ?? () from /usr/lib/libKF5XmlGui.so.5 #10 0x00007f150f1b97ab in KXmlGuiWindow::createGUI(QString const&) () from /usr/lib/libKF5XmlGui.so.5 #11 0x00007f150f1ba5bc in KXmlGuiWindow::setupGUI(QSize const&, QFlags<KXmlGuiWindow::StandardWindowOption>, QString const&) () from /usr/lib/libKF5XmlGui.so.5 #12 0x00007f150f1ba68c in KXmlGuiWindow::setupGUI(QFlags<KXmlGuiWindow::StandardWindowOption>, QString const&) () from /usr/lib/libKF5XmlGui.so.5 #13 0x00007f150fc31e47 in ?? () from /usr/lib/libkdeinit5_dolphin.so #14 0x00007f150fc26484 in kdemain () from /usr/lib/libkdeinit5_dolphin.so #15 0x00007f150fa46223 in __libc_start_main () from /usr/lib/libc.so.6 #16 0x000055e9adeb805e in _start () [Inferior 1 (process 1876) detached]
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 ***