| Summary: | Kate crashes in KateProjectTreeViewContextMenu::exec when creating a new file in the directory tree when a parent directory only has a subdirectory | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Valentin <vlttnv> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | kdedev |
| Priority: | NOR | Keywords: | drkonqi, regression |
| Version First Reported In: | 25.12.0 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/-/commit/e9558e051bd65e57bf59fa5e290f1d952353b600 | Version Fixed/Implemented In: | 23.06.70 |
| Sentry Crash Report: | https://crash-reports.kde.org/organizations/kde/issues/334269/events/ce563a5f7a804c5aad7c3d5f11750049/ | ||
| Attachments: | screenshot of the directory before the crash | ||
|
Description
Valentin
2025-12-23 19:40:04 UTC
Created attachment 187913 [details]
screenshot of the directory before the crash
This is how the tree looks before the crash. I right click on "1" which is the child directory of "chapters".
I can reproduce this on Fedora 43 with Kate 25.12.0 Notably, creating a folder with no files, and just a folder under it shows a blank line as if it wants to show a file, but there of course isn't a filename. This UI seems to be new after 25.08.3. In Kate built from git-master 26.03.70, I see the same UI but cannot reproduce the crash I am also not able to reproduce this on Kate 25.08.3 The directory browser on the left looks different. It doesn't show the empty directory and its subdirectory in the same line as `directory/1` It shows the subdirectory on its own line like this: directory | 1 It looks like a regression was introduced after 25.08.3 that is now fixed in git-master. If you can still reproduce this crash when your system updates Kate to 26.x, please reopen this report. Thanks! . Git commit e9558e051bd65e57bf59fa5e290f1d952353b600 by Waqar Ahmed, on behalf of leia uwu. Committed on 24/12/2025 at 18:05. Pushed by waqar into branch 'release/25.12'. project-plugin: fix tree view crash `activeFlattenedPathItem` returns -1 for invalid paths which is then used to index a QList... (cherry picked from commit 6a0e4bda1bd48c1997a0430d6f1eb339229b4b81) M +1 -1 addons/project/kateprojectviewtree.cpp https://invent.kde.org/utilities/kate/-/commit/e9558e051bd65e57bf59fa5e290f1d952353b600 |