Bug 456240 - Kate crash on split view "Document close" (double free or corruption)
Summary: Kate crash on split view "Document close" (double free or corruption)
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: Git
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-02 13:26 UTC by Yerrey Dev
Modified: 2022-07-02 19:32 UTC (History)
1 user (show)

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


Attachments
Traceback (32.13 KB, text/plain)
2022-07-02 13:26 UTC, Yerrey Dev
Details
Better traceback with more debug symbols (54.58 KB, text/plain)
2022-07-02 13:33 UTC, Yerrey Dev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yerrey Dev 2022-07-02 13:26:02 UTC
Created attachment 150337 [details]
Traceback

SUMMARY

When attempting to "close document" on a split tab, you crash with an "double free or corruption (out)" error. Backtrace attached.

STEPS TO REPRODUCE
1. Open any document, can be empty. 
2. In the top right corner hit the split button and choose "Split Vertical"
3. On the new opened split, right click the tab header and choose "Close Document"

OBSERVED RESULT
Kate crashes.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kate version: Latest Kate master (aa4d2a03ad3e17938565b5a06aec2f158c281b8e)
Comment 1 Yerrey Dev 2022-07-02 13:33:51 UTC
Created attachment 150338 [details]
Better traceback with more debug symbols
Comment 2 Christoph Cullmann 2022-07-02 19:10:31 UTC
I can reproduce, I think we need to use a single shot to call the closeTabRequest inside the menu, else we do delete stuff during event handling.
Comment 3 Christoph Cullmann 2022-07-02 19:31:28 UTC
Git commit d273c1fb6b322c78896a6f3aeb04fda8181264c3 by Christoph Cullmann.
Committed on 02/07/2022 at 19:28.
Pushed by cullmann into branch 'master'.

fix crash on "close document" in menu of tabs

avoid to delete this during event handling

M  +9    -2    apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/commit/d273c1fb6b322c78896a6f3aeb04fda8181264c3
Comment 4 Christoph Cullmann 2022-07-02 19:32:19 UTC
Thanks for the good report including nice back trace!

Highly appreciated!