I recently read an article which mentioned this paper "Crash Consistency Validation Made Easy". In this paper (which you can google and download it for free), the author metioned that they devised a quick and reliable method to test "Crash Consistency" of different editors. Surprisingly, they found many popular editors have crash consistency bugs which may cause total loss of files when saving files and Texstudio is one of them. Though this occurrence of this bug is rare, but this still makes me nervous because I am currently using Texstudio to write my doctoral thesis, everybody understand what it means to lost a hundred pages of thesis. Could any developers please check whether this bug really exist?
Besides, you should always save your work remote servers (either on the servers of your university, on the cloud, etc.) or at leats on USB sticks and, if possible, automatically (e.g. daily). It may also be usefull to control the versions of your work with a version control system such as Git or Mercurial for instance.
Thank you for your advice : )
Yes, the bug exists. As the authors have written in table 2 of their paper, they have reported it as [bugs:#1693] (tested on 2.10.8).
As a consequence, we've changed the algorithm to use QSaveFile in 2.11.0. However this proved to have issues with dropbox folders (and possibly other types of monitored folders) [bugs:#1933]. The bug is reported upsteam to Qt https://bugreports.qt.io/browse/QTBUG-57299. Until this is fixed, we've decided to revert to our own behavior. It still catches a lot of cases in which a simple write would result in data loss, but not all. Though data loss can happen, it's very unlikely and the authors need test amplification to find a loophole.
So,
1) yes, we are aware of the situation and we try to handle it as good as currently possible.
2) yes there is still a theoretical chance of data loss. But I'm quite sure that you'll never hit that case in practice.
3) As Denis said. You should always have a backup, since there are other sources for data loss (hdd failure, encryption malware).
Related
Bugs:
#1693Bugs:
#1933