Bug 450778

Summary: crash when closing all documents on macOS and Windows
Product: [Applications] kate Reporter: Jyrki Gadinger <nilsding>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: christoph
Priority: NOR    
Version First Reported In: 21.12.2   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: backtrace from lldb on macOS

Description Jyrki Gadinger 2022-02-23 23:36:47 UTC
Created attachment 147088 [details]
backtrace from lldb on macOS

SUMMARY
Whenever Kate needs to close all documents and there is more than one document currently open, it crashes on at least macOS and Windows (it works fine on Linux).
I noticed this while trying to switch to a different session.

STEPS TO REPRODUCE
1. Open Kate
2. create some blank documents via Cmd+N (macOS) or Ctrl+N (Windows)
3. from the "File" menu select "Close All", confirm the dialog with clicking on "Continue".

OBSERVED RESULT
On macOS and Windows: Kate crashes
On Linux: no crash, all previously open documents are closed, and a single new document is open.

EXPECTED RESULT
Same as on Linux: no crash, all previously open documents are closed, and a single new document is open.

SOFTWARE/OS VERSIONS
Windows: Windows 11 21H2 (OS Build 22000.527)
macOS: macOS 12.2.1 (21D62)
Linux/KDE Plasma: n/a
(available in About System)
KDE Plasma Version: n/a
KDE Frameworks Version: 5.92.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
The Windows build used is the one from the Microsoft store (21.12.2).
The macOS build used for generating the backtrace was compiled from source (latest master), but I could reproduce this crash with a 21.12.2 release build from the binary factory too.
The Linux build I used for testing this was compiled from source (latest master) too.
Comment 1 Bug Janitor Service 2022-02-24 06:03:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/635
Comment 2 Christoph Cullmann 2022-03-05 18:23:49 UTC
I think this should now be fixed.