| Summary: | The save file on exit dialogue does not respect the choice of discarding changes to a file | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Filip <flipflop> |
| Component: | sessions | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | christoph, john.kizer |
| Priority: | NOR | ||
| Version First Reported In: | 24.12.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Filip
2025-01-09 12:05:15 UTC
Hmmm, that seems strange, could you check if Kate did crash on shutdown? It seems that kate closes gracefully when I click "Discard". I don't see any traces of crash in the logs. $ journalctl --since "1 min ago" | grep -i kate Jan 12 11:28:09 vivo kate[11964]: kate.time: QApplication initialized in 80 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> katefiletreeplugin load in 1 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> katesearchplugin load in 4 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> kateprojectplugin load in 0 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> externaltoolsplugin load in 0 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> katekonsoleplugin load in 0 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> lspclientplugin load in 2 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> tabswitcherplugin load in 0 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: -> textfilterplugin load in 0 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: All plugins loaded in 10 ms Jan 12 11:28:09 vivo kate[11964]: libkate.time: Created KateMainWindow in 55 ms Jan 12 11:28:09 vivo kate[11964]: kate.time: KateApp initialized in 124 ms Jan 12 11:28:33 vivo systemd[1103]: Started Kate - Advanced Text Editor. Jan 12 11:28:33 vivo kate[12019]: kate.time: QApplication initialized in 76 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> katefiletreeplugin load in 1 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> katesearchplugin load in 4 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> kateprojectplugin load in 0 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> externaltoolsplugin load in 0 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> katekonsoleplugin load in 0 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> lspclientplugin load in 2 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> tabswitcherplugin load in 0 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: -> textfilterplugin load in 0 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: All plugins loaded in 11 ms Jan 12 11:28:33 vivo kate[12019]: libkate.time: Created KateMainWindow in 55 ms Jan 12 11:28:33 vivo kate[12019]: kate.time: KateApp initialized in 111 ms Jan 12 11:28:42 vivo systemd[1103]: app-org.kde.kate@31cc4d0b96734b45a0639d05bef1313e.service: Consumed 392ms CPU time, 68.4M memory peak. Hi - I can't reproduce using those steps on Kate 24.12.1, Fedora KDE 41. I wonder if, perhaps, some other session-related setting is interacting with the one you specified? The settings I have that are nearby in the Configure Kate > Session dialog are below - could you please share yours to double-check? Application Startup Behavior: Manually choose a session Automatically save and restore: Newly-created unsaved files (yes), Files with unsaved changes (no) Show welcome view for new windows: Yes Close the application entirely when the last file is closed: No Close documents with the window they belong to: Yes I've updated Kate to v24.12.1 and I'm still having this issue My settings are almost the opposite of what you have though: Application Startup Behavior: Load last used session Automatically save and restore: Newly-created unsaved files (no), Files with unsaved changes (no) Show welcome view for new windows: No Close the application entirely when the last file is closed: Yes Close documents with the window they belong to: Yes Btw I've just retested with your settings above, and I'm still seing the issue, so it must be something else Also just to emphasize: There is no issue when I close the tab of the unsaved file. Clicking "Discard" in that case works as expected. I'm facing the issue only when I close the whole application while the file is still unsaved. (In reply to Filip from comment #6) > Also just to emphasize: There is no issue when I close the tab of the > unsaved file. Clicking "Discard" in that case works as expected. I'm facing > the issue only when I close the whole application while the file is still > unsaved. Yep, that's how I closed it as well - and I tried changing my Session settings to yours, and still couldn't reproduce it - so indeed, something else is going on! I also reset my kate settings to default (by removing $HOME/.config/katerc), which did not fix the issue either. I was thinking that maybe there is some sort of race condition that makes kate close before it could remove the kate-swp file. But then the issue should also be present when I click "Save" on exit. However in that case, kate (saves the edited file and) removes the kate-swp file with no issues. So I'm now out of ideas what could cause this. |