JOSM settings hosed

I was opening geo tagged images in JOSM (version 17084) when my PC suddenly shut down for unknown reason. I rebooted and restarted JOSM, it resorted to the barebone JOSM as if it is installed for the first time. Gone are my shortcuts, plugins, offsets etc. Digging through .josm directory, I found that josm preference.xml backup file to be zero length and same date stamp as the new preference.xml file, meaning there was no backup from previous use. On a side note, the older non xml preference file from 2012 is still there. The plugin directory does exist with all the downloaded plugins that I used before. So it seems nothing else changed.

So, is it JOSM that forgets to create the backup file, or is it my OS that wipe it out?

I’m on Opensuse 15.1, KDE, AMD FX6300. 12Gig RAM. JOSM memory set at 6GB.

JOSM creates a backup file and tries to use it when it notices that reading preferences.xml caused an error. This might not work out well when preferences.xml has 0 bytes.
Anyway, any kind of error can corrupt this backup so it is a good idea to create a backup of the settings on a regular bases.

Edit: I just tried with a good preferences.xml_backup and an empty preferences.xml . This works as expected (on Windows 10), JOSM shows a popup that informs me about the problem and uses the backup. So, maybe you crash corrupted both files.

Good to know. I’ll put that directory (and other applications settings) into part of my backup plan. Thanks.