Bug 468573 - After restarting Kate, empty tabs appear "Untitled (2)", "Untitled (3)"...
Summary: After restarting Kate, empty tabs appear "Untitled (2)", "Untitled (3)"...
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 23.08.5
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-16 13:31 UTC by vujo
Modified: 2024-04-19 22:05 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
My settings Session (102.59 KB, image/jpeg)
2023-04-16 13:31 UTC, vujo
Details
kate-duplicated_tabs (20.65 KB, image/png)
2024-04-19 21:56 UTC, Piotr Mierzwinski
Details
kate_duplicate_Untilted (13.42 KB, image/png)
2024-04-19 22:05 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vujo 2023-04-16 13:31:55 UTC
Created attachment 158145 [details]
My settings Session

Hello.

STEP TO REPRODUCE
Settings: Session -> "Newly-created unsaved files"
1. Open Kate
2. File -> New (a new "Untitled" tab will appear)
3. Enter some text, for example "test message"
4. File -> Quit
5. Open Kate

OBSERVED RESULT
Another new clutch "Untitled (2)" has appeared, which is empty.
The previous tab "Untitled" contains our "test message" text.
If you repeat step 4 and 5:
4. File -> Quit
5. Open Kate
Then another empty tab "Untitled (3)" will appear, and so on.

EXPECTED RESULT
Empty tabs "Untitled (2)" ... "Untitled (3)" should not appear after restarting Kate.

SOFTWARE/OS VERSIONS
HardenedBSD 13.2 STABLE
GhostBSD-22.06.18 (FreeBSD 13.1)
KDE Plasma Version: 5.103
KDE Framework Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Settings: Session -> "Newly-created unsaved files"
Comment 1 _rs 2023-04-26 08:47:38 UTC
Bug is still there in the latest stable 23.04.0
Comment 2 vujo 2023-05-17 12:34:08 UTC
I confirm the problem on 23.04.0
Comment 3 vujo 2023-05-17 14:58:58 UTC
Tested on other distributions.

Problem not reproduced:
  - Kubuntu 22.04.2 (kubuntu-22.04.2-desktop-amd64.iso)
    Kate 21.12.3 (sudo apt install kate)

  - Lubuntu 22.10 (lubuntu-22.10-desktop-amd64.iso)
    Kate 22.08.2 (sudo apt install kate)

The problem has been reproduced:
  - Ubuntu-23.04 (ubuntu-23.04-desktop-amd64.iso)
    Kate 22.12.3 (sudo apt install kate)
    Kate 23.04.1 (sudo snap install kate --classic)
Comment 4 vujo 2023-08-12 11:21:05 UTC
I confirm the problem on Kate 23.04.1
FreeBSD 13.2-STABLE
Comment 5 vujo 2023-08-12 12:22:20 UTC
I forgot to add that in order to reproduce the problem correctly, you need to save the session.
Correct steps to reproduce the problem:

1) run Kate
2) Sessions -> Save Session -> "myName"
3) Settings -> Configure Kate -> Session ->
check the box "Load last used session"
check the box "Newly-created unsaved files"
check the box "Files with unsaved changes"
uncheck "Show welcome view for new windows"
-> OK
4) File -> New
5) Enter text: "test"
6) File -> Quit
7) run Kate

Repeat
6) File -> Quit
7) run Kate
Comment 6 vujo 2023-08-14 07:45:01 UTC
I confirm the problem on Kate 23.04.3
FreeBSD 13.2-STABLE
Comment 7 Kristian Rink 2023-11-16 11:26:17 UTC
Seems not related to FreeBSD. Same here (kate 22.12.3, Kubuntu 23.04).
Comment 8 vujo 2023-11-16 13:49:10 UTC
(In reply to Kristian Rink from comment #7)
> Seems not related to FreeBSD. Same here (kate 22.12.3, Kubuntu 23.04).

Yes, the problem is reproducible on different platforms.
Are you reproducing this problem?
Comment 9 Kristian Rink 2023-11-16 14:04:38 UTC
Yes I do.
Comment 10 vujo 2023-11-16 15:06:30 UTC
(In reply to Kristian Rink from comment #9)
> Yes I do.

Can you write your OS and version of kate?
Comment 11 Kristian Rink 2023-11-17 13:12:31 UTC
(In reply to vujo from comment #10)
> (In reply to Kristian Rink from comment #9)
> > Yes I do.
> 
> Can you write your OS and version of kate?

Hmm. kate 22.12.3, Kubuntu 23.04 - I think I already provided that above...?
Comment 12 Florine W. Dekker 2024-03-06 14:04:32 UTC
I can also reproduce the bug in Kate 23.08.1 on Debian Testing.
Comment 13 Florine W. Dekker 2024-03-06 14:11:34 UTC
Additionally, it looks like there's actually new "Untitled" files being created, since the number of files in the session increases each time Kate is restarted. The old files can be found using "Quick Open" (in menu as "Go > Quick Open", or use "Ctrl + Alt + O").
Comment 14 vujo 2024-03-06 14:40:02 UTC
I confirm the problem on Kate 23.08.4
FreeBSD 13.2-RELEASE-p4
Comment 15 vujo 2024-03-07 08:52:06 UTC
I was told that this problem occurs if you are in a document without a name when you close Kate.
Therefore, after closing and opening, Kate does not know this document and creates a new one.
A related issue is that if an untitled document is selected when closing, then the next time you open Kate you will have the new untitled document selected instead of navigating to any of the saved documents.
Comment 16 Sebastian 2024-04-09 14:03:19 UTC
Seeing the same issue on current Kubuntu 23.10 with Kate 23.08.1 as well as with newest Kate 23.08.4 snap.

The functionality to restore tabs with content for untitled documents was one of the great features of Kate, sad to see this not working anymore since about a year.
Comment 17 Piotr Mierzwinski 2024-04-19 21:56:16 UTC
Created attachment 168697 [details]
kate-duplicated_tabs

Confirm the problem. I attachment screen shot with my duplicated tabs.
I need to add, that I found this issue at December 2022, so almost 1.5 year ago, so in Plasma 5.x.
it's sad that till today nothing changed.
Comment 18 Piotr Mierzwinski 2024-04-19 22:05:12 UTC
Created attachment 168698 [details]
kate_duplicate_Untilted

Another screenshot ("kate_duplicate_Untilted") coming from Plasma 5:

KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

$ apt show kate
Package: kate
Version: 4:22.08.3+p22.04+tunstable+git20221201.0102-0
In "About" I can see: "Kate, Version 23.03.70"