SUMMARY I have set KDiff3 as my default merge tool for Git. When a conflict occurs, the STEPS TO REPRODUCE 1. Start resolving a conflict using git's mergetool command with KDiff3 as the merge tool. 2. Resolve the conflicts and attempt to save the file. 3. Attempt to save the merged file. OBSERVED RESULT You will receive an error message stating: "Error while writing". This does not happen with every save, but most of the time. EXPECTED RESULT The file should save without an error. SOFTWARE/OS VERSIONS Windows: Windows 11 Enterprise 23H2 macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION This has only become an issue with the newest version of KDiff3. Older versions worked just fine. I am using a virtual hard drive mounted to my system as the F: drive, which has not been a problem in the past.
The fix is at https://invent.kde.org/sdk/kdiff3/-/commit/09b2adaa9e4dc89d02d6cff1e387408d5c5e2dbe it arrived just ahead the switch to 1.12 branch for releases. It should apply cleanly to 1.11.5.
*** This bug has been marked as a duplicate of bug 486782 ***
wrong bug and bugzila doesn't support deleting comment.
I think I see what caused this will attempt a fix shortly.
Git commit 27ffe00cbeb7f8d742e31591a94a62528007ec2c by Michael Reeves. Committed on 07/02/2025 at 23:24. Pushed by mreeves into branch '1.12'. Errors produced during merge encoding should be ingnored This restores the original behavoir. FIXED: 1.12.1 M +2 -3 src/mergeresultwindow.cpp https://invent.kde.org/sdk/kdiff3/-/commit/27ffe00cbeb7f8d742e31591a94a62528007ec2c
Git commit 08b39c11545ee73b0c2bfd487b22c67a87200361 by Michael Reeves. Committed on 07/02/2025 at 23:23. Pushed by mreeves into branch 'master'. Errors produced during merge encoding should be ingnored This restores the original behavoir. FIXED: 1.12.1 M +2 -3 src/mergeresultwindow.cpp https://invent.kde.org/sdk/kdiff3/-/commit/08b39c11545ee73b0c2bfd487b22c67a87200361
Just updated to version 1.12.1 of KDiff3. The save error message is no longer occurring, but a new, more severe issue is now happening. When performing a 3-way merge to resolve a conflict, the merged content appears to save, but instead of saving, all content in the file is removed. This has happened twice, forcing me to revert to an older version.
Please open a new bug for the save failing. This bug can referenced there as the that change made her may be related.
Encoding of the data stream is failing in the question is why? For stable it is not possible to add a separate error string for this due to string freeze. Master has this implemented. Erroring seems the better of the two options. Previously this situation would have been ignored. Qt dropped there custom codecs when going to Qt6.
What are your encoding settings?
Going push a stop gap fix to 1.12 to prevent merges from being saved if the encoding error flag is triggered. Not the complete answer but will prevent data loss until I can sort out what is happening in full. Master has a separate warning dialog for encoding errors which still should not be causing a blank file.
This patch to 1.12 will produce a error message in the event of encoding failure. A console message will generated if encoding fails to produce an data. With 1.12 GUI messages can't be added so I will look what else I can do.
1.12 should now work as expected. The next release will introduce a unique message for when an encoding error happens. This message will implement a "Don't show again" feature for those who don't want it. Be prepared to check the resulting file when this warning is show as indicates possible substitution of invalid code points. This is done a the discretion of the underlining text codec.