I've edited one of existing report templates (Income and Expenses By Year). After that I pressed Ctrl+S and it caused application to crash. What is worse my .kmy file become 0 bytes in size (luckly I had fresh backup). It happens every time I try to reproduce it. Reproducible: Always Steps to Reproduce: 1. edit Income and Expenses By Year report template 2. save kmy file 3. crash
Git commit 8319120b9c810574beb0de97fc44e49315de058d by Christian Dávid. Committed on 24/03/2016 at 20:30. Pushed by christiand into branch 'frameworks'. Changed way of saving files which should fix some bugs The save operation seems to fail every time - it never changed the orginal file and never reported any issues. I did not find the exact reason for this bug but I am quite sure it was caused by an incorret usage of QSaveFile (under some circumstances close() instead of commit() was called). Now KMyMoney creates its own temporary file to write to (if needed). This also works using KGpgFile, which should fix Bug 356399. The remove() and rename() operations are not atomic which is not so good as this could result in dataloss if the first operation fails. However, this is the best OS independet process I could find. Errors during writing of compressed files may not be detected. I think this issue should be fixed upstream. FIXED-IN: 5.0 REVIEW: 127108 M +2 -2 CMakeLists.txt M +81 -82 kmymoney/views/kmymoneyview.cpp M +1 -5 kmymoney/views/kmymoneyview.h http://commits.kde.org/kmymoney/8319120b9c810574beb0de97fc44e49315de058d
Sorry, the patch does not fix the crash. Only the file should not be lost anymore (hopefully).
I'll try it as soon as KMyMoney is updated in arch repos.
*** Bug 361271 has been marked as a duplicate of this bug. ***
No crash on master branch. Attach .kmy test case file and write steps to reproduce you issue.
I can confirm I have no crash any more. KMyMoney version 4.8.0