Bug 508894 - Kate crashes when switching from a two window session to a one window session using the Manage Sessions dialog
Summary: Kate crashes when switching from a two window session to a one window session...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-29 12:02 UTC by herbert.kiehler
Modified: 2025-08-31 17:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description herbert.kiehler 2025-08-29 12:02:55 UTC
SUMMARY
When a session has two windows, one of those windows will crash Kate when using the Manage Sessions dialog to open a session that has only one window.

STEPS TO REPRODUCE
1. You need a Kate installation that has two sessions saved. Let's call them s1 and s2. These sessions can be empty (no files in them)
2. Open s1.
3. Open a new window (Ctrl+Shift+N)
4. In this new window open the Manage Sessions Dialog (Sessions > Manage Sessions ...) and open or double click s2. 

OBSERVED RESULT
Kate crashes.

EXPECTED RESULT
s2 opens.

SOFTWARE/OS VERSIONS
Kate: Version 25.11.70 from nightly AppImage
OS: Ubuntu 25.04
Comment 1 Christoph Cullmann 2025-08-30 16:54:00 UTC
Git commit 2ceea82c1ce18c0a10a5c0a299a29323b2974a6d by Christoph Cullmann.
Committed on 30/08/2025 at 16:53.
Pushed by cullmann into branch 'master'.

ensure we don't crash when the parent window is deleted

M  +7    -0    apps/lib/session/katesessionmanagedialog.cpp

https://invent.kde.org/utilities/kate/-/commit/2ceea82c1ce18c0a10a5c0a299a29323b2974a6d
Comment 2 Christoph Cullmann 2025-08-30 16:54:08 UTC
Thanks for the report!
Comment 3 Christoph Cullmann 2025-08-31 17:00:34 UTC
Git commit 0829905aabe057e2a1ae79a60845a8efd12f0594 by Christoph Cullmann.
Committed on 31/08/2025 at 17:00.
Pushed by cullmann into branch 'release/25.08'.

ensure we don't crash when the parent window is deleted


(cherry picked from commit 2ceea82c1ce18c0a10a5c0a299a29323b2974a6d)

Co-authored-by: Christoph Cullmann <christoph@cullmann.dev>

M  +7    -0    apps/lib/session/katesessionmanagedialog.cpp

https://invent.kde.org/utilities/kate/-/commit/0829905aabe057e2a1ae79a60845a8efd12f0594