Bug 474460

Summary: Kate looses open file list on crashes
Product: [Applications] kate Reporter: heikki
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: waqar.17a
Priority: NOR    
Version First Reported In: 22.12.3   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description heikki 2023-09-12 19:45:16 UTC
When my computer crashes, Kate forgets what files I had open. Since I run my computer 24/7, and work on many files, it bothers me that I have to re-open most of them after a crash. (Not that I crash very often, a few times a year)

STEPS TO REPRODUCE
1. Start Kate. 
2. Open a few files
3. Close Kate to save the open file list
4. Open Kate again
5. Open a few more files
6. Crash the computer. It is enough to exit KDE with CTRL-ALT-BACKSPACE. Killing Kate, even with -9 is not enough.
7. Restart the computer. KDE restores the state of most other windows all right. Kate starts too

OBSERVED RESULT
Kate's open file list is as in step 3 above, without the files opened in step 5

EXPECTED RESULT
Kate's open file list should reflect the changes in step 5

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Kate seems to save the list of open files on exit (or kill). It would not cost much to save it also whenever I open a file, or maybe when I press Ctrl-L to save all modified files.
Comment 1 heikki 2023-09-12 20:36:12 UTC
I don't quite agree with the Importance: "Normal, Crash", since Kate is not crashing at all in this scenario. The issue only manifests itself when recovering a session after my computer crashes.
Comment 2 Waqar Ahmed 2023-09-12 20:38:48 UTC
Please try a newer version of Kate. We have tried to improve this behavior