Opened 22 months ago

Last modified 22 months ago

#19567 new enhancement

When restoring an auto-saved data layer, keep the file around

Reported by: stanton Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: autosave Cc:


When restoring an automatically saved data layer after JOSM has crashed, JOSM loads the data layer and deletes the backup file, leaving the user without a backup until the next autosave. If JOSM (or the system) hangs or crashes in that timespan, the data is lost.

This almost hit me recently: I was having issues with loading data layers from files, as doing so would cause JOSM to crash (happened a few times but seems to have gone away eventually; I was never able to identify what triggered it). I had to kill JOSM as it stopped responding. I then made a copy of the autosaved file and restarted JOSM. It prompted me to restore the data layer, then crashed and the autosaved file was gone. (I was eventually able to load the copy I had made after restarting JOSM.)

As the subject line says, this ticket is not about why JOSM crashed upon loading certain files—we can never rule out that JOSM (or the system) will crash or hang. The bottom line is that JOSM should treat autosave files as containing unsaved changes and never delete them unless one of the following is true:

  • The file contains only data downloaded from the API, with no local changes.
  • All changes have been saved or uploaded.
  • The user has chosen to discard the data layer (closed JOSM), despite unsaved changes.
  • A new autosave file has been created for the layer.

Attachments (0)

Change History (1)

comment:1 Changed 22 months ago by Klumbumbus

Keywords: autosave added

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to stanton
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.