Bug 336676

Summary: When Kate doesn't shut down properly, all "Open Recent" items are lost
Product: [Applications] kate Reporter: Kubuntiac <user581>
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, ilmari.lauhakangas, justin.zobel, KDE, lak16, mklapetek, valdikss, waqar.17a
Priority: NOR    
Version First Reported In: 3.13.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch on KDE/4.14 branch lists recent files after Kate crash

Description Kubuntiac 2014-06-24 17:15:25 UTC
Hi there,

DESCRIPTION:
I love Kate. (Thankyou!) I use it for everything. That's why it's always open on my computer. Because I never close Kate, the only time it gets closed tends to be when my system crashes. The trouble is that Kate only seems to save the items listed in "Open Recent" when it closes (properly).

Because I never tend to close Kate (without a system crash) the items in my "Open recent" are usually months old. This makes "Open recent" - which is vital to me in most applications- virtually useless.


EXPECTED:
When restarting Kate, even after a crash, that "Open Recent" will still list the most recently opened documents.

ACTUAL:
All of the most recently opened items since last closing properly are lost.



Reproducible: Always

Steps to Reproduce:
1. Open a document
2. Crash Kate (Ctrl+Alt+Esc and click will do nicely)
3. Reopen Kate
Actual Results:  
Most recent document since last clean close are lost.

Expected Results:  
Most recently opened items are remembered.
Comment 1 lak16 2014-12-09 06:35:43 UTC
Can reproduce on Kate 3.14.3
Comment 2 lak16 2014-12-09 18:25:16 UTC
Created attachment 89885 [details]
Patch on KDE/4.14 branch  lists recent files after Kate crash

This simple patch applies to KDE/4.14 branch and seems to fix this bug when closing Kate using xkill (Ctrl+Alt+Esc and Click). Haven't tested if it works when crashing because of other reasons.
Comment 3 Buovjaga 2016-06-19 14:21:35 UTC
lak16: please submit the patch to the KDE review board: https://community.kde.org/Infrastructure/Review_Board
Comment 4 Kubuntiac 2016-08-11 01:18:48 UTC
Any progress on the review?
Comment 5 Christoph Cullmann 2018-08-17 21:34:12 UTC
*** Bug 358553 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2019-03-24 21:48:17 UTC
I can't reproduce with Kate 18.12.3 on Arch Linux.
Comment 7 Justin Zobel 2020-10-25 07:28:26 UTC
Can confirm still an issue on 20.08.1.

Opened 3 documents, used Ctrl Alt Esc and killed kate.

Reopened and none of the documents are in the recents list.

Are we able to get the patch adjusted for current code and put onto invent.kde.org for review?
Comment 8 Waqar Ahmed 2023-02-26 11:39:18 UTC
Kate now tries to save session config every 5 seconds whenever a doc opens or closes. This should resolve the problem. (upcoming release v23.04)