Bug 443026

Summary: segmentation fault when switching Git branches with clangd C++ LSP
Product: [Applications] kate Reporter: Be <be.0>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: christoph, waqar.17a
Priority: NOR    
Version First Reported In: 21.08.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 21.12.0
Sentry Crash Report:
Attachments: backtrace of the crash

Description Be 2021-09-27 18:20:08 UTC
Created attachment 141959 [details]
backtrace of the crash

STEPS TO REPRODUCE
1. Open C++ file
2. Switch Git branches

OBSERVED RESULT
Kate crashes

EXPECTED RESULT
Kate does not crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 34
KDE Plasma Version: 5.85.0
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Refer to the attached backtrace. There seems to be an infinite (or extremely deep) loop.
Comment 1 Waqar Ahmed 2021-09-27 20:54:47 UTC
Reproducible for me if there is some text in the filter line edit of the project tree.
Comment 2 Christoph Cullmann 2021-10-03 18:55:12 UTC
https://invent.kde.org/utilities/kate/-/merge_requests/491

should be fixed
Comment 3 Be 2021-10-03 22:26:47 UTC
Thanks for the quick fix! I confirm this is fixed in the master branch. I am glad I took the time to report the bug with a backtrace.
Comment 4 Christoph Cullmann 2021-10-09 21:22:16 UTC
Git commit 3086b3af21639a8fcb39effde22aa67549674a1a by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 09/10/2021 at 21:21.
Pushed by cullmann into branch 'lsp2clipboard'.

Fix infinite recursion in project filter model

M  +10   -1    addons/project/kateprojectfiltermodel.h

https://invent.kde.org/utilities/kate/commit/3086b3af21639a8fcb39effde22aa67549674a1a
Comment 5 Be 2021-10-12 02:07:31 UTC
Unfortunately I am still getting this crash with the master branch (commit 82bb95cbbfe3f58639f35dce57582b52ee6b06ed).
Comment 6 Waqar Ahmed 2021-10-12 02:28:22 UTC
Have a backtrace?

Can't reproduce anymore.
Comment 7 Waqar Ahmed 2021-12-07 05:50:43 UTC
Fixed in 21.12. Please reopen if it still crashes.