#2920 Autosave fails silently, and lies about it.


Autosave fails silently when it's unable to encode characters in the buffer using the selected encoding. Even worse, it lies, and claims that the autosave succeeded, thereby deceiving users into believing that their data has been safely written to disk when in fact it has not. This recently caused catastrophic data loss for me, because I trusted jedit when it claimed that my data had been written to disk.
For details and instructions on reproducing the bug, see http://community.jedit.org/?q=node/view/3626


  • Alan Ezust
    Alan Ezust

    • milestone: 101607 --> Regressive (new to devel)
    • priority: 5 --> 8
    • assigned_to: nobody --> k_satoda
  • Logged In: YES
    Originator: NO

    I added handling and reporting of failure of autosave in r10432. The
    failure will be reported as same as the case of manual save.

    Using UTF-8 for autosave files might be good idea to reduce almost all
    of the possibilities of failure. I'll look into that as another issue.

    (from the linked post)
    > A text editor's absolute highest priority, with no exceptions, is:
    > never lose (or corrupt) the user's data.
    > It is present in both pre9 and pre10.

    Note that older jEdit (before 4.3pre9) silently replaces characters
    which can't be encoded in the specified encoding of the buffer. It's
    not 100% reliable too. Throwing encoding error from saving was intended
    to avoid such silent data loss. But ... sorry.

    • status: open --> closed-fixed