Review Request 119718: Fix crash when restoring a session that was stored with Dolphin 4.13 or earlier

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Mon Aug 11 19:42:47 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119718/#review64298
-----------------------------------------------------------

Ship it!


Ship It!

- Emmanuel Pescosta


On Aug. 11, 2014, 6:54 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119718/
> -----------------------------------------------------------
> 
> (Updated Aug. 11, 2014, 6:54 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> 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 crash if session data that was stored with Dolphin 4.13 or earlier is available.
> 
> The problem is that this will 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.
> 
> In principle, we could try to add some code that detects if there is session data in the old format and reads it properly, but there isn't much time for proper testing left before 4.14.0 tagging (plus we would get merge conflicts in master), and I think that we should really fix this before 4.14.0, so I propose that we just don't restore the tabs if no session data in the new format is there.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/dolphintabpage.cpp 82be6d5 
> 
> Diff: https://git.reviewboard.kde.org/r/119718/diff/
> 
> 
> Testing
> -------
> 
> I wasn't able to test if this really fixes the bug, but I'm quite optimistic, and this will most likely not cause any new problems.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140811/81cff293/attachment.htm>


More information about the kfm-devel mailing list