Bug 478698 - As was happening about 6 months back the active session is being erased on every run of the app.
Summary: As was happening about 6 months back the active session is being erased on ev...
Status: REOPENED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 23.08.4
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-18 20:16 UTC by craigdaymon
Modified: 2024-12-23 14:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description craigdaymon 2023-12-18 20:16:30 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Configure to open last session on startup.
2. Open several files in Kate
3. Save the session
4. Close Kate
5. Open Kate back up.

OBSERVED RESULT

You should be seeing things just as they were when you closed it, but instead the window is sized to a minimum and all files have been cleared from the session. The only workaround I have found is to create duplicates of the session and next time I open Kate, delete the now emptied session and select one of the duplicates.

Suggestion, as this has happened before: Add testing of session preservation to the testing. It strikes me that this is really something once written should never need to be changed, yet it has.


EXPECTED RESULT


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

ADDITIONAL INFORMATION
Comment 1 craigdaymon 2023-12-20 23:32:44 UTC
The bug is different but essentially the same.  Starting up today I was presented with a dialog showing saved sessions. I have 5 files I keep open in Kate. All sessions showed 5 files. The settings I set were to open the last opened session, since I was seeing the dialog it is clear this did not happen. I selected the I wanted to use (though fact is most are just backups to protect against this issue). It was empty. So I selected one of the backups and then deleted the previously working session. After selecting a different session, the number of associated files did change for the default, which now was showing one file. (Maybe a version change list, didn't explore it.)

Kate v23.08.4, Arch Linux (x86_64)
Comment 2 Christoph Cullmann 2024-10-21 19:06:13 UTC
We tried to improve the session saving in the last few releases. Please try the current version.
Comment 3 craigdaymon 2024-10-21 21:27:48 UTC
Hello Christoph,

   Thanks for the response.

   I am using the current version. I do frequent system updates.

   That being said, the most recent version has a different issue. The 
session files all open when restarted, but for years the behavior was 
that the files would open and scroll automatically taking the cursor to 
the place it was last time the file was open. That is no longer the 
case, they now open with the cursor on the first character of the first 
line. Also, the order of the open files (tabs) was maintained. Now the 
last edited file/tab is presented as the right-most file/tab. I have 
several files that are over 10,000  lines and the files I have open in 
my session are ones that relate to each other, so their order, and 
ideally placement of their tab, was a reason for choosing Kate for my 
text editing.

   But thanks for all the work you and the others have put into this editor.

Regards,

Craig Daymon

On 10/21/24 2:06 PM, Christoph Cullmann wrote:
> https://bugs.kde.org/show_bug.cgi?id=478698
>
> Christoph Cullmann <christoph@cullmann.io> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|REPORTED                    |NEEDSINFO
>                   CC|                            |christoph@cullmann.io
>           Resolution|---                         |WAITINGFORINFO
>
> --- Comment #2 from Christoph Cullmann <christoph@cullmann.io> ---
> We tried to improve the session saving in the last few releases. Please try the
> current version.
>
Comment 4 Bug Janitor Service 2024-11-05 03:46:42 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 craigdaymon 2024-11-07 00:01:39 UTC
Not sure exactly what additional information you need.

My main file is well over 10,000 lines. I add to the end of the file. When I save, it use to be that on reopening Kate the session would open all the files previously opened. Each file would also have a cursor location exactly where it was when the file was last saved. Now the files all open with the cursor position for each on the first character of the first line.

Also, the tab order problem remains. For example:

Tabs in their desired order:

 [File 1][File 2][File 3][File 4][File 5]

I make changes to File 3, save the file and also to File 1 and save it as well, after 3 was saved. Save the files, close Kate. When I open Kate back up, the order of the tabs is:

 [File 2][File 4][File 5][File 3][File 1]
Comment 6 Christoph Cullmann 2024-11-23 16:04:39 UTC
The tab order should be fixed with the upcoming 24.12, we did other fixes there, too.
Comment 7 Andreas Hartmetz 2024-12-23 14:58:08 UTC
I have this bug, happens in maybe 5-10% of logins, and it started happening after switching from X11 to Wayland FWIW. Some kind of shutting down the session / killing apps / turning off power too quickly seems like a probable cause.
The sessions not only lose all open files, but also the set of active plugins, UI config such as sidebar and toolbars, etc.