Since the last upgrade to KDE 4.10.1 I noticed that kwrite started to create a swap file even if it is disabled activating the option: Configure KWrite> Open/Save> Advanced> "Disable swap files syncing". Now I upgraded to 4.10.2 and the bug persists. I saw an another bug report on the KDE's bugzilla (Bug 309753) but, since it was marked as fixed, I decided to create a new report. This bug makes programs as Dropbox to run crazy, since every letter it tries to sync the swap. Maybe It could be useful also to add another option for running these swap files in a different location, for example a folder in the home directory (it could be: /home/user/.kde4/share/apps/katepart/swap/) Thanks! Reproducible: Always
Sorry, I meant that Bug 258897
If you read "Disable swap file syncing" carefully, you'll notice that it's about disabling the syncing of the swap files. It's NOT about disabling swap files, see also https://bugs.kde.org/show_bug.cgi?id=317799. Kate syncs all swap files each 15 seconds to disk. If you enable the option, it never forces syncing the swap files to disk.
Well, ok I understood the option, nevertheless it syncs every character (more than every second) even with the option activated.
Then please follow http://kate-editor.org/get-it/ and try again :) Thanks!
Do you mean I should recompile it from source? I tried on an another pc, anyway it is again with Sabayon (Gentoo with binary packages), and I found the same behaviour: could this be a problem of the precompiled package? Is there any log I can attach?
Yes, recompile from sources just as I said by following http://kate-editor.org/get-it/ Afterwards you can delete the ~/kde folder again and your system remains untouched. No, there is no log.
Did it. I have some problems running the final script (run.sh): kbuildsycoca4 running... kbuildsycoca4(17253) VFolderMenu::loadDoc: Parse error in "/home/alex/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line 1 , col 1 : "unexpected end of file" kbuildsycoca4(17253) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file. kbuildsycoca4(17253) KConfigGroup::readXdgListEntry: List entry x-scheme-handler/webcal in "/home/alex/.local/share/applications/mimeapps.list" is not compliant with XDG standard (missing trailing semicolon).
You can ignore all the kbuildsycoca4 warnings. So I assume kate starts? If so, does it work as expected?
It does not start; alex@aspire7738G ~/kde $ ./run.sh kate kbuildsycoca4 running... kbuildsycoca4(19190) KConfigGroup::readXdgListEntry: List entry x-scheme-handler/webcal in "/home/alex/.local/share/applications/mimeapps.list" is not compliant with XDG standard (missing trailing semicolon). kate: error while loading shared libraries: libkdeinit4_kate.so: cannot open shared object file: No such file or directory I am doing something wrong...
I used this and it runs: ./run.sh kwrite The swap "furious" syncing persist
If you relpace something with replace all, do you get a fading in and out animation of the replaced items? I'm just wondering whether the correct kate instance is started.
I am not sure of this, but doing a replace all, i get a green banner that says: "n replacement have been made" and the things replaced become green. But I don't see any transition or animation. But, is this option for syncing working properly on your side?
Is this in the view, or below the view?
I tried to do a snapshot, but whenever I open knsapshot the green band goes out... The green band is just under the text and over the replace window (it is on the text area)
Did you make install? It's the wrong Kate, I'm 100% sure: The text should say "N replacements made" and not "N replacements have been made". Either you forgot make install, or even make did not work...
I did it. I retry everything, maybe something will change... And it says: "N replacements have been made"
It can't be. Does the file ~/kde/usr/bin/kwrite exist? What does `./run.sh which kwrite` say?
Does the file ~/kde/usr/bin/kwrite exist? Yes, but in few minutes i will have the new one (i redid everything) and I will try ./run.sh which kwrite
Are you sure your run.sh is correct? Did you copy & paste it or write it manually? What does ./run.sh echo $LD_LIBRARY_PATH say?
Recompiled everything: the same behaviour. alex@aspire7738G ~/kde $ ./run.sh which kwrite kbuildsycoca4 running... kbuildsycoca4(32135) KConfigGroup::readXdgListEntry: List entry x-scheme-handler/webcal in "/home/alex/.local/share/applications/mimeapps.list" is not compliant with XDG standard (missing trailing semicolon). /home/alex/kde/usr/bin/kwrite I did Copy and paste: #!/bin/bash export KATE_DIR=~/kde/usr export PATH=$KATE_DIR/bin:$PATH export LD_LIBRARY_PATH=$KATE_DIR/lib:$LD_LIBRARY_PATH export KDEDIR=$KATE_DIR export KDEDIRS=$KDEDIR export XDG_DATA_DIRS=$XDG_DATA_DIRS:$KATE_DIR/share # update KDE's system configuration cache kbuildsycoca4 # start app $@ alex@aspire7738G ~/kde $ ./run.sh echo $LD_LIBRARY_PATH kbuildsycoca4 running... kbuildsycoca4(32419) KConfigGroup::readXdgListEntry: List entry x-scheme-handler/webcal in "/home/alex/.local/share/applications/mimeapps.list" is not compliant with XDG standard (missing trailing semicolon). (It leaves a blank space)
Heh, for me it's also blank, so no idea whether this should say something. Anyways, now replace all says "N replacements made"?
Anyways, now replace all says "N replacements made"? No: "N replacements have been made" Phew...
Ok, I just got another idea. Where is your katepart.so file? Maybe it's in ~/kde/usr/lib64 instead of ~/kde/usr/lib? If so, you have to change run.sh to: LD_LIBRARY_PATH=$KATE_DIR/lib64
That was the problem! Now kate works, but the swap problem persist. Now I have to go, I'll look at tomorrow if there is something more. Thanks!
PS. There is"N replacement made"
Sorry, lost sight of this. Back to the initial issue you had, does it now sync as expected?
No, it still keeps the swap synced. Nothing changed there.
After each character or every 15 seconds? With what options did you mount your partition?
And, does it work if you modify part/swapfile/kateswapfile.cpp as follows: void SwapFile::finishEditing () { [...] // format: qint8 m_stream << EA_FinishEditing; // m_swapfile.flush(); // <----------- comment this line } Then recompile in the build folder by invoking `make install` and then run kate/kwrite again?
After each character and using the option "Disable swap files syncing" checked. I mount the partition with: /dev/sda2 /media/disk ntfs-3g noexec, noatime, defaults 0 0 I will try your edit, just a moment since I have to download the source ad patch it.
Tried and it solves the problem only partially (well, more or less what I was asking). With the option checked or not it behaves in the same way: the first character written creates the swap file and then the swap file it is never refreshed any more. I think this behaviour could be good only with the check box set, while the previous when unset.
Ok. A bit of research results in the following theory: ntfs-3g supports caching but is known to lead to bugs or (interestingly) poor performance. I'm not sure of this, but may it be that caching is disabled by default for the ntfs-3g file system driver? In that case, each flush() always writes do disk. Was the other system you encountered this issue also on ntfs-3g? You could try with the mount option nosync, have no idea what happens then, though ;) Bottom line is: I really do not think this is a Kate issue, therefore I'll soon close this issue as solved.
The same happens on ext4, I checked the swap file using "tail -f"
As a workaround, could you implement a checkbox to completely avoid the use of a swap file?
Ok, when writing to a file and listing the contents e.g. with tail -f, it does not necessarily mean that the file is already physically written to disk. Probably it's all cached, and therewith this is simply not really an issue. Or to put it differently: I can't add any valuable information here anymore. This report grew too long for now, and it basically comes down to "add an option to disable swap files entirely". This is the same as bug #321135, which is by far shorter. So I'll close as duplicate. *** This bug has been marked as a duplicate of bug 321135 ***
Thank you for the time involved. Fundamentally yes, at this point it is not really an issue of kate. Well, so I will wait for that option. Alex