Summary: | assert when changing view mode via "View Mode" menu, but not via toolbar | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Jonathan Marten <jjm> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | adawit |
Priority: | NOR | ||
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/af5a796edddefb08f9d7c02068a6e891a327b25a | Version Fixed In: | 4.12.1 |
Sentry Crash Report: |
Description
Jonathan Marten
2013-07-22 13:05:45 UTC
I cannot reproduce this no matter what I tried. I guess you have a viewmode whose action name does not end with "-viewmode". Can you add a debug statement just above the Q_ASSERT to see the actual action name that causes this? That is if you still hit this assert today. Have done some more investigating and the crash depends on exactly how the mode is switched in the GUI. It also does not necessarily involve File Size View, so have changed bug title to better reflect the cause. Start Konqueror in file browsing mode, with toolbars visible. Go to menu Settings - Configure Toolbars and select the "Dolphin Toolbar <dolphinpart>" toolbar, confirm that it contains three actions "Icons", "Compact" and "Details". Switch between view modes using these three actions in the toolbar. There is no crash. Adding a kDebug() just before the assert indicates that slotViewModeTriggered() is *not* being called here. Select "Compact", then go to menu View - View Mode. Observe that the check state here may not reflect that actually shown in the view; for example, on the first startup of Konqueror "Icons" is checked here even though the view mode was set to "Compact" above. Select one of the "Icons", "Details" or "Compact" modes in this menu, crash. Here slotViewModeTriggered() is called and the action name (for either of these 3 modes) is "dolphinpart". I do see that the sync view mode menu items are not in sync with what is selected in the toolbar, but switching to any of the other view modes listed in that menu still does cause a crash for me. I will see if I can fix the out sync issue. Patch that fixes the crash for me, and keeps the menu entries in sync, is at https://git.reviewboard.kde.org/r/114924/ (In reply to comment #4) > Patch that fixes the crash for me, and keeps the menu entries in sync, is at > https://git.reviewboard.kde.org/r/114924/ That is one way to fix it, but the more simpler fix is to actually fix the part that David forgot to update when he committed the patch for another crash. See For the record, though I cannot reproduce the crash, I can see how you could hit that Q_ASSERT. Basically when actions for a service like the dolphinpart that provides several views, we do not append "-viewmode" to the objectname we use. Hence, when you change the view from the toolbar the checked action in the "View->View Mode" menu is never updated because the check in slotInternalViewModeChanged() only matches object names that end with "-viewmode". The fix is to append "-viewmode" to the object names. Forgot the link in previous reply: https://git.reviewboard.kde.org/r/114926/ Git commit af5a796edddefb08f9d7c02068a6e891a327b25a by Dawit Alemayehu. Committed on 09/01/2014 at 13:10. Pushed by adawit into branch 'KDE/4.12'. Append "-viewmode" to object name of actions associated with services that provide multiple views. FIXED-IN: 4.12.1 REVIEW: 114926 M +1 -1 konqueror/src/konqmainwindow.cpp http://commits.kde.org/kde-baseapps/af5a796edddefb08f9d7c02068a6e891a327b25a |