Bug 453716 - Kate sometimes crashes when closing a tab in a split view
Summary: Kate sometimes crashes when closing a tab in a split view
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.04.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-05-12 18:15 UTC by Matthew Trescott
Modified: 2022-05-26 02:37 UTC (History)
1 user (show)

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


Attachments
Kate session file that triggers the problem (10.82 KB, text/plain)
2022-05-12 18:17 UTC, Matthew Trescott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Trescott 2022-05-12 18:15:42 UTC
Application: kate (22.04.0)

Qt Version: 5.15.2
Frameworks Version: 5.93.0
Operating System: Linux 5.17.4-1-default x86_64
Windowing System: Wayland
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.24.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:

I opened my saved session, which contains four vertical panels using split view. In this saved session, the left two panes have the same file open (xtc1_boardctl.c) and no others. The second pane from the right has three tabs (from left to right: board.h, xtc1_boardctl.c, tm4c_bringup.c). The far-right pane has only tm4c_bringup.c.

I want to close the duplicate tabs in the second pane from the right, so I click the X on the tabs, first for tm4c_bringup.c, which closes normally. Then, I clicked the X on the tab for xtc1_boardctl.c, which caused Kate to crash.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault

[KCrash Handler]
#4  0x000055c5b2797b99 in KateViewSpace::closeDocument (this=0x55c5b5a76c00, doc=<optimized out>) at /usr/src/debug/kate-22.04.0-1.1.x86_64/kate/kateviewspace.cpp:491
#5  0x00007f5dae4e628e in QObject::event (this=0x55c5b5a76c00, e=0x7f5da0007830) at kernel/qobject.cpp:1314
#6  0x00007f5daf0a4b0f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55c5b5a76c00, e=0x7f5da0007830) at kernel/qapplication.cpp:3632
#7  0x00007f5dae4b9b5a in QCoreApplication::notifyInternal2 (receiver=0x55c5b5a76c00, event=0x7f5da0007830) at kernel/qcoreapplication.cpp:1064
#8  0x00007f5dae4bcb97 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55c5b4664a10) at kernel/qcoreapplication.cpp:1821
#9  0x00007f5dae511c33 in postEventSourceDispatch (s=0x55c5b46cbec0) at kernel/qeventdispatcher_glib.cpp:277
#10 0x00007f5dac646122 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#11 0x00007f5dac6464b8 in ?? () from /lib64/libglib-2.0.so.0
#12 0x00007f5dac64656f in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#13 0x00007f5dae5112b4 in QEventDispatcherGlib::processEvents (this=0x55c5b46ca610, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#14 0x00007f5dae4b855b in QEventLoop::exec (this=this@entry=0x7ffcbe62e9e0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#15 0x00007f5dae4c0820 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#16 0x000055c5b2765e14 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate-22.04.0-1.1.x86_64/kate/main.cpp:703
[Inferior 1 (process 3502) detached]

Possible duplicates by query: bug 453454, bug 453234, bug 453227, bug 453152, bug 452808.

Reported using DrKonqi
Comment 1 Matthew Trescott 2022-05-12 18:17:39 UTC
Created attachment 148774 [details]
Kate session file that triggers the problem
Comment 2 Waqar Ahmed 2022-05-13 17:31:44 UTC
Git commit 7b249cfeb4402679b96f3d363573820d431bca29 by Waqar Ahmed.
Committed on 13/05/2022 at 06:42.
Pushed by cullmann into branch 'master'.

Fix tab closing with multiple viewspaces

Sometimes a viewspace has only view available but multiple docs (and
tabs for those docs).

M  +22   -5    apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/commit/7b249cfeb4402679b96f3d363573820d431bca29
Comment 3 Matthew Trescott 2022-05-26 02:37:28 UTC
That was quick! Thank you!