SUMMARY Data loss / file deletion when attempting to set a signature from pre-existing file for (default?) identity. STEPS TO REPRODUCE 1. Settings > Configure KMail 2. Accounts > Identities > Modify... 3. Edit Identity > Signatures > Enable signature is ticked 4. Obtain from: File 5. Select a file. 6. Now here I can't remember whether I hit OK, Cancel or Edit file OBSERVED RESULT Data loss, the file is deleted. Some output from terminal: QFSFileEngine::open: No file name specified org.kde.pim.kidentitymanagement: Failed to open "" : "No file name specified" command= "kwrite %U" args= ("kwrite %U", "file:///home/chris/sigs/CallMeLess") EXEC "/usr/bin/kwrite /home/chris/sigs/CallMeLess" EXEC done sleeping... org.kde.pim.messagecore: Serious mailing list header parsing error! org.kde.pim.messagecore: Serious mailing list header parsing error! qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 15797, resource id: 117440574, major code: 130 (Unknown), minor code: 3 qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 15800, resource id: 117440574, major code: 130 (Unknown), minor code: 3 qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 15803, resource id: 117440574, major code: 130 (Unknown), minor code: 3 about to delete "/home/chris/sigs" containing "CallMeLess" EXPECTED RESULT File is not deleted. File gets added to the bottom of new messages using that identity. SOFTWARE VERSIONS (available in About System) KDE Plasma Version: 5.14.2 KDE Frameworks Version: 4.51.0 Qt Version: 5.11.2 ADDITIONAL INFORMATION
I don't understand your bug. So which file do you select ? Do you select a real file ? if not what do you lose ? Regards
Created attachment 116040 [details] curious dialog Maybe the report is about that. I'm getting this after selecting a file, pressing edit, modify, save an close the text editor
(In reply to Christophe Giboudeaux from comment #2) > Created attachment 116040 [details] > curious dialog > > Maybe the report is about that. > > I'm getting this after selecting a file, pressing edit, modify, save an > close the text editor I can't show this error. What is your editor ? (here it's kate)
kwrite is used here
nothing special in the KMail output: 9:22:21 - kioexec(24820) - KIOExec::KIOExec: command= "kwrite %U" args= ("kwrite %U", "file:///home/krop/testsig2.txt") [ksycoca stuff] 9:22:21 - kioexec(24820) - KIOExec::slotRunApp: EXEC "/data/kde/inst/bin/kwrite /home/krop/testsig2.txt" After closing the editor: 9:23:47 - kioexec(24820) - KIOExec::slotRunApp: EXEC done
(In reply to Laurent Montel from comment #1) > I don't understand your bug. > So which file do you select ? > Do you select a real file ? > if not what do you lose ? > > Regards I selected a short text file that I had in the folder. It is a real file, simple text format. That file is deleted.
(In reply to Christophe Giboudeaux from comment #2) > Created attachment 116040 [details] > curious dialog > > Maybe the report is about that. > > I'm getting this after selecting a file, pressing edit, modify, save an > close the text editor I didn't see that dialogue, so I believe it is unrelated to the issue I've reported. (At least in terms of steps I took)
I played with this a little , and while I couldn't cause the file to be deleted, I was able to find some things that can be improved: 1) the openfile dialog should filter on .txt files. so people like me don't mistakenly use huge .pdf files :) 2) limit the signature to at most 10? lines so huge files don't cause new composer slowness
(In reply to Allen Winter from comment #8) > I played with this a little , and while I couldn't cause the file to be > deleted, I was able to find some things that can be improved: > > 1) the openfile dialog should filter on .txt files. so people like me don't > mistakenly use huge .pdf files :) I fixed it this morning (master only) > 2) limit the signature to at most 10? lines so huge files don't cause new > composer slowness It seems to be a good idea to make a limitation. I will investigate it.
(In reply to Allen Winter from comment #8) > 2) limit the signature to at most 10? lines so huge files don't cause new > composer slowness I don't recommend changing this, some companies *love* lengthy signatures
(In reply to Christophe Giboudeaux from comment #10) > (In reply to Allen Winter from comment #8) > > > 2) limit the signature to at most 10? lines so huge files don't cause new > > composer slowness > > I don't recommend changing this, some companies *love* lengthy signatures I added just a warning about big text. I don't limit it.
Using kmail2 version 5.21.3 SUMMARY *** I auto-generate my email signature file on login (see lines above) so its up to date. I went to the configure signature stab and the "Specify File" box has my file name there correctly. I pressed "Edit File" and it loaded "kate" and my file quite happily. I then closed "kate" without editing the file in any way and the file is deleted from my file system. I get the same result of a deleted file even if i edit the file and save it in the "kate Edit File" session *** STEPS TO REPRODUCE 1. Select Identity in Accounts/Identities box 2. Click <Modify> 3. Select Signature tab 4. Click <Edit File> next to signature file to edit my signature file (3 lines long) 5. Either edit file and save in Kate or just exit without any actions. 6. The signature file should still exist after exit from kate OBSERVED RESULT Signature file deleted after exiting kate even if saved within kate EXPECTED RESULT Signature file should still exist with any modifications made after exiting kate SOFTWARE/OS VERSIONS opensuse:tumbleweed:20221129 Qt: 5.15.7 KDE Frameworks: 5.100.0 - KDE Plasma: 5.26.3 - kwin 5.26.3 kmail2 5.21.3 (22.08.3) - - Kernel: 6.0.8-1-default - kernel-firmware-radeon 20221109 ADDITIONAL INFORMATION - running from cli kmail Running on wayland. Qt WebEngine will disable usage of the GPU. Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND environment variable before running this application, but this is not recommended since this usually causes applications to crash. qt.qpa.wayland: Wayland does not support QWindow::requestActivate() QWidget::setLayout: Attempting to set QLayout "" on QGroupBox "", which already has a layout qt.qpa.wayland: Wayland does not support QWindow::requestActivate() kf.kio.widgets.kdirmodel: No node found for item that was just removed: QUrl("file:///home/seeker/.RELEASE_LEVELS.kate-swp")
Coinfirmed with current Git master. This happens because SignatureConfigurator::slotEdit() calls job->setDeleteTemporaryFile(true). This should not be done, it is telling the job that the file specified is a temporary file and therefore should be deleted (after a delay of 3 minutes) when the editor is closed. If the file URL is remote, KIO will handle downloading it to a temporary file and deleting the local copy afterwards itself.
A possibly relevant merge request was started @ https://invent.kde.org/pim/kidentitymanagement/-/merge_requests/18
Git commit 9150359070370ae43897c01e94cb0a523676c2d2 by Jonathan Marten. Committed on 03/02/2023 at 15:31. Pushed by mlaurent into branch 'master'. Signature editor: Do not specify that the edit file is temporary Specifying this explicitly means that the user's signature file will be deleted (after a delay) after editing it. Let KIO handle the decision itself. M +0 -1 src/widgets/signatureconfigurator.cpp https://invent.kde.org/pim/kidentitymanagement/commit/9150359070370ae43897c01e94cb0a523676c2d2
Git commit dc2a9a84c5dd65579555b794b8409257784b5119 by Laurent Montel, on behalf of Jonathan Marten. Committed on 04/02/2023 at 07:13. Pushed by mlaurent into branch 'release/22.12'. Signature editor: Do not specify that the edit file is temporary Specifying this explicitly means that the user's signature file will be deleted (after a delay) after editing it. Let KIO handle the decision itself. (cherry picked from commit 9150359070370ae43897c01e94cb0a523676c2d2) M +0 -1 src/widgets/signatureconfigurator.cpp https://invent.kde.org/pim/kidentitymanagement/commit/dc2a9a84c5dd65579555b794b8409257784b5119