Summary: | Crash when opening folder in new tab | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Christoph Feck <cfeck> |
Component: | general | Assignee: | Peter Penz <peter.penz19> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | dpalacio, frank78ac |
Priority: | NOR | Keywords: | reproducible |
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.6.0 |
Description
Christoph Feck
2010-08-05 00:42:40 UTC
Hm, reminds me a bit of bug 180494 - the "active" state of the URL navigator and the view is not equal. It's strange that the crash does not happen when you just open a new tab (e.g., via Ctrl-T). I'll try to have a look. I think that bug 246701 is due to the same bug in the code: If asserts are disabled, there's no crash, but the new tab does not show the contents of the clicked folder, but the home folder. The tab title shows the clicked folder though. *** Bug 246701 has been marked as a duplicate of this bug. *** The bug is due to the call setSearchModeEnabled(isSearchUrl(url)); in the DolphinViewContainer constructor. After that call, the URL of the view and the URL navigator are set to the home URL. Commenting out that line fixes the crash and the "wrong folder shown" issue for me. Thanks Frank for investigating into the root cause! I'll have a look on this during this week... I think the problem in DolphinViewContainer::setSearchModeEnabled(bool enabled) is that m_urlNavigator->goHome() is called if m_searchBox->setSearchPath(url) yields an invalid URL. This is the case here because the search mode was never enabled. That case should somehow be considered, but I'll leave that up to you - I'm not really familiar with the search stuff ;-) The cause of the crash seems to be: 1. In DolphinMainWindow::openNewTab(const KUrl& url), the line "viewTab.primaryView->setActive(false);" deactivates both the navigator and the view. 2. After that, the view (but not the navigator) gets activated by DolphinViewContainer::requestFocus(), which gets invoked by a timer from DolphinViewContainer::slotUrlNavigatorLocationChanged. 3. The view is active now, but the navigator not -> assert. The reason why that happens only in the "open this folder in a new tab" case and not if the current tab is duplicated via Ctrl-T is probably that the new tab is focused in the latter case, but not in the former. I'm not sure if this second issue which leads to the crash might be worth a fix of it's own - maybe it could lead to similar crashes in the future. SVN commit 1164862 by ppenz: Fix triggering of an assertion, if a new tab is opened. Thanks to Frank Reininghaus for the detailed analyses! BUG: 246747 FIXED-IN: 4.6.0 M +5 -3 dolphinviewcontainer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1164862 |