I just got this very bad bug. I cannot use kate to edit some files in the urxvt sources like scrollbar-rxvt.C If I do, Kate add some garbage at the end of the file. This garbage is visible in other editors like Vi or Nano, but not in Kate unless F5 is pressed. If I delete the garbage and save, it come back and more garbage is added. Could it be a missing \0 somewhere? Example file: return 1; } #endif /* RXVT_SCROLLBAR */ /*----------------------- end-of-file (C source) -----------------------*/ Turn into: return 1; } #endif /* RXVT_SCROLLBAR */ /*----------------------- end-of-file (C source) -----------------------*/ ------------*/ ---------------*/ Of course this doesn't compile and corrupt the file. Reproducible: Always Steps to Reproduce: 1. Download rxvt-unicode (urxvt) sources 2. Open that file in Kate 3. Make edits 4. Save 6. Press F5 Actual Results: Corrupted data Expected Results: File correctly saved I can reproduce with latest Git sources. Setting priority to "Grave" because the app is unusable for editing those files and there is corruption.
For me, the file is loaded with codec "ISO-8859-15" without encoding errors (see console output). Editing and saving the file works. Reloading the file shows the correct contents. So I cannot reproduce. Please attach the file you are encountering problems with. Please also specify the enconding the file is loaded with.
This still happen with many files. It eventually add some garbage, usually part of the last few lines. I have to remove them in vi then reload kate. It works for 5 minute then it happen again. Is there a way to valgrind kate? It SEGFAULT when I try. Given the randomness, it may by a stack corruption or something.
HI Emmanuel, valgrind casues segfault, because (most likely) of the bug in JS library the Qt4 is using. So to make kate run under valgrind you have to edit a source a little bit. Commenting out the KateScriptActionMenu::repopulate does the trick for me. Just a wild hunch... do you have static word wrap turned on?
Look like the same bug *** This bug has been marked as a duplicate of bug 323693 ***
Hi Emmanuel, did you tried the current version (which has the patch)? Is the problem gone?
I did. As for the bug, time will tell, so far so good! Thanks