Bug 450756

Summary: Saving sessions manually twice - without opening new windows inbetween - deletes applications' session files
Product: [Plasma] ksmserver Reporter: Andreas Kilgus <kde>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: dap78, knill, Markus.Elfring, nate, plasma-bugs
Priority: NOR Keywords: regression
Version: 5.24.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.24.8 and 5.27
Attachments: Session files after user having saved sessions

Description Andreas Kilgus 2022-02-23 15:10:17 UTC
Created attachment 147075 [details]
Session files after user having saved sessions

SUMMARY
If you opt for manual session saving and save your current session twice (sometimes a third save will trigger the effect) without opening at least one new window between the saves, the individual session files of your current session's applications will be deleted (s. attachment), leaving "kwin_saved_by_user_" the only remaining session file. If you afterwards restore this session, e. g. all your dolphin windows will be reopened - but displaying the default directory, not the one they were presenting in your session (you thought to have saved).

STEPS TO REPRODUCE
1. Change session management to restore manually saved session
2. Open some windows
3. Save session
4. Have a look at ~/.config/session: kwin and serveral applications saved their state
5. Save session
6. Save session again (optionally, just to be sure you really saved ;) )
7. Logout
8. Login

OBSERVED RESULT
9. Your session is not completely restored, applications' states are lost

EXPECTED RESULT
All applications supporting this return to their previous state (browser showing URLs, okular displaying files, gwenview showing certain images, …).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Comment 1 Markus Elfring 2022-03-09 09:30:12 UTC
I am also curious how this issue will evolve further.
Comment 2 Manny 2022-10-07 18:56:08 UTC
(In reply to Markus Elfring from comment #1)
> I am also curious how this issue will evolve further.

I have the same issue on the latest ubuntu LTS,  plasma 5.24.6, framework 5.92.0. I only noticed the problem with konsole 21.12.3,
the session files are lost on the second "save", so windows come up on restart, but (for example) tab configuration is lost.
Comment 3 Roland Pallai 2023-01-09 11:38:14 UTC
This issue also exists in Fedora 37, plasma-workspace-5.26.4
Comment 4 Bug Janitor Service 2023-01-10 12:19:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2490
Comment 5 David Edmundson 2023-01-10 16:38:53 UTC
Git commit a5f0975900ad022308a24271374c16efafe14280 by David Edmundson, on behalf of Roland Pallai.
Committed on 10/01/2023 at 16:08.
Pushed by ngraham into branch 'master'.

Fix manual session saving

Seems like this bug have been introduced accidentally by 3558eca7
FIXED-IN: 5.27

M  +1    -0    ksmserver/logout.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/a5f0975900ad022308a24271374c16efafe14280
Comment 6 Nate Graham 2023-01-10 20:11:25 UTC
Git commit 77180fa249d2da3a5ccc2987f516041adf6b6417 by Nate Graham, on behalf of Roland Pallai.
Committed on 10/01/2023 at 20:11.
Pushed by ngraham into branch 'cherry-pick-a5f09759'.

Fix manual session saving

Seems like this bug have been introduced accidentally by 3558eca7
FIXED-IN: 5.27


(cherry picked from commit a5f0975900ad022308a24271374c16efafe14280)

M  +1    -0    ksmserver/logout.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/77180fa249d2da3a5ccc2987f516041adf6b6417