Bug 482206 - Kate crashes when closing a tab with a Rust file (and Rust Analyzer LSP) via KRunner and Baloo
Summary: Kate crashes when closing a tab with a Rust file (and Rust Analyzer LSP) via ...
Status: RESOLVED DUPLICATE of bug 482152
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi, qt6
Depends on:
Blocks:
 
Reported: 2024-03-02 02:48 UTC by Jonathan Lopes
Modified: 2024-03-03 17:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (130.62 KB, text/plain)
2024-03-02 02:48 UTC, Jonathan Lopes
Details
video reproducing the crash (1.36 MB, video/webm)
2024-03-02 02:57 UTC, Jonathan Lopes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lopes 2024-03-02 02:48:48 UTC
Application: kate (24.02.0)

Qt Version: 6.6.2
Frameworks Version: 6.0.0
Operating System: Linux 6.7.6-arch1-2 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.0.0 [CoredumpBackend]

-- Information about the crash:
I enabled Baloo indexing and wanted to try it out, so I searched for a text, more specifically "allow-hyphen", and pressed `Enter` on the first one that appeared. Kate launched but crashed after I tried to close the tab. I can see the following in the journal prior to its crash (after this is the core dump attached by Dr. Konqi):

> systemd[1884]: Started Kate - Advanced Text Editor.
> kate[554123]: kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeDark.colors"
> kwin_wayland[2318]: kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeDark.colors"
> baloorunner[554123]: KCrash: Application 'kate' crashing... crashRecursionCounter = 2

After a couple of more tries and carefully redoing my steps, I found a way to reproduce 100% of the time on my end. Here's how:

Have Rust Analyzer configured in Kate and open a random text file. In my case, I just created an empty file for the sake of simplicity, and left it unrelated to the project (outside the Rust project tree).

> touch random-text-file

Then open it, and with Kate still open, press Alt+F2 to bring KRunner and search for a text that is on a Rust project, then press `Enter` on the first result. As soon as Kate is brought to the foreground, try to close the tab, it'll crash. If it doesn't crash on the first attempt, try again with the same Kate instance running.

I recorded a video reproducing this problem. With OBS running, I never managed to get on the first try, but I always got on the second one (guess you need perfect timing).

It does not happen if there is no Kate instance running, and I also noticed that KRunner needs to be invoked twice to work sometimes, but this is beside the point.

I'll try to upload the video after submitting the report.

Things I tried:

- Different Rust projects: still crashes.
- Different LSPs: tried gopls and json, neither crashed.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  0x00007a4b77893c6a in operator== (p2=..., p1=...) at /usr/include/qt6/QtCore/qshareddata.h:202
#7  0x00007a4b79c2255f in DiagnosticsView::addMarks (item=0x6522898d68a0, doc=0x652288a02fd0, this=0x6522887f0570) at /usr/src/debug/kate/kate-24.02.0/apps/lib/diagnostics/diagnosticview.cpp:1044
#8  DiagnosticsView::addMarksRec (this=this@entry=0x6522887f0570, doc=doc@entry=0x652288a02fd0, item=0x6522898d68a0) at /usr/src/debug/kate/kate-24.02.0/apps/lib/diagnostics/diagnosticview.cpp:1088
#9  0x00007a4b79c221aa in DiagnosticsView::addMarksRec (this=this@entry=0x6522887f0570, doc=doc@entry=0x652288a02fd0, item=<optimized out>) at /usr/src/debug/kate/kate-24.02.0/apps/lib/diagnostics/diagnosticview.cpp:1090
#10 0x00007a4b79c221aa in DiagnosticsView::addMarksRec (this=this@entry=0x6522887f0570, doc=doc@entry=0x652288a02fd0, item=<optimized out>) at /usr/src/debug/kate/kate-24.02.0/apps/lib/diagnostics/diagnosticview.cpp:1090


Reported using DrKonqi
Comment 1 Jonathan Lopes 2024-03-02 02:48:50 UTC
Created attachment 166285 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Jonathan Lopes 2024-03-02 02:57:02 UTC
Created attachment 166286 [details]
video reproducing the crash
Comment 3 Christoph Cullmann 2024-03-03 17:41:45 UTC

*** This bug has been marked as a duplicate of bug 482152 ***