Summary: | Crash during 200 package upgrade (KDE backports) | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Joe <josephj> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | Keywords: | investigated, regression |
Priority: | NOR | ||
Version: | 4.13.2 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/cb04f335cbe1b9b2bdbd754a77a4335f8e605e06 | Version Fixed In: | 4.14.0 |
Sentry Crash Report: |
Description
Joe
2014-08-11 09:24:25 UTC
Thanks for the bug report! According to the backtrace, Dolphin tried to restore a saved session when the crash happened. The format in which the information about saved sessions is saved has changed between 4.13 and 4.14. Unfortunately, it seems that this can cause a crash if Dolphin 4.14 tries to load a data file that has been stored by Dolphin 4.13. It might be too late to add some code that checks if data in the old format is available and reads it properly (4.14.0 is tagged in only two days), but maybe we can at least fix the crash. I think that checking if the QByteArray that stores a tab's state is empty and simply not doing anything in that case should be sufficient (the current code unfortunately does somehting that causes a crash then because everything, including the m_primaryViewActive variable, is initalized to false if the QByteArray is empty, and the 'else' branch of the "if (m_primaryViewActive)" statement tries to access m_primaryViewContainer, which is null because the local variable "isSplitViewEnabled" in DolphinTabPage::restoreState(const QByteArray& state) is also false). Git commit cb04f335cbe1b9b2bdbd754a77a4335f8e605e06 by Frank Reininghaus. Committed on 12/08/2014 at 07:08. Pushed by freininghaus into branch 'KDE/4.14'. Fix crash when restoring a session stored with Dolphin 4.13 or earlier Since DolphinTabPage::saveState() and DolphinTabPage::restoreState(const QByteArray& state) save and restore the state of each tab in a different format than DolphinMainWindow did before the refactoring, we can run into problems: the first time a user logs into a session that has Dolphin 4.14, Dolphin might read session data that does not contain the QByteArray that DolphinTabPage wants to read the data from. In restoreState, isSplitViewEnabled will thus have the value false, and no secondary view will be created. Later on, m_primaryViewActive will also be set to false, but the else branch of the following "if (m_primaryViewActive)" then tries to activate the secondary view, which does not exist -> we get a crash. The easiest solution is to not restore the tab state if no session data in the new format is found. REVIEW: 119718 FIXED-IN: 4.14.0 M +4 -0 dolphin/src/dolphintabpage.cpp http://commits.kde.org/kde-baseapps/cb04f335cbe1b9b2bdbd754a77a4335f8e605e06 Glad it helped. I have tried to submit crash reports many times in the past. This is the first time the install packages for debugging option actually worked. I still had to file it manually because I got my password wrong and there was no way to reenter it. I even logged on to the bugs website in another browser tab. On 08/11/2014 07:11 AM, Frank Reininghaus wrote: > https://bugs.kde.org/show_bug.cgi?id=338187 > > Frank Reininghaus <frank78ac@googlemail.com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Keywords| |investigated, regression > Ever confirmed|0 |1 > Severity|normal |crash > Status|UNCONFIRMED |CONFIRMED > > --- Comment #1 from Frank Reininghaus <frank78ac@googlemail.com> --- > Thanks for the bug report! > > According to the backtrace, Dolphin tried to restore a saved session when the > crash happened. The format in which the information about saved sessions is > saved has changed between 4.13 and 4.14. Unfortunately, it seems that this can > cause a crash if Dolphin 4.14 tries to load a data file that has been stored by > Dolphin 4.13. > > It might be too late to add some code that checks if data in the old format is > available and reads it properly (4.14.0 is tagged in only two days), but maybe > we can at least fix the crash. > > I think that checking if the QByteArray that stores a tab's state is empty and > simply not doing anything in that case should be sufficient (the current code > unfortunately does somehting that causes a crash then because everything, > including the m_primaryViewActive variable, is initalized to false if the > QByteArray is empty, and the 'else' branch of the "if (m_primaryViewActive)" > statement tries to access m_primaryViewContainer, which is null because the > local variable "isSplitViewEnabled" in DolphinTabPage::restoreState(const > QByteArray& state) is also false). > |